Forum Discussion

iftomkins's avatar
10 years ago

Creating and setting value for custom profile fields

We would like to create custom profile fields, and then set values for them. We were told this was possible by our Lithium contact, but I'm having difficulty finding documentation on how to do this. Also, there are many posts such as this one which say that professional services are required to do this. We are fine using the API, would just love to see where this is documented.

 

The question at hand is this: we want to display a popup to each user 1 time only. After the user dismisses the popup, we want to never show the popup again. We'd like to use a custom profile field (not visible to the user) to store this value (instead of using browser cookies), so the user will be recognized as having dismissed the popup no matter which device they're on or if they clear their browser cookies.

  • iftomkins - We are already doing this in our community where we store the required details of the user in the custom field rather than the cookie.

     

    Regarding the custom field, at the moment this can be added via Li Professional services only, and that is at no additional cost, we have got many custom fields for our communities. They will set it up on your staging instance for review and then once you confirm, will be pushed live in your maintenance window.

     

    Your custom field will be visible in the user profile data in the API response and will also be available in the metrics reports.

     

    This is how you can access the Custom fields:

     

    https://community.xyz.com/restapi/vc/users/id/[ID]/profiles/name/CUSTOM_FIELD

     

    This is how you can set the value in the custom fields:

     

    https://community.xyz.com/restapi/vc/users/id/[ID]/profiles/name/CUSTOM_FIELD/set?value=VALUE_TO_BE_SET

     

    This works really well and would suit your scenario of showing the form only once to the user.

    • HaidongG's avatar
      HaidongG
      Lithium Alumni (Retired)

      Hi VarunGrazitti ,

       

      just to clarify a few points regarding the subject.

       

      Regarding the custom field, at the moment this can be added via Li Professional services only,

      --- if there is no on-going projects with PS, Support could be happy to assist you in this subject.

       

      and that is at no additional cost

      --- it is really case by case basis. In general, one-time setup and zero customization would be at no cost or low cost.

       

      They will set it up on your staging instance for review and then once you confirm, will be pushed live in your maintenance window.

      -- when the fields are added to stage server only, not production server, the studio publish will be disabled. most of the time, we will add to both stage and production at the same time.

       

      <the custom profile fields> “will also be available in the metrics reports.”

      --- it is not OOTB or by default, you need to explicitly tell Lithium that you want to include those fields in your user report.

  • Hi

    You will need lithium to create the custom profile fields as this isn't possible "client side" I'm not 100% but I would imagine once created you could populate with API once you have the API field names but prof services could help with that.

    Also note sure but suspect there will be a cost, but if you raise a support case they will be able to sort it for you :)
  • iftomkins  I don't think you need custom content. You can manage it by  "Page Hitbox Content " area at skin's header section.

     Using JS.

    • bhupen - Sorry but using JS is not always the best option and is certainly not in this case, moreover the requirement is to store the user preference to a custom field, how can you store a user preference and than check it using JS without having the custom field in place. He is referring to custom fields and not the custom content.