Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/30/2024 02:51 AM
Hi Experts,
We have a use case to push hardcoded users address from saviynt to target application using REST connector and we tried using below JSON but didn't work, please suggest if you have any other way to achieve it.
\"default-address\":{\"street1\":\"${if(user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[30 Winter Street]'}else {user?.street}}\",\"city\":\"${if(user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[Boston]'}else {user?.city}}\",\"state\":\"${if(user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[Massachusetts]'}else {user?.state}}\",\"postal-code\":\"${if(user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[02108]'}else {user?.regioncode}}\",\"country\":{\"code\":\"${user?.country}\"}}
Regards,
Chandan Gowda
Solved! Go to Solution.
08/30/2024 03:22 AM - edited 08/30/2024 03:28 AM
08/30/2024 03:43 AM
Hi @cgowda try this
"{\"default-address\":{\"street1\":\"${if (user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[30 Winter Street]'} else {user?.street}}\",\"city\":\"${if (user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[Boston]'} else {user?.city}}\",\"state\":\"${if (user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[Massachusetts]'} else {user?.state}}\",\"postal-code\":\"${if (user?.location=='Full-Time Remote' or user?.location=='Remote' or user?.location=='Permanent Teleworker'){'[02108]'} else {user?.regioncode}}\",\"country\":{\"code\":\"${user?.country}\"}}}"
Regards,
Indra
08/30/2024 03:51 AM
@cgowda Use || instead or
Try below samples
\"default-address\":{\"street1\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[30 Winter Street]'}else {user?.street}}\",\"city\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[Boston]'}else {user?.city}}\",\"state\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[Massachusetts]'}else {user?.state}}\",\"postal-code\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[02108]'}else {user?.regioncode}}\",\"country\":{\"code\":\"${user?.country}\"}}
\"default-address\":{\"street1\":\"${if(user?.location.equals('Full-Time Remote') || user?.location.equals('Remote') || user?.location.equals('Permanent Teleworker')){'[30 Winter Street]'}else {user?.street}}\",\"city\":\"${if(user?.location.equals('Full-Time Remote')|| user?.location.equals('Remote') || user?.location.equals('Permanent Teleworker')){'[Boston]'}else {user?.city}}\",\"state\":\"${if(user?.location.equals('Full-Time Remote') || user?.location.equals('Remote') || user?.location.equals('Permanent Teleworker')){'[Massachusetts]'}else {user?.state}}\",\"postal-code\":\"${if(user?.location.equals('Full-Time Remote')|| user?.location('Remote') || user?.location.equals('Permanent Teleworker')){'[02108]'}else {user?.regioncode}}\",\"country\":{\"code\":\"${user?.country}\"}}
08/30/2024 07:59 AM
{
"default-address": {
"street1": "${(user?.location == 'Full-Time Remote' || user?.location == 'Remote' || user?.location == 'Permanent Teleworker') ? '30 Winter Street' : user?.street}",
"city": "${(user?.location == 'Full-Time Remote' || user?.location == 'Remote' || user?.location == 'Permanent Teleworker') ? 'Boston' : user?.city}",
"state": "${(user?.location == 'Full-Time Remote' || user?.location == 'Remote' || user?.location == 'Permanent Teleworker') ? 'Massachusetts' : user?.state}",
"postal-code": "${(user?.location == 'Full-Time Remote' || user?.location == 'Remote' || user?.location == 'Permanent Teleworker') ? '02108' : user?.regioncode}",
"country": {
"code": "${user?.country}"
}
}
}
08/30/2024 10:58 PM
@cgowda
You can try the below JSON.
{
"httpParams": "{\"default-address\":{\"street1\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[30 Winter Street]'}else {user?.street}}\",\"city\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[Boston]'}else {user?.city}}\",\"state\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[Massachusetts]'}else {user?.state}}\",\"postal-code\":\"${if(user?.location=='Full-Time Remote' || user?.location=='Remote' || user?.location=='Permanent Teleworker'){'[02108]'}else {user?.regioncode}}\",\"country\":{\"code\":\"${user?.country}\"}}}"
}
Can you also share the Postman Curl and the Error log in the text file.
08/31/2024 06:47 AM
\"Type of Services\":\"${if(user.customproperty5.equals('AD Onboarding Completed')) {'New hire notification '} else {'Department change '}}\",
09/02/2024 02:43 AM
Thank You, @SumathiSomala @rushikeshvartak much appreciated