Webhooks overview

API Docs by APIMATIC
Webhooks

Webhooks overview
#

Introduction
#

Webhooks facilitate real-time communication between websites or applications by allowing one application to send HTTP requests, including payload data, to another application when a predefined event or trigger occurs.

With the Voiso Webhooks feature, developers can subscribe to call events, offering numerous advantages for custom integrations and automated tasks:

  • Real-time updates: Receive instant notifications or data updates when specific call events occur.
  • Simplified integration: Transmit data between applications seamlessly without continuous polling.
  • Efficient resource usage: Data is only sent when an event occurs, reducing unnecessary network traffic and server load.
  • Automation: Streamline workflows and enhance overall efficiency in application development and management.

The Webhooks page
#

Add and manage your webhooks using the Webhooks page. For more information, refer to Webhooks in the Voiso Documentation Portal.

Webhook response
#

When coding your response to the webhook, note that Voiso expects an HTTP 200 status code to indicate a successful operation. If no response is received, Voiso assumes that the request timed out or an error occurred.

Supported events
#

The Webhooks feature supports the following call events:

EventDescriptionWebhook
outbound.call.answeredA contact answers an outbound call.Outbound calls
outbound.call.hangupAn outbound call ends.Outbound calls
outbound.call.endedAn outbound call is completed.Outbound calls
inbound.call.answeredAn agent answers an inbound call.Inbound calls
inbound.call.hangupAn inbound call ends.Inbound calls
inbound.call.endedAn inbound call is completed.Inbound calls
dialer.call.answeredAn agent is connected to a Dialer call answered by a contact.Outbound dialer campaigns
dialer.call.hangupA Dialer call ends.Outbound Dialer campaigns
dialer.call.endedA Dialer call is completed.Outbound Dialer campaigns
message.receivedAn agent receives a new reply in an ongoing conversation.Digital interactions
conversation.endedA digital conversation is archived (ends), and an agent assigns a wrap-up code.Digital interactions

Voiso webhook structure
#

Voiso webhooks employ the POST method with the HTTP request protocol when sending data. Requests are structured as follows:

ParameterDescriptionData type
nameThe name of the webhook.string
eventOne of the supported Voiso contact center events. Refer to Supported events.string
objectThe name of the contact center object associated with the webhook data. Objects include call, message, and conversationstring
timestampThe timestamp indicates when the event triggering the webhook occurred.string
secretEach webhook should have a unique contact center key, secret key, or user-defined token. The external system uses this key to validate the authenticity of the webhook.string
contact_center_idThe UUIS of your contact center.string
dataThe payload data contained within the webhook. The structure and content of the payload vary depending on the specific event and object involved. It can be a simple or nested structure, accommodating different scenarios. Refer to individual webhook descriptions for payload details.Simple or nested structure

Common call event objects
#

The webhooks for outbound, inbound, and dialer events use one or more of the following common objects:

  • Call object
  • Duration object
  • Wrap-up code object
  • Campaign object

Call object
#

ParameterDescriptionData typeNotes
idUUID of the callstring
typeThe type of call.stringValid values are: outbound, click to call, queue callback, scheduled callback,inbound, and dialer.
start_timeThe start time of the call.stringA timestamp in ISO 8601 format (UTC time zone).
end_timeThe end time of the call.stringA timestamp in ISO 8601 format (UTC time zone).
agent_start_timeThe timestamp when the agent was connected.stringA timestamp in ISO 8601 format (UTC time zone).
durationDetails of the duration of the call.structureRefer to the Duration object table.
dispositionA disposition code to specify whether the interaction was successfully completed, and if not, why not.stringRefer to Disposition codes.
queueThe name of the inbound queue.stringFor inbound calls.
end_reasonAnd end reason code to specify why the interaction was terminated.stringRefer to End reasons.
scriptThe name of the inbound flow script.string
flowThe name of the inbound flow.stringRefer to Flows.
calling_numberThe ANI of the call.stringIn E.164 format without the preceding '+'. For example: 447414992548
called_numberThe DNIS of the call.stringIn E.164 format without the preceding '+'. For example: 447414992548
wrapup_codeThe call outcome specified by the agent.structureRefer to the Wrap-up code object table. For information about wrap-up codes, refer to Wrap-up codes.
notesCall notes added by the agent.stringUp to 280 characters. Refer to Call notes
ext_user_idThe external CRM ID for the contact.stringThe account_id received from the Start call API.
cdr_urlThe URL of the call recording.string
campaignInformation about the Dialer campaign associated with the call.structureRefer to the Campaign object table.

