Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/05/2024 02:09 AM - last edited on 09/05/2024 03:54 AM by Sunil
Hello Experts,
I have integrated ServiceNow as ticketing system with Saviynt and I am trying to create ticket in ServiceNow using Create Ticket JSON. Below is my Create Ticket JSON-
{
"ticketidPath": "call1.message.result.request_number",
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://servicenow.com/api/sn_sc/servicecatalog/items/21d09b261bXXXXXXXXba9604b24bcXXX/order_now" ,
"httpMethod": "POST",
"httpParams": "{\"sysparm_quantity\":1,\"sysparm_requested_for\":\"50653aae1b8cXXXXbe10fdd91d4bcXXX\",\"variables\":{\"short_description\":\"REMOVE ACCESS:Revoke access request for the application $endpoint.endpointname\",\"description\":\"Remove the entitlements as specified in the variables below. DO NOT REMOVE OR DISABLE THE ACCOUNT.\",\"application_name\":\"$endpoint.endpointname\",\"user_account_id\":\"$account.name\",\"entitlement_type\":\"${entitlementValuesObj.entitlementtypekey}\",\"entitlement\": \"${allEntitlementsValues}\",\"full_name\":\"${user.firstname}${user.lastname}\",\"email\":\"$user.email\",\"gad_username\":\"$user.customproperty1\",\"ars_task_saviynt_reference_ticket\":\"${taskIds}\"}}",
"httpHeaders": {
"Authorization": "${access_token}" },
"httpContentType": "application/json",
"successResponses":
{
"statusCode": [201]
}
}
]
}
I need to pass the variables in Variable section to create ticket in SNOW. With above JSON, ticket is getting created but variables are coming as dynamic not fetching the application, user or entitlement details. Can someone help me out with this. Also, if someone can help me with one extra variable I need to pass through- Action type- LEAVER, MOVER, RECERTIFICATION all three use cases will lead to only Revoke access. Thank you.
[This message has been edited by moderator to disable URL hyperlink]
Solved! Go to Solution.
09/06/2024 08:24 AM
09/06/2024 09:08 AM
Does it working from postman ?
09/08/2024 11:29 PM
yes with static variables
09/09/2024 09:08 AM
Limit dynamic variable and validate incremental adding dynamic variables
09/13/2024 01:35 AM
Below JSON is working.
"{\"sysparm_quantity\":1,\"sysparm_requested_for\":\"***\",\"variables\":{\"short_description\":\"Revoke access request for the application ${task?.endpoint?.displayName}\",\"description\":\"Remove the entitlements as specified in the variables below. DO NOT REMOVE OR DISABLE THE ACCOUNT.\",\"revoke_source\":\"${if(task?.source=='CERTIFICATION'){'RECERTIFICATION'}else(task?.source=='PROVRULE'){'LEAVER'}}\",\"application_name\":\"${task?.endpoint?.displayName}\",\"user_account_id\":\"${task?.accountName}\",\"entitlement_type\":\"${entitlementValuesObj.entitlementtypekey}\",\"entitlement\": \"${allEntitlementsValues}\",\"full_name\":\"${user?.firstname}${user?.lastname}\",\"email\":\"${user?.email}\",\"gad_username\":\"${user?.customproperty1}\",\"ars_task_saviynt_reference_ticket\":\"${task.id}\"}}",
09/13/2024 01:37 AM
I tried Full name JSON as \"full_name\":\"${user?.firstname}' ' ${user?.lastname}\", for space between First name and last name. It's throwing error. Can someone help me resolve it.
09/17/2024 03:39 AM
Full name JSON as \"full_name\":\"${user?.firstname}' ' ${user?.lastname}\", for space between First name and last name. It's throwing error. Can someone help me resolve it.
09/17/2024 05:49 AM
"full_name": "${user?.firstname} ${user?.lastname}"
09/18/2024 12:16 AM
Worked, thank you