Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

The additional IF is not working for me.

sherbert
New Contributor
New Contributor

The additional IF is not working for me. My TAM suggested asking here. 

 

{
"accountIdPath":"call1.message.id",
"dateFormat":"",
"responseColsToPropsMap":{
},
"call":[ { "name":"call1", "connection":"acctAuth", "url": "${if(user?.customproperty5.equals('2567') || user?.customproperty52.contains('Z288')){'https://company.domain.com/api/v1/users?activate=true'}else if if(user?.customproperty57.contains('VALUE')){'https://company.domain.com/api/v1/users?provider=true'}else{'https://company.domain.com/api/v1/users?activate=false'}}", "httpMethod":"POST", "httpContentType":"application/json", "httpParams":"{\"profile\": {\"firstName\": \"${user.firstname}\", \"Preferred_FirstName\": \"${user.preferedFirstName}\", \"lastName\": \"${user.lastname}\", \"Preferred_LastName\": \"${user.job_function}\", \"employeeNumber\": \"${user.username}\", \"bp_id\": \"${user.customproperty53}\",\"email\": \"${user.email}\", \"login\": \"${user.email}\" }}",
"httpHeaders":{
"Authorization":"${access_token}",
"Accept":"application/json"
},
"successResponses":{
"statusCode":[
204,
201,
200
]
},
"unsuccessResponses":{
"statusCode":[
404,
401,
400,
403
]
}
}
]
}

[This post has been moved to its own thread to give it the attention it deserves. Link to its original location.]

 

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

What is error ?


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

sherbert
New Contributor
New Contributor

I received a message stating this forum post was made private. I now no longer see the details or conversation other than the initial post and the initial reply. Do i need to re-upload my logs again? 

As per logs 

h,DEBUG,Got showLogs = true,,,,,,,,,,,,,,,,,,,
2024-07-15T14:33:06.851+00:00,ecm-worker,rest.RestUtilService,quartzScheduler_Worker-8-mm84h,DEBUG,Got null response statusCode with erroMsg - [error:Error Illegal character in path at index 1: ${if(user?.customproperty5.equals('2567') || user?.customproperty52.contains('Z288')){'https://companyname.oktapreview.com/api/v1/users?activate=true'}else if if(user?.customproperty57.contains('VALUE')){'https://companyname.oktapreview.com/api/v1/users?provider=true'}else{'https://companyname.oktaprevie...'}}],,,,,,,,,,,,,,,,,,,
2024-07-15T14:33:06.851+00:00,ecm-worker,rest.RestProvisioningService,quartzScheduler_Worker-8-mm84h,ERROR,Exception

 

USE below JSON

{
  "accountIdPath": "call1.message.id",
  "dateFormat": "",
  "responseColsToPropsMap": {},
  "call": [
    {
      "name": "call1",
      "connection": "acctAuth",
      "url": "${user?.customproperty5.equals('2567') || user?.customproperty52.contains('Z288') ? 'https://company.domain.com/api/v1/users?activate=true' : user?.customproperty57.contains('VALUE') ? 'https://company.domain.com/api/v1/users?provider=true' : 'https://company.domain.com/api/v1/users?activate=false'}",
      "httpMethod": "POST",
      "httpContentType": "application/json",
      "httpParams": "{\"profile\": {\"firstName\": \"${user.firstname}\", \"Preferred_FirstName\": \"${user.preferedFirstName}\", \"lastName\": \"${user.lastname}\", \"Preferred_LastName\": \"${user.job_function}\", \"employeeNumber\": \"${user.username}\", \"bp_id\": \"${user.customproperty53}\",\"email\": \"${user.email}\", \"login\": \"${user.email}\" }}",
      "httpHeaders": {
        "Authorization": "${access_token}",
        "Accept": "application/json"
      },
      "successResponses": {
        "statusCode": [
          204,
          201,
          200
        ]
      },
      "unsuccessResponses": {
        "statusCode": [
          404,
          401,
          400,
          403
        ]
      }
    }
  ]
}

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Still receiving NULL on last condition:

sherbert_0-1721220293427.png

: 'https://company.domain.com/api/v1/users?activate=false'}"

 

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @sherbert ,

can you try with below url 

"url": "${if(user?.customproperty5.equals('2567') || user?.customproperty52.contains('Z288')){'https://company.domain.com/api/v1/users?activate=true'}else if(user?.customproperty57.contains('VALUE')){'https://company.domain.com/api/v1/users?provider=true'}else{'https://company.domain.com/api/v1/users...'}}",

 

Thanks

Darshan