Task getting completed even if SNOW ticket is open

Aniketk
New Contributor III
New Contributor III

Hello All,

I`m using rest based connection for service now connection.

Service now we are using as a ticketing tool. we are expecting task should be completed after ticket is closed. However, tasks are getting completed even if the snow ticket is open. Please find the below ticket status json.

Kindly suggest.

 

{
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "https://removed.service-now.com/api/now/table/sc_req_item?sysparm_query=request.number=${ticketID}&s...",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketStatusPath": "result[0].state",
"ticketStatusValue": [
"Open",
"OPEN",
"open",
"Closed Complete"
],
"successResponses": [{}]
}]
}

[Moderator edit: removed url]

5 REPLIES 5

SumathiSomala
Regular Contributor III
Regular Contributor III

@Aniketk please update the ticketStatusValue in your JSON

"ticketStatusValue":[
"Closed Complete",
"closed",
"CLOSED",
"Closed"
],

Sample JSON

{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": XXX,
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}" },
"httpContentType": "application/json",
"ticketStatusPath": "result[0].state",
"ticketStatusValue":[
"Closed Complete",
"closed",
"CLOSED",
"Closed"
],
"disContinueStatusValue":[
"Closed Incomplete",
"closed incomplete",
"CLOSED INCOMPLETE"
],
"successResponses": {"statusCode":[200,201]}
}
]
}

If this reply answered your question, please accept it as Solution to help others who may have a similar problem.

If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.
Regards,
Sumathi Somala

Aniketk
New Contributor III
New Contributor III

Hello Sumitha

I used same value , but my issue is ticket satus is open , but my tasks are getting completed. If I run the wsretry job again

Aniketk
New Contributor III
New Contributor III

 let me know if you want me to remove Open status completely form "ticketStatusValue":[

 

SumathiSomala
Regular Contributor III
Regular Contributor III

@Aniketk yes remove and create a fresh request and then run the wsretry job.

If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.
Regards,
Sumathi Somala

Aniketk
New Contributor III
New Contributor III

Thanks for help! IT worked