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

Conditionally create a JSON

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on April 18 2019 at 04:40 UTC

Can the Create ticket JSON be created conditionally based on SSM object attributes such as user?.statuskey, task.taskytype, etc.? Is there any documentation on how JSONs can be constructed besides the existing sample for ServiceNow JSON as a ticketing system?

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.
1 REPLY 1

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on May 6 2019 at 16:09 UTC

It is possible to create the JSON based on certain conditions. The task, user, requestor objects can be leveraged to refer a value or form a condition. The reference to such variables are available in the below mentioned path.


https://saviynt.freshdesk.com/support/solutions/articles/43000431557-managing-email-templates


For example, if you want to form the <requestType></requestType> based on certain conditions on Saviynt request type, then the following could be used

<requestType>${task.requestKey?.requesttype == 1 ? 'Add Access' : task.requestKey?.requesttype == 3 ? 'New Account' : task.requestKey?.requesttype == 2 ? 'Remove Access' : 'Default Value'</requestType>


Based on the Saviynt's request type it will pass the value in the <requestType> element. If no condition is met then it would pass the Default Value. This condition can be expanded based on other requirements.


Thanks,

Paramu.

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.