Click HERE to see how Saviynt Intelligence is transforming the industry. |
02/21/2024 09:31 AM
Hi Folks,
I am performing zoom-saviynt integration. In my create account Json i want to apply if and else condition but its not working, there is some error in my Json which i want to get validated. Can anyone please suggest how to fix this. Did multiple try but everytime i see this payload in logs-
Condition 1-
Saviynt sending zone as Zone north america but zoom application is accepting as NAZ to create zoom account
Condition 2-
Saviynt sending zone as ZONE ASIA PACIFIC but zoom is accepting as APAC to create zoom account
Create account JSON-
{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://xxxxxxxxxxxxxxx/api/zoom-createAccount",
"httpMethod": "POST",
"httpParams": "{\"email\":\"${user.email}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"zone\":\"${If (user.regioncode=='ZONE ASIA PACIFIC') {'APAC'} elseif (user.regioncode=='Zone north america'){'NAZ'}}\",\"displayName\":\"${user.displayname}\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"x-functions-key": "zzzzzzzzzzzzz"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}
Thanks
shweta
Solved! Go to Solution.
02/21/2024 09:40 AM
Hi @Shwet01
Can you please try the below JSON?
{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [{
"name": "call1",
"connection": "acctAuth",
"url": "https://xxxxxxxxxxxxxxx/api/zoom-createAccount",
"httpMethod": "POST",
"httpParams": "{\"email\":\"${user.email}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"zone\":\"${(user.regioncode=='ZONE ASIA PACIFIC')?'APAC':((user.regioncode=='Zone north america')?'NAZ')}\",\"displayName\":\"${user.displayname}\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"x-functions-key": "zzzzzzzzzzzzz"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}
Let me know if this helps!
02/21/2024 09:45 AM
try below
"{\"email\":\"${user.email}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"zone\":\"${if (user.regioncode=='ZONE ASIA PACIFIC') {'[APAC]'} else if(user.regioncode=='Zone north america'){'[NAZ]'}}\",\"displayName\":\"${user.displayname}\"}",
02/21/2024 12:06 PM
Below are issues in your json
{
"accountIdPath": "call1.message.id",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"url": "https://xxxxxxxxxxxxxxx/api/zoom-createAccount",
"httpMethod": "POST",
"httpParams": "{\"email\":\"${user.email}\",\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"zone\":\"${if (user.regioncode=='ZONE ASIA PACIFIC') {'[APAC]'} else if(user.regioncode=='Zone north america'){'[NAZ]'}}\",\"displayName\":\"${user.displayname}\"}",
"httpHeaders": {
"Authorization": "${access_token}",
"x-functions-key": "zzzzzzzzzzzzz"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
}
}
]
}
02/21/2024 08:48 PM
@Shwet01 I have tested this as below :
"${if (user.regioncode=='ZONE ASIA PACIFIC') {'[APAC]'} else if(user.regioncode=='Zone north america'){'[NAZ]'}} "
and it worked for us.