Who should read this article: Developers
Embed the Voiso Agent Workspace into your application, and integrate WhatsApp templates, click-to-call, SMS, and interaction data using the Voiso v4 API.
Introduction
The Voiso Omnichannel Workspace provides a unified platform for agents to seamlessly manage customer interactions across various communication channels. This document provides a step-by-step guide for embedding the Omnichannel Agent Workspace into your application using an iframe, including key technical and functional considerations.
Prerequisites
1. Digital Channel Provisioning
Ensure that the Omnichannel feature is enabled for your Voiso contact center. Please contact your Voiso representative if this feature is not currently activated.
2. WhatsApp Number and Template Approval
WhatsApp should be enabled for your contact center. Make sure that your WhatsApp business profile is set up and the template approval process is completed.
How to Access the Agent Workspace Inside Your Application
You can embed the Voiso Agent Workspace as an iframe within your application. The workspace consolidates all agent activities across both traditional channels (voice, SMS) and digital channels (WhatsApp, Viber, webchat, etc.).
Steps to Embed the Iframe
1. Omnichannel Workspace URL
Access the Omnichannel Workspace using the following URL pattern:
https://{{cluster}}.voiso.com/omnichannel
Example:
https://cc-ams05.voiso.com/omnichannel
<iframe
src="https://{{cluster}}.voiso.com/omnichannel"
width="1300"
height="768"
style="border: none;"
allow="microphone; autoplay">
</iframe>
Contact your Voiso representative if you are unsure about the name of your contact center cluster.
2. Mandatory Setup Requirements
- Minimum Display Resolution: 1300 x 768 pixels for optimal rendering.
- Microphone Access: Set the
microphone-allowedflag within the iframe. - CORS Enablement: Contact your Voiso representative to enable CORS for your IP address.
3. User Authentication
- Agents must authenticate using their Voiso username and password credentials.
- User login sessions remain active until the agent logs out manually or is forced logout by the system due to inactivity.
- Ensure that the email address of your application users matches that of the Voiso agent for seamless integration.
How to Initiate Interactions from Your Application
To initiate interactions, integrate the following Voiso APIs into your application.
1. Sending WhatsApp Templates to a Contact
You can send WhatsApp templates to existing CRM contacts using the following APIs.
List Templates
| Method | GET |
| Endpoint | /api/v4/messaging/whatsapp_templates |
| Required scope | messaging.whatsapp_templates.read |
| Docs | List WhatsApp Templates |
Also available — retrieve a single template:
| Method | GET |
| Endpoint | /api/v4/messaging/whatsapp_templates/{id} |
| Docs | Get WhatsApp Template |
Send a Template
A WhatsApp template is sent by starting a new conversation, or as a message within an existing conversation.
Start a new conversation (the first message must be a WhatsApp template):
| Method | POST |
| Endpoint | /api/v4/messaging/conversations |
| Required scope | messaging.conversations.manage |
| Docs | Create Conversation |
Send a WhatsApp template in an existing conversation (content_type: whatsapp_template):
| Method | POST |
| Endpoint | /api/v4/messaging/conversations/{conversation_id}/messages |
| Required scope | messaging.conversations.manage |
| Docs | Create Message |
2. Initiate an Outbound Call (Click-to-Call) from Your Application
Use the Voiso Click-to-Call API to initiate an outbound call to a phone number.
| Method | POST |
| Endpoint | /api/v4/voice/calls |
| Required scope | voice.call.manage |
| Docs | Start Call |
Also available — end an active call:
| Method | POST |
| Endpoint | /api/v4/voice/calls/{call_id}/hangup |
| Docs | Stop Call |
3. Send SMS from Your Application
Use the Voiso Send SMS API to send an SMS to a phone number.
| Method | POST |
| Endpoint | /api/v4/messaging/sms |
| Required scope | messaging.sms.send |
| Docs | Create SMS |
How to Log Interaction Data in Your Application
Log details of interactions by subscribing to Voiso webhooks. Voiso webhooks provide real-time notifications for specific events. For more information on webhook structure, see the Webhook Overview & Object Model developer guide.
1. Call Events
call.answered— triggers when a call is picked up.call.hangup— triggers when a call is hung up.call.ended— triggers when a post-call is completed.
See the developer guides for inbound, outbound, and dialer call events.
2. Digital Interaction Events
message.received— triggers when a new message arrives.conversation.ended— triggers when a conversation is archived.
See the developer guide for digital interaction events.
Batch Data Synchronization with APIs
To synchronize interactions in batch mode, typically once a day, use the following APIs.
1. CDR API
| Method | GET |
| Endpoint | /api/v4/reporting/cdrs |
| Required scope | reporting.cdrs.read |
| Docs | List CDRs |
All interactions (voice and digital channel) are added to a CDR record; you can filter them using the type parameter.
2. Messages API
| Method | GET |
| Endpoint | /api/v4/messaging/conversations/{conversation_id}/messages |
| Required scope | messaging.conversations.read |
| Docs | Get Conversation Messages |
The content of text and media messages within a digital conversation is accessible through the Messages API, including WhatsApp.
Required Scopes
The table below summarizes every scope referenced in this guide, for use when provisioning API credentials.
| Scope | Grants |
|---|---|
messaging.whatsapp_templates.read |
Read WhatsApp templates |
messaging.conversations.manage |
Send messages, including WhatsApp templates |
messaging.conversations.read |
Read conversation messages |
messaging.sms.send |
Send SMS |
voice.call.manage |
Click-to-call and hangup |
reporting.cdrs.read |
Read CDR records |
Additional Documentation
For more detailed information, please refer to the following resources: