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:
| Field | Required | Description |
|---|---|---|
| callID | Yes | String field that identifies the call |
| rclassification | Yes | String field that defines the request classification, destination area of the call, for example: Sales, Support, etc. |
| customerID | no | String field that identifies the customer ID |
| callTime | yes | String 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:
| Field | Description |
|---|---|
| rclassification | String of the request classification |
| number | String field that defines the number or extension of the request classification |
| callID | String field that identifies the call |
| mqID | String field that identifies the queue management ID |
| success | Boolean 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"
}
| Field | Description |
|---|---|
| success | Boolean field that identifies the success of the webhook |
| message | Message 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
}
| Field | Description |
|---|---|
| message | Array of messages of the issue or issues |
| error | Message of the issue |
| statusCode | Status code of the issue |