Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Salesforce Application condition check during Profile assignment

Anu
Regular Contributor
Regular Contributor

We have Enterprise role created for an salesforce application(REST connector based implementation) which comprises of groups,profile A,teritory,permissionset entitlements.
Example: Enterprise Role A has Profile A,group A,Teritory A,permissionsetA mapped
Role B has Profile B,group B, Teritory B,permissionsetB mapped

We also have profile prioritization enabled.

Profile prioritization

Profile A - priority 1
Profile B - priority 2
Profile C - priority 3

UseCase: We have a requirement where if the user request(requested through "Request Access for others" tile) for roleA then during role assignment if users email contains @xyz.com assign profile A else assign profile B. I have attached the AddAccessJSON. Can you please provide an option on how this requirement can be handled in JSON.

 

AddAccessJSON:
{
"name": "Profile",
"connection": "userAuth",
"url": "https://xxxxxxxxx/services/data/v58.0/sobjects/User/${account?.accountID}",
"httpMethod": "PATCH",
"httpParams": "{\"ProfileId\":\"${entitlementValue.entitlementID}\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
204
],
"status": [
"success"
]
}

2 REPLIES 2

rushikeshvartak
All-Star
All-Star

Use if else condition check in httpParams


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

naveenss
All-Star
All-Star

@Anu  as mentioned by @rushikeshvartak  it can be achieved through if/else condition in the JSON. However, this is not the correct approach to assign a different profiles that is not part of the role composition.

For example, if the user requests roleA then they should only get the entitlements associated with roleA. Is there any business reason to do this kind of profile assignment?

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.