Appendix
We have shared a web service sample for your reference.
Query incident
PURPOSE:
The Web Service action is used to query an incident from a third-party CRM. The following scenarios are covered:
- The incident exists in a third-party CRM, and it is assigned to an engineer.
- The incident exists in a third-party CRM, and it is not assigned to an engineer.
- The incident does not exist in a third-party CRM.
WEB SERVICE URL:
https://thirdpartycrm.com/8x8ivrRWS.do?action=query_incident&incident_number=INC1234567
Note: The server https://thirdpartycrm.com changes according to the instance (DEV, QA and PROD).
REQUEST METHOD:
GET
REQUEST HEADERS:
Authorization: Basic <Encoded 64Base User/Password>
URL PARAMETERS:
action=query_incident
incident_number=INC9999999 (7 digits number) or 9999999 (7-digit number)
WS RESPONSE STRUCTURE:
{
incident_number: "",
agent_email: "",
incident_url: ""
}
Response varies according to the scenarios:
- The incident exists in a third-party CRM, and it is assigned to an engineer.
All fields will be send in the response - The incident exists in a third-party CRM, and it is not assigned to an engineer.
agent_email will be empty - The incident does not exists in a third-party CRM.
All fields will be empty
If there is an error, you see the following response:
{
"error":"<Error Message>"
}
Error Messages: Missing value for <Name of the Field>
Update Incident
PURPOSE:
Web Service action used to update an incident within a third-party CRM
WEB SERVICE URL:
https://thirdpartycrm.com/8x8ivrRWS.do?action=update_incident
Note: The server https://thirdpartycrm.com changes according to the instance (DEV, QA and PROD)
REQUEST METHOD:
POST
REQUEST HEADERS:
Authorization: Basic <Encoded 64Base User/Password>
Content-Type: application/json
URL PARAMETERS:
action= update_incident
REQUEST BODY STRUCTURE:
{
"incident_number":"",
"agent_email":"",
"caller_id":"",
"call_answered_time":"",
"call_hangup_time":"",
"call_duration":"",
"transaction_id":""
}
Note: The expected incident_number format is INC1234567 (7-digit number)
WS RESPONSE STRUCTURE:
{
status: ""
}
STATUSES:
- incident updated
- incident not found
If there is an error, you see the following response:
{
"error":"<Error Message>"
}
Query incident by phone
PURPOSE:
Web Service action used to find incidents by a phone number.
WEB SERVICE URL EXAMPLE:
https://thirdpartycrm.com/8x8ivrRWS.do?action=query_incident_by_phone&phone=+19999999999
REQUEST METHOD:
GET
REQUEST HEADERS:
Authorization: Basic <Encoded 64Base User/Password>
URL PARAMETERS:
action= query_incident_by_phone
phone = <phone number in any format> E.164
WS RESPONSE STRUCTURE:
{
incident_url: ""
}
RETURN VALUES:
incident_url is modified according to the number of incidents found for the phone number provided.
- One incident found: (Direct Link to the incident)
https://thirdpartycrm.com/nav_to.do?uri=incident.do?sysparm_query=number=INC9999999 - More than one incident found: (Link to the list of incidents of the caller in the last 6 months)
https://thirdpartycrm.com/nav_to.do?uri=incident_list.do?sysparm_query=service_offering=9e52804c6f63b1000685283f2c3ee433^ORservice_offering=15e370106fe3b1000685283f2c3ee474^ORservice_offering=cfa2880c6f63b1000685283f2c3ee485^ORservice_offering=205962b584e08200bd9411df5c32d3ed^sys_created_onONLast 6 months@javascript:gs.monthsAgoStart(6)@javascript:gs.endOfThisMonth()^caller_id=69e648ca0c49b500e2dbe70357d3ca15 - No Incident found: (Link to the Incident Reporting Form to create a new incident)
https://thirdpartycrm.com/predix/details.do?type=incident