09/25/2023 03:43 AM
Hi,
Few questions around Service Now :
1. What is the right API to call to get a ticket created in SNOW for disconnected application provisioning. In the servicenow_integration_guide_v23.x_9-21-2023 guide, CreateTicketJSON provides 2 samples and both have different API calls.
- https://%3Cdomainname%3E/api/now/table/sc_task
- https://test.service-now.com/api/font2/ssm_integration/create_request
On the forums also, I was searching for sample CreateTicketJSONs but could see examples with different API calls.
2. I tried using the following CreateTicketJSON :
{
"call": [
{
"name": "call1",
"connection": "SNOW",
"url": "https://domain.com/api/now/table/sc_task",
"httpMethod": "POST",
"httpParams": "{\"app_name\":\"$task.endpoint.displayName\",\"name\":\"$user.lastname, $user.firstname\",\"email\":\"$user.email\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"ticketidPath": "Request Number",
"unsuccessResponses":
{
"message": ""
}
}
]
}
But got the following error message :
Error in getting Ticket Number. Response: {"result":{"u_vendor_ticket_number":"","parent":"","made_sla":"true","watch_list":"","sc_catalog":"","upon_reject":"cancel","sys_updated_on":"2023-09-25 09:31:54","task_effective_number":"SCTASK0012371","approval_history":"","skills":"","number":"SCTASK0012371","sys_updated_by":"saviyent_inbound_account","opened_by":{"link":"https://domain/api/now/table/sys_user/4d94ae741bec71107643a82c274bcb0f","value":"4d94ae741bec71107643a82c274bcb0f"},"user_input":"","sys_created_on":"2023-09-25 09:31:54","sys_domain":{"link":"https://domain/api/now/table/sys_user_group/global","value":"global"},"state":"1","route_reason":"","sys_created_by":"saviyent_inbound_account","x_caukp_compliance_sla_business_hours":"","knowledge":"false","order":"","calendar_stc":"","closed_at":"","cmdb_ci":"","delivery_plan":"","contract":"","impact":"3","active":"true","work_notes_list":"","business_service":"","u_on_hold_reason":"","priority":"5","sys_domain_path":"/","x_caukp_compliance_sla_met":"","time_worked":"","expected_start":"","opened_at":"2023-09-25 09:31:54","business_duration":"","group_list":"","work_end":"","u_off_hold_date":"","approval_set":"","work_notes":"","universal_request":"","request":"","short_description":"","correlation_display":"","delivery_task":"","work_start":"2023-09-25 09:31:54","assignment_group":{"link":"https://domain/api/now/table/sys_user_group/d625dccec0a8016700a222a0f7900d06","value":"d625dccec0a8016700a222a0f7900d06"},"additional_assignee_list":"","u_apply_template":"","description":"","calendar_duration":"","u_rpt_mttr":"","close_notes":"","service_offering":"","sys_class_name":"sc_task","closed_by":"","follow_up":"","sys_id":"cba370f81b2df9107643a82c274bcbcd","contact_type":"","u_rpt_how_long_was_it_open":"","urgency":"3","company":"","reassignment_count":"0","u_vendor_group":"","x_caukp_compliance_exception_number":"","activity_due":"","assigned_to":"","comments":"","approval":"not requested","sla_due":"","comments_and_work_notes":"","due_date":"","sys_mod_count":"0","request_item":"","sys_tags":"","escalation":"0","upon_approval":"proceed","x_caukp_slm_report_sla_met":"","correlation_id":"","u_knowledge_article":"","location":""}}
Appreciate your help here.
Best Regards,
Varun
Solved! Go to Solution.
09/25/2023 04:27 AM
Hi @varunpuri
It is depending on your requirement.
To create Incidents in ServiceNow use incident table
To create RITM in ServiceNow use sc_req_item table
To create REQ in ServiceNow use sc_reqest table.
I have attached sample Createticket JSON and TicketstatusJSON file which will help you to create REQ in ServiceNow
09/25/2023 05:58 AM
Thank You, @SumathiSomala ,
I was able to create RITM. Also, the status of provisioning task for disconnected application changed to Pending Provision.
As per the Service Now documentation provided by Saviynt,
Using the TicketStatusJSON, EIC polls the ServiceNow for status such as 'Closed', 'Open', or'Pending'. Once status is 'Closed' in ServiceNow, it fetches status and updates the status of Task to 'Completed' in EIC too.
For the above to work, do we need to schedule a separate Job in Saviynt OR the WSRETRY job itself checks the status of ticket in Service Now and updates the corresponding task status in Saviynt ?
Best Regards,
Varun
09/25/2023 06:07 AM
Schedule the WSRETRY Job It will fetch the status of ticket.
09/25/2023 06:28 AM
Thank You, @SumathiSomala. I'll try this and revert.
Best Regards,
Varun