08/24/2023 03:34 AM
Hi,
We are trying to create service now ticket to disable account. below is the JSON which we are using.
{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "test.com",
"httpMethod": "POST",
"httpParams": "{\"variables\" :{\"catalogid\":\"1f5888f287187d505a2f53973cbb35d8\",\"iehp_id\":\"$user.username\",\"departure_date_time\":\"$user.customproperty37\",\"employee_type\":\"$user.employeeType\",\"saviynt_task_id\":\"$task.taskid\",\"departure_type\":\"Immediate\"} }",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketidPath": "result.message",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
we are facing issue of request body. instead of sending values JSOn is send as is.
ex: user.username send as it is instead of actual username
let us know if we are missing anything
08/24/2023 04:15 AM - edited 08/24/2023 04:21 AM
Hi @saurabhpad
You're not using curly braces in your variables.
Can you try the following:
{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "test.com",
"httpMethod": "POST",
"httpParams": "{\"variables\" :{\"catalogid\":\"1f5888f287187d505a2f53973cbb35d8\",\"iehp_id\":\"${user.username}\",\"departure_date_time\":\"${user.customproperty37}\",\"employee_type\":\"${user.employeeType}\",\"saviynt_task_id\":\"${task.taskid}\",\"departure_type\":\"Immediate\"} }",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketidPath": "result.message",
"successResponses": {
"statusCode": [
200
]
}
}
]
}
Other than that, check if the variables are supported as per the documentation: Developers Handbook (saviyntcloud.com)