Skip to main content

Receiving Calls

Webhook

A webhook is a mechanism that allows one system to send real-time data to another system when a specific event occurs. Unlike traditional APIs where you need to poll for data, webhooks send the data automatically whenever an event is triggered, providing a more efficient way of integrating different services. On a more technical level, a webhook is an HTTP callback or HTTP Post request generated by the notification of an event

Webhook EML System and Queue Management

A webhook between the EML System and the Queue Management system is required to facilitate communication between the two entities. The EML System will request a phone number or agent extension to contact the active call, and the Queue Management system will provide this information.

Call Notify

When EML System request a phone number or extension to the Queue Management System, EML System send some like the next path: Use the next path:

POST {base_qm_url}/call/request

Body

The body allows next fields:

FieldRequiredDescription
callIDYesString field that identifies the call
rclassificationYesString field that defines the request classification, destination area of the call, for example: Sales, Support, etc.
customerIDnoString field that identifies the customer ID
callTimeyesString field that identifies the duration of the current call

Responses

Success

HTTP/1.1 201 Created
Status: 201 Created

{
"rclassification": "GOTOSUPPORT",
"number": "5032505555",
"callID": "wtl0tmw3rri9s7gqdpfi0",
"mqID": "1ef698cb-ffa3-6b00-8113-768365ac9ea8",
"success": true
}

The response resturns next fields:

FieldDescription
rclassificationString of the request classification
numberString field that defines the number or extension of the request classification
callIDString field that identifies the call
mqIDString field that identifies the queue management ID
successBoolean field that identifies the success of the webhook

Error

When request classification does not found in the server, the next response is return.

HTTP/1.1 201 Created
Status: 201 Created

{
"success": false,
"message": "{{RCLASSIFICATION NAME}} not found"
}

FieldDescription
successBoolean field that identifies the success of the webhook
messageMessage of the issue

When a error happen, the next response is return.

HTTP/1.1 400 Bad Request
Status: 400 Bad Request

{
"message": [
"rclassification must be a string"
],
"error": "Bad Request",
"statusCode": 400
}

FieldDescription
messageArray of messages of the issue or issues
errorMessage of the issue
statusCodeStatus code of the issue

Next step

Connect Calls