Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/05/2024 08:31 AM
Hi Team,
while creating an account for application we are using Createaccount JSON as follows where we want the sid attribute to be populated if and only if the account name starts with 'S'
however , it is not working please specify if am missing anything syntax wise
below is the create account JSON
{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": false,
"url": "<URL here>/v2/users",
"httpMethod": "POST",
"httpParams": "{ \"eid\": \"${user.username}\", \"sid\": \"${arsTasks.accountName like 's%'?arsTasks.accountName:'null'||''}}\", \"name\":\"${user.firstname+' '+user.lastname}\",\"firstName\": \"${user.firstname}\", \"lastName\":\"${user.lastname}\", \"email\": \"${user.email}\",\"active\": \"true\",\"role\":\"View Only\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}
Thanks,
Rizvana
06/05/2024 08:38 PM
{
"accountIdPath": "accountName",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
"call": [
{
"name": "call1",
"connection": "acctAuth",
"showResponse": false,
"url": "<URL here>/v2/users",
"httpMethod": "POST",
"httpParams": "{ \"eid\": \"${user.username}\", \"sid\": \"${arsTasks.accountName?starts_with('S')?arsTasks.accountName:''}\", \"name\":\"${user.firstname + ' ' + user.lastname}\",\"firstName\": \"${user.firstname}\", \"lastName\":\"${user.lastname}\", \"email\": \"${user.email}\",\"active\": \"true\",\"role\":\"View Only\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201,
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404
]
}
}
]
}