Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

ServiceNow CreateTicketJSON and TicketStatusJSON not being called at all

jezzanuena
Regular Contributor
Regular Contributor

Hi Team! I'm trying to create an request item in ServiceNow. The provisioning job was successful but the task is not being update. I checked the logs and it seems that the API were not being called at all. 

Note: For createticketJSON, we are not using the sc_req_item table as we created separate endpoint. Creating ticket in Postman is working just fine. Below are the JSONs. I hardcoded most of the values if you noticed to make it simple, but its not working.

Her is the createticketJSON:

{
    "call": [
      {
        "name": "call1",
        "connection": "userAuth",
        "httpMethod": "POST",
        "httpParams": "{\"application\": \"${endpoint.customproperty6}\",\"requested_for\":\"$user.email\",\"short_description\":\"Test\",\"account\": \"${user.username}\",\"request_type\": \"${if(task.tasktype == 3) {return 'New Account';} else {return 'Add Access';}}\"}}",
        "httpHeaders": {
          "Authorization": "${access_token}"
        },
        "httpContentType": "application/json",
        "ticketidPath": "result.ticketNumber",
        "successResponses": {
          "statusCode": [
            200,
            201
          ]
        }
      }
    ]
  }
 
Her is the TciketstatusJSON:
{
    "call": [
        {
            "name": "call1",
            "connection": "userAuth",
            "httpMethod": "GET",
            "httpHeaders": {
                "Authorization": "${access_token}"
            },
            "httpContentType": "application/json",
            "ticketStatusPath": "result.state",
            "ticketStatusValue": [
                "Open",
                "OPEN",
                "open"
            ],
            "successResponses": [
                {}
            ]
        }
    ]
}
1 REPLY 1

rushikeshvartak
All-Star
All-Star

Share wsretry job and connection json screenshot also share security system screenshot 


Regards,
Rushikesh Vartak
If you find this response useful, kindly consider selecting 'Accept As Solution' and clicking on the 'Kudos' button.