Duration object
#

The Duration object is a sub-object of the Call object.

ParameterDescriptionData typeNotes
totalThe total duration of the call in seconds.number
queue_timeThe duration, in seconds, that the inbound call remained in the queue.number
dialing_timeThe duration, in seconds, from when a call was initiated until the call was successfully connected.number
dialer_waitingThe duration, in seconds, that the Dialer was in the waiting state.number
talk_timeThe duration, in seconds, of the interaction Talk Time.number
hold_timeThe duration, in seconds, that the interaction was in the Hold state.number
postcall_timeThe duration, in seconds, that the call was in the Postcall state.number

Wrap-up code object
#

The Wrap-up code object is a sub-object of the Call object. Refer to Wrap-up codes.

ParameterDescriptionData typeNotes
codeThe wrap-up code value.string
descriptionThe text description of the wrap-up code.string

Agent object
#

The Agent object is a sub-object of the Call object. Refer to Users.

ParameterDescriptionData typeNotes
idThe ID of the agent who handled the interaction.number
nameThe name of the agent who handled the interaction.string
emailThe sign-in email address of the agent who handled the interaction.string
extensionThe contact center extension of the agent who handled the interaction.string

Campaign object
#

The Campaign object is a sub-object of the Call object. Refer to Campaigns page.

ParameterDescriptionData typeNotes
idThe ID of the Dialer campaign.number
nameThe name of the Dialer campaign.string
is_liveWhether or not the Dialer campaign is of type Live.stringSupported values are True or False.

Common digital interaction event objects
#

The webhooks for digital events use one or more of the following common objects:

  • Conversation object
  • SLA object
  • Agent object
  • Message object
  • Content Data objects
  • Contact object
  • Channel object

Conversation object
#

ParameterDescriptionData typeNotes
idThe UUID of the conversation.string
wrapup_codeThe interaction outcome specified by the agent.structureFor information about wrap-up codes, refer to Wrap-up codes.
queueThe name of the inbound queue.stringFor inbound interactions.
dispositionA disposition code to specify whether the interaction was successfully completed, and if not, why not.stringThe following values are supported: waiting, active, archived, and initiated. Refer to Disposition codes.
sourceThe source of the interaction.stringThe following values are supported: user and business.
cpcThe cost of the interaction.numberIn US dollars.
slaService level agreement values.objectRefer to the SLA object table.

SLA object
#

The SLA object is a sub-object of the Conversation object.

ParameterDescriptionData typeNotes
time_to_first_responseThe time in seconds to the first agent's response to the interaction.number
time_to_resolutionThe time in seconds to the first resolution/archive of the interaction.number
time_to_replyThe average waiting time in seconds for the agent's repliesnumber

Agent object
#

ParameterDescriptionData typeNotes
idThe ID of the agent who handled the interaction.number
nameThe name of the agent who handled the interaction.string
emailThe sign-in email address of the agent who handled the interaction.string
extensionThe contact center extension of the agent who handled the interaction.string

Message object
#

ParameterDescriptionData typeNotes
idThe UUID of the message.string
conversation_idThe UUID of the associated conversation.stringRefer to the Conversation object table.
reference_idThe Reference Message ID.string
content_typeThe content type of the message.string enumSupported values are: text, image, document, video, voice, and audio. Refer to the Content Data objects table.

Content Data objects
#

The Content Data objects are sub-objects of the Message object.

The following table describes the content data for text messages:

ParameterDescriptionData typeNotes
textThe body of the message sent by the contact.string

The following table describes the content data for media messages (attachments):

ParameterDescriptionData typeNotes
filenameThe name of the attached file.string
sizeThe size in bytes of the attached file.number
captionText description of the file.stringCan be empty.
media_urlThe URL of the attached file.string

Contact object
#

ParameterDescriptionData typeNotes
idThe ID number of the channel in your contact center.number
usernameThe username or name of the contact.string
channel_identifierThe identifier of the channel.stringThis can be a username or a UUID.

Channel object
#

ParameterDescriptionData typeNotes
idThe UUID of the channel in your contact center.string
typeThe digital channel type.stringSupported values include: whatsapp, chat, facebook, instagram, telegram, and viber.
nameThe name associated with the channel in your contact center.string

Was this page helpful?

Thank you! Your feedback has been received.