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. | agent: Username agentNumber: Agent extension agentFullName: Agent full name callerIdNum: Calling number campaign: Campaign through which the call enters
| {"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. | guid: Interaction GUID. campaign: Campaign being served. agent: Agent who handled the interaction. duration: Active time of the interaction. clientId: Identifier of the user being served (depends on the channel). channel: Channel through which the interaction was handled.
| {"event":"FinishInteraction","date":"2023-06-13 06:06:01","guid":"92bda9c4-e224-4cbf-8a01-8ca73e3a18b6","campaign":"testDoc","agent":"AgentTest","duration":80,"clientId":"59894567987","channel":"sms"} |
{"event":"FinishInteraction","date":"2023-31-13 07:31:09","guid":"88ab4551-840b-4306-9980-de96f7684067","campaign":"Demo<-","agent":"AgentTest","duration":23,"clientId":"1234","channel":"telephony"} |
{"event":"FinishInteraction","date":"2023-21-13 06:21:50","guid":"b5779746-f17e-4f8c-92dd-9c8597d9de51","campaign":"test","agent":"AgentTest","duration":12,"clientId":"test@outlook.com","channel":"email"} |
{"event":"FinishInteraction","date":"2023-23-14 01:23:07","guid":"5b28473b-34ef-4a26-8ba7-50e1b18584ee","campaign":"Campana2","agent":"AgentTest","duration":29,"clientId":"test@test.com","channel":"webchat"} |
|
InteractionDisposition | This event will be executed when an agent of uContact categorizes a telephony interaction. | guid: Interaction Guid. campaign: Campaign of attention. agent: Handling Agent. value1: Disposition level 1. value2: Disposition level 2. value3: Disposition level 3. channel: Channel of interaction.
| {"event":"InteractionDisposition","date":"2023-10-23 17:56:54","guid":"0c0f1192-3ee3-4e83-8e18-5b0ea44508b6","campaign":"Outbound->","callerId":"33333333333333","agent":"desarrollo","value1":"nivel1","value2":"nivel2","value3":"nivel3","channel":"telephony"} |
|
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.