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

Response mapping to another call in Addaccess JSON

anuragtripathi
New Contributor
New Contributor

Hi Team,

I have to map the response from one call to another in Addaccess json for one of the entitlementtype.

I have space in entitlement type "Group Unit". I made 2 calls listed below but while passing the response from first to second it is not working as it contains space in between.

Please provide how i can user in another call.

{
"name": "Group Unit",
"connection": "acctAuth",
"url": "url",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}

},
{
"name": "Group Unit",
"connection": "acctAuth",
"url": "url",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"id\":\"${account.accountID}\",\"userName\":\"${account.name.replace('\\\\','\\\\\\\\')}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\":\"${user.email}\",\"isLocalAdministrator\":\"${response.Group Unit1.message.isLocalAdministrator}\",\"isActive\":\"${response.Group Unit1.message.isActive}\",\"credentialSourceId\":\"${response.GroupUnit1.message.credentialSourceId}\",\"opuIds\":[\"${List opu= response.Group Unit1.message.opuIds; opu.add(entitlementValue.entitlementID); return opu.toString().replace('[','').replace(']','').replace(',','\",\"');}\"], \"facilityId\":[\"${List loc= response.Group Unit1.message.locationIds; return loc.toString().replace('[','').replace(']','').replace(',','\",\"');}\"],\"userRoles\":[\"${List role= response.Group Unit1.message.listUserRoleIds; return role.toString().replace('[','').replace(']','').replace(',','\",\"');}\"]}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
}
}

6 REPLIES 6

Falcon
Saviynt Employee
Saviynt Employee

How about using something like this  

${response.'Group Unit'.message.isLocalAdministrator} 

Or may be trying to escape the space with \\ 

rushikeshvartak
All-Star
All-Star

Do you see any error in logs


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

anuragtripathi
New Contributor
New Contributor

It is not getting loaded. The values are not getting populated and showing the same things as string

Can you elaborate more / Provide screenshot


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

anuragtripathi
New Contributor
New Contributor

anuragtripathi_0-1711002901164.png

If it has spaces the call itself is not getting picked up No of calls:0.

anuragtripathi_1-1711003001607.png

anuragtripathi_3-1711003305294.png

 

If i removed the spaces call is getting picked up no of calls:2 (Error is value are not picked up)

anuragtripathi_2-1711003194117.png

If i go with Group\\ Unit1. same call is not getting picked up and showing 0 calls.

anuragtripathi
New Contributor
New Contributor

It is working with response.'Group Unit1'.message.isLocalAdministrator