Create Visitor Group > Technical Criteria > Role

Vote:
 

We installed the Visitor Group Criteria pack in hopes that the we could use the roles but it is not working the way that we expect.  We get our roles from an API and sync it to Opti when a user logs in.  The roles that are listing in the drop down of the visitor group does not match that which is available in CMS groups.  Is there a way through code to look at the user profile to get the roles to assign users to a visitor group?

#306647
Aug 11, 2023 13:58
Vote:
 

Hi Scott,

Yes you can, you would need to create your own visitor group criterion.

You could use an exact match and enter the desired role.

You would then write logic to look up the current users roles, presuming you store them in current session/claims/cookie, and if it matches then they would fulfil the criteria.

Thanks 

Paul

#306648
Aug 11, 2023 14:43
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.