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

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.

  • agent: Username.

  • isLogin: Data that will only return 'true' or 'false' depending on whether it is a login or logoff, respectively.

{"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.

  • agent: Username

  • motive: Break motive

  • isBreak: Data that will only return 'true' or 'false' depending on whether it is a break or unbreak event.

{"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.

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.

 

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.