Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/08/2024 11:17 AM
Hi! Our environment got upgraded from 23.10 to 24.5, since then the TicketStatusJSON is not working. Below are the JSONs I am using. I can successfully create the ticket. But when the admin closed the ticket in ServiceNow level, the tasks are not getting completed after running the provisioning job. No logs found. The tasks were not even getting updated when we check it in the Pending Tasks module. Help, please? I also tried recreating the ConnectionJSON but didn't work.
TicketStatusJSON:
{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://domainname.service-now.com/api/now/table/sc_request?sysparm_query=number=${ticketID}&sysparm...",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketStatusPath": "result[0].state",
"ticketStatusValue": [
"Closed Complete",
"Close Incomplete",
"Closed Skipped"
],
"successResponses":
{"statusCode":[200,201]}
}
]
}
CreateTicketJSON:
{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://domainname.service-now.com/api/mkr/ssm_integration/create_request",
"httpMethod": "POST",
"httpParams": "{\"application\": \"${endpoint.customproperty6}\",\"requested_for\":\"${user.email}\",\"short_description\":\"'Test Only'\",\"account\": \"${user.username}\",\"request_type\": \"${requestAccessAttributes?.get('reqtype')}\",\"description\": \"${'User Name: ' +user.displayname+ '\\\\n EID: ' +user.username+ '\\\\n User Email: ' +user.email+ '\\\\n \\\\nRequest Details: \\\\n' +allEntitlementsValues}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketidPath": "result.requestNumber",
"successResponses": {
"statusCode": [
200,
201
]
}
}
]
}
Solved! Go to Solution.
07/08/2024 11:21 AM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
07/09/2024 03:15 AM
Hi @rushikeshvartak please see the attached for the postman response for ticketStatusJSON call Here are the logs:
Here is the Security System config:
Here is the Create ticket respone:
This integration is configured to create a REQUEST, once approved, it will create a SCTASK under the RITM. When the task is marked as complete, it also close the RITM then REQ.
07/09/2024 04:44 AM
Hi @jezzanuena is the connection name configured under connectionJSON is userAuth?
07/09/2024 05:49 AM
Hi @naveenss thank you for checking in on this issue. Yes. I made sure that the connection name matches to the JSON above:
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://domainname.service-now.com/oauth_token.do",
"httpMethod": "POST",
"httpParams": {
"grant_type": "password",
"client_id": "client_id",
"client_secret": "client_secret",
"username": "serviceaccount",
"password": "password"
},
"httpHeaders": {
"Content-Type": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"retryFailureStatusCode": [
403,
401,
500
],
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"Authentication_MissingOrMalformed",
"Authentication_ExpiredToken"
],
"errorPath": "error.code",
"maxRefreshTryCount": 5,
"tokenResponsePath": "access_token",
"tokenType": "Bearer",
"accessToken": "Bearer <token>"
}
}
}
07/09/2024 10:36 AM
Need ticketStatusJSON from saviynt
07/11/2024 01:57 AM
@jezzanuena is this issue resolved?
07/15/2024 05:29 AM
Hi! Yes. This is resolved. User error though. 🙂 There was a requestid number in the advancedconfig. 😅