and more in a single search tool across platforms. Read the announcement here. |
01/03/2024 01:40 AM - edited 01/03/2024 01:41 AM
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"
]
}
01/03/2024 08:13 PM
Use if else condition check in httpParams
01/03/2024 11:05 PM
@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?