You are here: Appendix

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:

  1. The incident exists in a third-party CRM, and it is assigned to an engineer.
  2. The incident exists in a third-party CRM, and it is not assigned to an engineer.
  3. 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:

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:

  1. incident updated
  2. 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.

 


Send us your Feedback