Event Notification Webhooks
Outgoing webhooks are a way to notify another platform when one of the 6 predefined events in uContact's code occurs. When an event occurs, an HTTP POST request is sent to a specific URL on the target platform. This request contains information about the event in question depending on the type.
Ā
Events.
All events send their information in a JSON object which contains specific information for each event. These JSON objects always contain the date and time the event occurred in the 'date' parameter and the event that occurred in the 'event' parameter by default in all cases.
Below, each of the events in question will be detailed along with an example of the JSON object that is sent in each case.
Ā
Event | Description | Data to send | JSON example |
---|---|---|---|
AgentRingNoAnswer | This event is triggered when an agent does not answer a call within the maximum ring time configured for the campaign. |
| {"event":"AgentRingNoAnswer","date":"2023-48-13 06:48:51","agent":"agentTest","agentNumber":"9999","agentFullName":"Agente Test","callerIdNum":"1234","campaign":"Demo<-"} |
AgentLog | This event is triggered when an agent logs in or logs out of uContact. |
| {"event":"AgentLog","date":"2023-16-13 05:16:22","agent":"agentTest","isLogin":true} {"event":"AgentLog","date":"2023-16-13 15:18:43","agent":"agentTest","isLogin":false} |
AgentBreak | This event is triggered when an agent sets or removes their break status. |
| {"event":"AgentBreak","date":"2023-52-13 04:52:57","agent":"AgentTest","motive":"Lunch","isBreak":true} {"event":"AgentBreak","date":"2023-52-13 05:52:00","agent":"ccass_sderi","motive":"Lunch","isBreak":false} |
FinishInteraction | This event will be triggered when any interaction on a uContact channel is finished. This includes telephony, webchat, SMS, or email. |
| |
InteractionDisposition | This event will be executed when an agent of uContact categorizes a telephony interaction. |
|
Ā
How to register the webhook to send the event notification.
Currently, uContact does not have a user interface to register webhooks, so it is necessary to manually add them to a table in the database.
The table in question is the table named 'webhooks' located in the ccdata database. It has the following structure: Id, name, description, event, url, user. This table already has the notification events in question added, and if nothing was previously configured, the 'url' field should be empty, as shown in the image below.
To register the webhook, you simply need to insert the link into the empty 'url' field. After inserting the link, data will start to be sent to the provided URL. The URL cannot exceed 256 characters.