API Integration for Developers

Simply. Call an API

Drive Productivity

Boost Revenue

Innovate

Try for Free

ZIWO Slack Community

Join Here

Install WebPhone

Install ZIWO Web Phone in minutes in your own CRM or web app, where you can use your business number to communicate with staff and clients. Just copy the script and paste it inside your app. Agents connect directly from their web app and access all ZIWO superpowers right from your app: receive, place or transfer calls, view their call history or even change their status.

Step 1: “Copy /paste the “script ” in your application,

<script>
// JOREL CONFIGURATION
// Contact center configuration
let contactCenterName = ''; //If left empty Jorel will be in non call center specific mode. User will have to enter its call center name on login.
// Default display configuration
let defaultPosition = 'top-right'; //Choose between 'bottom-right', 'bottom-left', 'top-right' and 'top-left'. Initial if not set is 'bottom-right'.
let defaultSize = 'normal'; //Choose between 'normal', 'small' and 'mini'. Initial if not set is 'normal'.
// Settings
let defaultRegionCode = ''; //Used for local phone numbers used in the API, if you want to set one use the corresponding 2 letters country code. None set by default;
let fixedPositionAndSize = false; //By default false;
let deactivateMinimization = false; //By default false;
let deactivateConsoleOutput = false; //By default false;
// JOREL SCRIPT INITIALISATION
// Initialisation
setJorelConfiguration();
addJorelScriptLoader();
// Functions for initialisation
function addJorelScriptLoader() {
const jorelScriptLoader = document.createElement('script');
jorelScriptLoader.id = 'jorelScriptLoader';
jorelScriptLoader.type = 'text/javascript';
jorelScriptLoader.async = true;
jorelScriptLoader.src = 'https://jorel.ziwo.io/master/latest/jorel.js';
jorelScriptLoader.src += '?v=' + Date.now(); //Prevents caching
document.body.prepend(jorelScriptLoader);
}
function setJorelConfiguration() {
if (contactCenterName) localStorage.setItem('_jorel-ccName', contactCenterName);
localStorage.setItem('_jorel-default-position', defaultPosition);
localStorage.setItem('_jorel-default-size', defaultSize);
localStorage.setItem('_jorel-default-phone-number-region-code', defaultRegionCode);
localStorage.setItem('_jorel-fixed', fixedPositionAndSize);
localStorage.setItem('_jorel-no-minimization', deactivateMinimization);
localStorage.setItem('_jorel-no-console-output', deactivateConsoleOutput);
}
</script>

Step 12: Put your Ziwo instance URL, and get it connected instantly. Don’t have a Ziwo POC? Get it Here.

Manual Login

There are 3 fields to fill when you manually login to WebPhone :

– contact center name (“your instance”)

– username (“yourusername@provider.com”)

– password (“secretpassword”)

After your manual login into ZIWO Web phone, some fields will be stored for a while in local so that you do not need to re-log again each time you refresh the page.

Auto Login

If in your integration you want to always skip this first initial manual login authentication, you can set these fields in local storage so that ZIWO Web phone always auto-connects !

Step 1: Here are the fields which needs to be set :
– “_jorel-token”
– “_jorel-ccName”

Step 2: The first item to be stored is _jorel-token. It should correspond to the token an agent get after login to ZIWO, through API /auth/login. (“see: ZIWO API doc, section auth/login”)

Step 3: The second item to be stored is _jorel-ccName. It should correspond to the contact center name of your instance. For example, if your instance is wayne-enterprise.aswat.co, it should correspond to wayne-enterprise

WebPhone Parameter

Jorel is a ZIWO Web phone that can be integrated in any web app or CRM. Agents are connecting right in their web app and get all the functionalities to receive and place calls, view their call history or even change their status.

_jorel-token”“_jorel-ccLogin”“_jorel-ccName”Getting them via WebPhone means you don’t have to bother on getting or even generating them from our API.You can find their various uses in the Ziwo full API documentation !
Learn More

Call History

You can fetch call history using ZIWO Web phone (web phone) events

Step 1: Enter URL https://your-ziwo-api.aswat.co/callHistory/46
Step 2: Enter the desired parameter for ID. This endpoint gets a CDR by given id.

<script>
HEADERS
access_token b10c6840-a9e7-11e8-8476-8d2a2f09b159
</script>

Fetch Recordings

You can fetch call recording MP3 file using ZIWO Web phone (web phone) events.

Step 1: Enter URL https://your-ziwo-api.aswat.co/surveillance/recordings/<CallID>.mp3
Step 2: Enter the desired parameter for CallID. This endpoint downloads a recording MP3 file for the CDR identified by the given CallID (UUID of the CDR).

 

<script>
HEADERS 
access_token b10c6840-a9e7-11e8-8476-8d2a2f09b159
</script>

Click to Call

Click to Call
You can make any phone numbers of you web app clickable to generate a call by the agent !
Step 1: In the agent app : Agent clicks to generate a call for himself
You can directly use the ZIWO Web phone function for calling a phone number !This function can be called via : “window[‘_jorel-callPhoneNumber’]”.
It takes the phone number in international format as String parameter.
Add screenshot / videocast
Step 2: In the admin app : Admin clicks to generate a call for an agent
This is useful if you want to allow a manager wants to create a call for an agent.
For this you need simply need to use this endpoint of our REST API

CRM Profile Pop-up

This is an example of how to use ZIWO Web phone event broadcasting of call states, but they are many others depending on your business and web app !

Step 1: Scenario

You have a CRM containing information on the customers you are calling or who are calling you. You want the agent to automatically get access to the customer CRM data when the call is active, by opening a pop-up page with this data (for which your CRM has an URL).

Step 2: Conception using ZIWO Web phone documentation

Using the ZIWO Web phone documentation, you can see the various jorel events meaning and the outbound and inbound call flows. From this you can see that the appropriate events to use for the pop-up opening are the ‘ringing’ one for inbound calls and the ‘early’ one for the outbound calls.

EVENTS MEANING
Call verto events are broadcasted from the “window” element with the prefix : ‘_jorel-dialog-state-‘ with suffix amongst :

SUFFIX MEANING PRESENT IN DIRECTION
‘requesting’ Requesting operator to make the call Outbound
‘trying’ Operator trying to make the call Outbound
‘early’ Call is waiting for customer to pick up Outbound
‘ringing’ Call is ringing agent phone Inbound
‘answering’ Agent is answering call Inbound
‘active’ Agent and customer can talk to each other Both
‘held’ Customer has been put on hold by the Agent Possible in both
‘hangup’ Call is being hanged up Both
‘destroy’ Call is being destroyed Both
‘recovering’ When reconnecting to virtual phone and a call wasn’t over, Jorel automatically recovers it ! Possible in both
EVENTS DATA
If browser supports “CustomEvent” class, the “event.detail” object will have the following attributes :
ATTRIBUTE MEANING
callID Id of the current leg of the call
primaryCallID Id of the primary / initial leg of the call
customerNumber Phone number of the customer called or calling
direction ‘outbound’, ‘inbound’, ‘internal’ or ‘service’
stateFlow Array listing the states the call went through, with the date for each (Properties of the objects in the array: ‘state’, ‘date’, ‘dateUNIX’)
currentCall Full data of the call, including the ones above and much more
dialog Similar to the above currentCall, but also allows to interract with the call state for example by answering or hanging up. (See verto documentation for full details of possible interractions)
EVENTS FLOW FOR OUTBOUND CALL:
requesting
trying
early
active
hangup
destroy
EVENTS FLOW FOR INBOUND CALL:
ringing
answering
active
hangup
destroy

 

Also for getting the CRM data you need to use the customer phone number. Using the documentation you can see that you’ll find it in the event details with “event.detail.customerNumber”.

Step 3: Implementation in JS

From what we gathered above here is a script you can use for your pop-up opening. You simply need to complete its first function, which gets the CRM URL from the customer phone number !

 

<script>
function getCrmUrlFromPhoneNumber(customerNumber) {
// Here include your CRM logic to get the customer data URL from the customer phone number
// This function can either return a String or a Promise resolving a String
}
async function openingCustomerPopUpFromEvent(event) {
window.open(await getCrmUrlFromPhoneNumber(event.detail.customerNumber));
}
window.addEventListener('_jorel-dialog-state-ringing', openingCustomerPopUpFromEvent);
window.addEventListener('_jorel-dialog-state-early', openingCustomerPopUpFromEvent);
</script>

Fetch Voicemail

You can fetch call history using ZIWO Web phone (web phone) events.

Step 1: Enter URL https://your-ziwo-api.aswat.co/surveillance/recordings/.mp3

Step 2: Enter the desired parameter for CallID. This endpoint downloads a recording MP3 file for the CDR identified by the given CallID (UUID of the CDR).

 

<script>
HEADERS 
access_token b10c6840-a9e7-11e8-8476-8d2a2f09b159
</script>

Verto Integration

May 27, 2019
Rolling out the red carpet for ASWAT verto integrations
With 200+ API and live sockets, integrate with Ziwo& leverage the power of your customer data.
More

Call Whispering

How to implement Call Whispering?

Step 1: POST Create Eavesdrop
https://your-ziwo-api.aswat.co/live/calls/eavesdrop/5555This initiates a eavesdrop call which let’s user to listen to an agent’s live conversation with the customers. This call can also be updated to speak/listen to agent/both. When the specified agent is not on a call, this eavesdrop call plays a hold music.Step 2: This initiated eavesdrop call rings the current user at his/her default position (unless position name is explicitly specified). Hence the position needs to be connected before invoking this API.Step 3: Check positions module on how to connect this position. Also, currently the call initiated will not be auto answered by the backend, the client needs to implement the logic to auto answer the call. Once the call is answered, whenever target agent is not on a call, hold music will be played, whenever the target agent is on a call, the admin user can listen to live conversation and optionally speak to the agent or both (Check Update Eavesdrop below).Step 4: : Permissions are based on new permission field eavesdrop in the role.permissions. Visit roles section for more information. Hence please ensure you set necessary permissions for make use of this feature.

 

<script>
ADMIN, >=v1.4.2-beta
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
</script>

positionName
mydesk
Optionally pass the name of the position from where call should be initiated.

Example Request

Success
curl –location –request POST “https://your-ziwo-api.aswat.co/live/calls/eavesdrop/5555” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “”

Example Response

200 - OK
{
“result”: true,
“content”: {
“callID”: “3f159fc0-0576-469f-8a16-aa3a69e20db2”
},
“info”: {}
}


PUT Update Eavesdrop

Step 1: https://your-ziwo-api.aswat.co/live/calls/eavesdrop/e0a89fd6-f0da-481e-9372-622e6eb09ec2

Step 2: This endpoint allows user to update the eavesdrop channel/call identified by the callID. Currently it supports toggling the whisper state (agent, both, none).

 

<script>
ADMIN, >=v1.4.2-beta
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
</script>

whisper
agent
Toggle between whisper states. Available options are (agent, both and none).

Example Request

Success
curl –location –request PUT “https://your-ziwo-api.aswat.co/live/calls/eavesdrop/e0a89fd6-f0da-481e-9372-622e6eb09ec2” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “whisper=agent”

Example Response

200 - OK
{
“result”: true,
“content”: {},
“info”: {}
}

Call Masking

How to implement Call Masking

Admin – Call Trackers

Step 1: The Call Trackers module can be used for dynamic handling the incoming calls by making a web service request to external service. This

Step 2: To implement these services from your end, you can look into example start and end request here:
https://api.ziwo.io/view/1450071/RWToNwzB?version=latest#00a05a01-9a69-4277-862a-dd5f575c6717

Call Trackers (examples)
https://api.ziwo.io/view/1450071/RWToNwzB?version=latest#3c736d8b-f266-431d-a704-132e89d9e8ed
This section is just for demonstration on how call tracker urls have to be implemented.

POST Start Call example
https://your-ziwo-api.aswat.co/callTrackers/example/startCall
This endpoint returns dummy values which demonstrates how the start call url has to be implemented in the integrations. In reality, this API will be outside stark, when there is an incoming call, Stark makes request to this (as detailed in the request section) and expects a response which is demod in the response section. Based on the response, next set of actions for the call will be executed.

 

 

<script>
HEADERS
________________________________________
X-API-Key
some-random-uuid-comes-here
BODY formdata
________________________________________
</script>

didCalled
061234567
This is the didDialed number.

Example Request

Success
curl –location –request POST “https://your-ziwo-api.aswat.co/callTrackers/example/startCall” \
–header “X-API-Key: some-random-uuid-comes-here” \
–form “didCalled=061234567”

 

Example Response

200 - OK
{

“result”: true,
“content”: {
“didCalled”: “061234567”,
“rules”: [
{
“action”: “call”,
“number”: “0505874603”,
“callerID”: “042789926”,
“timeout”: 10

}

POST End call example
https://your-ziwo-api.aswat.co/callTrackers/example/endCall
This endpoint makes a dummy request (nothing will be stored in the db) which demonstrates how the end call url has to be implemented in the integrations. In reality, this API will be outside stark, when there is an incoming call completion, Stark makes request to this (as detailed in the request section) and expects a response which is demod in the response section. Once this url receives the request with call details integration can make necessary actions.

 

<script>
HEADERS
________________________________________
X-API-Key
some-random-uuid-comes-here
Content-Type
application/json
BODY raw
________________________________________
</script>

 

{
“callID”: “fdf893f5-ff46-44a9-ac63-7491e7b09dce”,
“answeredRawTime”: 1468150607,
“hangupBy”: “originatee”,
“audioQuality”: “100”,
“duration”: 28,
“createdAt”: “2016-07-10T11:37:03.944Z”,
“callerIDName”: “044508146”,
“recordingFile”: “fdf893f5-ff46-44a9-ac63-7491e7b09dce.mp3”,
“direction”: “inbound”,
“updatedAt”: “2016-07-10T11:37:03.944Z”,
“callerIDNumber”: “044508146”,
“endRawTime”: 1468150623,
“endDateTime”: “2016-07-10T11:37:03.000Z”,
“holdTime”: 0,
“startRawTime”: 1468150595,
“callLegSide”: “unknown”,
“hangupCause”: “NORMAL_CLEARING”,
“disposition”: “ANSWER”,
“agentCCLogin”: “unknown”,
“startDateTime”: “2016-07-10T11:36:35.000Z”,
“answeredDateTime”: “2016-07-10T11:36:47.000Z”,
“didCalled”: “061234567”,
“channelName”: “sofia/internal/position-01@172.16.2.18”,
“position”: “0505874603”,
“gateway”: “external”,
“status”: “active”,
“id”: “46:5196”,
“version”: “3”,
“extendedInfo”: {
“numbers”: {
“createdAt”: “2016-07-10T06:24:20.420Z”,
“linkData”: “callTracker-01”,
“didDisplay”: “061234567”,
“didCalled”: “061234567”,
“linkType”: “callTracker”,
“did”: “061234567”,
“updatedAt”: “2016-07-10T08:11:07.086Z”,
“status”: “active”,
“id”: “19:8278”,
“version”: “44”
}
},
“callFlows”: [
{
“callID”: “fdf893f5-ff46-44a9-ac63-7491e7b09dce”,
“transfered”: false,
“extensionName”: “general_incoming”,
“createdAt”: “2016-07-10T11:37:03.953Z”,
“extensionNumber”: “061234567”,
“step”: 1,
“hangup”: true,
“updatedAt”: “2016-07-10T11:37:03.953Z”,
“status”: “active”,
“id”: “50:2071”,
“version”: “2”
}
]
}

Link :
https://api.ziwo.io/view/1450071/RWToNwzB?version=latest#3c736d8b-f266-431d-a704-132e89d9e8ed

Step 3: When a call lands as an incoming call through one of the DID numbers configured, the platform can request an external web service to fetch the list of rules – e.g. Call 061234567 for 10 seconds and if the call fails or is not answered then route the call to another number 047654321 etc. There can be n-number of rules and each rule can have its own timeout value. When the call ends, the CDR is also posted to the external service defined when creating the call tracker.

Step 4: Each call tracker request can have a voicemail feature where in if the call is not answered by any of the numbers set then the call is sent to a voicemail server. This feature can be controlled by a flag.

Step 5: All the logs for both start call and end call can be fetched as well. There are different type of requests possible for this module, as listed below
Get the list of call trackers Get a specific call tracker Create a call tracker Update a call tracker Block a call tracker Unblock a call tracker Delete a call tracker Get logs for a call tracker

GET Get Call Trackers

https://your-ziwo-api.aswat.co/admin/callTrackers/?limit=1&skip=0&search&order
This endpoint retrieves all the call trackers.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
PARAMS
________________________________________
</script>

limit
1
Number of items to be retrieved (max limit allowed is 50). It is recommended to use paginated results using limit and skip than fetching all in a single request

skip
0
Number of items to be skipped before applying limit (default is 0)

search
Filter items by keyword

order
Sort by a specific field (Prefix ~ for reversed order, eg: order=~did)

Example Request

Success
curl –location –request GET “https://your-ziwo-api.aswat.co/admin/callTrackers/?limit=1&skip=0&search&order” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159”

 

Example Response

200 - OK
{
“result”: true,
“content”: {
“id”: 1,
“name”: “CT”,
“startRequestURL”: “http://127.0.0.1:7000/callTrackers/example/startCall”,
“endRequestURL”: “http://127.0.0.1:7000/callTrackers/example/endCall”,
“startRequestAPIKey”: null,
“endRequestAPIKey”: null,
“startRequestTimeout”: null,
“endRequestTimeout”: null,

GET Get Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers/1callTrackers

This endpoint retrieves a specific call tracker by id.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY formdata
________________________________________
</script>

 

Example Request

Success
curl –location –request GET “https://your-ziwo-api.aswat.co/admin/callTrackers/1” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159”

Example Response

200 - OK
{
“result”: true,
“content”: {
“id”: 1,
“name”: “CT”,
“startRequestURL”: “http://127.0.0.1:7000/callTrackers/example/
startCall”,
“endRequestURL”: “http://127.0.0.1:7000/callTrackers/example/endCall”,
“startRequestAPIKey”: null,
“endRequestAPIKey”: null,
“startRequestTimeout”: null,
“endRequestTimeout”: null,

POST Create Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers
This endpoint creates a new call tracker.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
</script>

name
calltracker-01
Name of the call tracker.

startRequestURL
https://ct.example.com/start.php
The webservice to call during the call start, this URL should respond with the rules in a certain structure which Stark can understand and process the call accordingly.

startRequestAPIKey
If the call tracker requires an authenticated request then the platform will send the request with X-API-KEY in the headers

startRequestTimeout
10000
The number of milliseconds to wait for request to startUrl.

endRequestURL
https://username:password@ct.example.com:8080/end.php
The webservice to call during the end of the call.

endRequestAPIKey
The API Key to be passed from Stark to this end url, if it needs a key based authentication to ensure request is coming from Stark and nowhere else.

endRequestTimeout
10000
The number of milliseconds to wait for request to endUrl.

welcomePlayback
Music to play as a welcome music when the call lands to the platform (provide only the storage hash)

errorPlayback
Music to play if an error occurs while requesting the call tracker server (provide only the storage hash)

Example Request

Create Call Tracker
curl –location –request POST “https://your-ziwo-api.aswat.co/admin/callTrackers” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “name=calltracker-01&startRequestURL=https%3A//ct.example.com/start.php&startRequestAPIKey=&startRequestTimeout=10000&endRequestURL=https%3A//username%3Apassword@ct.example.com%3A8080/
end.php&endRequestAPIKey=&endRequestTimeout=10000&welcomePlayback=&errorPlayback=”

PUT Update Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers/1
This endpoint updates the call tracker by id.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
startRequestURL
</script>

 

https://ct.example.com/start.php
The webservice to call during the call start, this URL should respond with the rules in a certain structure which Stark can understand and process the call accordingly.

startRequestAPIKey
If the call tracker requires an authenticated request then the platform will send the request with X-API-KEY in the headers

startRequestTimeout
10000
The number of milliseconds to wait for request to startUrl.

endRequestURL
https://username:password@ct.example.com:8080/end.php
The webservice to call during the end of the call.

endRequestAPIKey
The API Key to be passed from Stark to this end url, if it needs a key based authentication to ensure request is coming from Stark and nowhere else.

endRequestTimeout
10000
The number of milliseconds to wait for request to endUrl.

welcomePlayback
Music to play as a welcome music when the call lands to the platform (provide only the storage hash)

errorPlayback
Music to play if an error occurs while requesting the call tracker server (provide only the storage hash)

Example Request

Success
curl –location –request PUT “https://your-ziwo-api.aswat.co/admin/
callTrackers/1” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “startRequestURL=https%3A//ct.example.com/start.php&startRequestAPIKey=&startRequestTimeout=10000&endRequestURL=https%3A//username%3Apassword@ct.example.com%3A8080/
end.php&endRequestAPIKey=&endRequestTimeout=10000&welcomePlayback=&errorPlayback=”

Example Response
200 - OK
{
“result”: true,
“content”: {},
“info”: {}
}

PUT Block Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers/calltracker-01/block
This endpoint blocks a call trakcer by id or name.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
</script>

 

Example Request

Success
curl –location –request PUT “https://your-ziwo-api.aswat.co/admin/
callTrackers/1/block” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “”
Example Response
200 - OK
{
“result”: true,
“content”: {},
“info”: {}
}

PUT Unblock Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers/1/unblock
This endpoint unblocks a call tracker by id or name.
This endpoint blocks a call trakcer by id or name.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
</script>

 

Example Request

Success
curl –location –request PUT “https://your-ziwo-api.aswat.co/admin/
callTrackers/1/unblock” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “”

Example Response
200 - OK
{
“result”: true,
“content”: {},
“info”: {}
}

DEL Delete Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers/calltracker-01
This endpoint deletes a call tracker by id or name.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
________________________________________
</script>

 

Example Request

Success
curl –location –request DELETE “https://your-ziwo-api.aswat.co/admin/
callTrackers/1” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159” \
–data “”

Example Response
200 - OK
{
“result”: true,
“content”: {},

“info”: {}
}

GET Get Call Tracker Request Logs
https://your-ziwo-api.aswat.co/admin/
callTrackers/logs?fromDate=2015-01-01&toDate=2017-01-01&fetchStart=0&fetchStop=50&callTrackers[]=1

This endpoint retrieves logs of the call tracker.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
PARAMS
________________________________________
</script>

fromDate
2015-01-01
Optionally filter by from date.

toDate
2017-01-01
Optionally filter by to date.

fetchStart
0
This is use to paginate the result set e.g. setting fetchStart=30 means it will output the result set from the 30th log.

fetchStop
50
This is the number of records to fetch per page for pagination. e.g. setting fetchStop=100 will fetch 100 logs from the starting point as fetchStart

callTrackers[]
1
Optionally filter by call tracker ids.

BODY formdata
________________________________________

Example Request

Get Call Tracker Request Logs
curl –location –request GET “https://your-ziwo-api.aswat.co/admin/
callTrackers/logs?fromDate=2015-01-01&toDate=2017-01-01&fetchStart=0&fetchStop=50&callTrackers%5B%5D=1” \
–header “access_token: b10c6840-a9e7-11e8-8476-8d2a2f09b159”

PUT Test Call Tracker
https://your-ziwo-api.aswat.co/admin/callTrackers/2/test
This endpoint is to test the call tracker setup. This endpoint initiates requests to start and end url with dummy callId and other required informations. This API also returns the status of the test.

 

<script>
HEADERS
________________________________________
access_token
b10c6840-a9e7-11e8-8476-8d2a2f09b159
BODY urlencoded
</script>

Use Autodialer

Chase Abondoned calls

Auto Call Back

Subscription renewal

Call Tracking

Auto Call Back

Ziwo’s Web CallBack Implementation

Ziwo’s WebCall Back implementation is simple and easy. It starts with the web console of your website.

Step 1: Open the footer bottom widget of your web application in the web console

The footer bottom widget of your web application is the area where you can add widgets or lines of code to make sure that widget or window appears throughout the web application or website. Be it any web application, the footer widget can be configured. You can go to the backend and find the footer bottom widget area in the web console.

(Web Console is a feature of web browser or a web-based application where in you can execute javascript commands on the browser directly.)

blank
This is your web console. Open it first.

Step 2: Copy the following ‘script’ (after customizing the configurations) to your web console.

Ziwo’s Web CallBack can be implemented directly with a documented script. By setting required configurations (as per the necessity and suitability of your customer base) and simply copying the script to the web console of your web application, you can implement Web CallBack successfully.

The script adds the required callback() methods to the source code. Simply by adding the script, the callback button appears on your website. Customers can enter their contact information and click on the callback button to request a callback.

But first, configure!

Configuration:

  • Please note that configuration ‘contactCenterName’ and ’extensions’ are required for the Web CallBack to work
  • Other configurations are optional, but you should definitely read their respective comments and put the appropriate value for your use case

Once you have configured as per your requirement, add the following script to your web console.

 

<script>
// WEBCALLBACK CONFIGURATIONS
// (Here configurate your webcallback)
const webcallbackConfig = {
// REQUIRED CONFIGURATIONS
contactCenterName: 'aldebaran', // (REQUIRED) If your Ziwo url is "example.aswat.co", your Contact Center Name is "example"
extensions: ['33176431477', '33184131602'], // (ONE REQUIRED) A list of extension numbers to be linked when the receiver answers the call, by order of trial. Can be some of your Ziwo Numbers or some agents CCLogins.
// OPTIONAL CONFIGURATIONS
callerIDNumber: '+971557526349', // (Optional) The CLI number to be displayed as caller on the callee (on the given number) phone.
numberOfRetries: 2, // (Optional) Number of retries to be made if call fails to the given number.
timeout: 60, // (Optional) Maximum number of seconds to wait before considering the call as failed.
extensionTimeout: 15, // (Optional) Maximum number of seconds to wait before considering the extension as failed.
extensionDelay: 20, // (Optional) Number of seconds to wait/delay before falling to next extension.
// POSITION CONFIGURATIONS
positionClass: 'top-left', // (Optional) Css class for the position of the webcall-back button.
// Default available position css classes: "top-left", "top-middle", "top-right", "bottom-left", "bottom-middle", "bottom-right". 
// You can also implement and use your own custom position css class, in it for example simply set "position: absolute" and then the values of "top" "bottom" "left" and/or "right".
replacementTargetId: 'exampleId', // (Optional, overrides positionClass) You can also directly replace a placeholder element of your own html with the webcallback button.
// Here provide the id of the placeholder html element to replace.
// Implementation example: have the placeholder element inside of another div which handles all the css positioning, and which will then contain the webcallback button.
// OTHER CONFIGURATIONS
defaultCountryFlags: ['fr'], // (Optional) List of country codes to display first in the number selection input.
offline: false, // (Optional) If you put true here (through your own JS logic), the webcallback will be displayed as currently offline.
customTexts: { // (Optional) Here you can customize the text of each parts of the webcallback to your needs, useful also for translating it !
// Do not change the key, it identifies the section to customize. Simply set the custom text you want in the value.
mainButtonTooltip: "Call me back",
offlineButtonTooltip: "Currently Offline",
formTitle: "Please enter your phone number and we will call you back soon",
formInputLabel: "Phone Number",
formButton: "CALL ME BACK",
successTitle: "Your callback request is taken into account.",
successMessage: "You will be called soon on :",
failureTitle: "An error as occured !",
failureMessage: "Please try again in a few minutes..."
}
};
// WEBCALLBACK SCRIPT INITIALISATION
// (Nothing to change here)
addWebcallbackScriptLoader();
function addWebcallbackScriptLoader() {
const webcallbackScriptLoader = document.createElement('script');
webcallbackScriptLoader.id = 'webcallbackScriptLoader';
webcallbackScriptLoader.type = 'text/javascript';
webcallbackScriptLoader.async = true;
webcallbackScriptLoader.src = 'https://webcallback.ziwo.io/master/latest/webcallback.js';
webcallbackScriptLoader.onload = () => {
setWebcallbackConfiguration();
setWebcallbackPosition();
};
document.head.prepend(webcallbackScriptLoader);
}
function setWebcallbackConfiguration() {
document.getElementById('webcallbackConfig').content = JSON.stringify(webcallbackConfig);
}
function setWebcallbackPosition() {
let webcallbackElement = document.getElementById("__webcallback");
let replacementTarget = document.getElementById(webcallbackConfig.replacementTargetId);
if (replacementTarget) {
replacementTarget.replaceWith(webcallbackElement);
webcallbackElement.classList.add('replaced');
}
else webcallbackElement.classList.add(webcallbackConfig.positionClass);
}
</script>

 

  1. Copy this script in the desired configuration
  2. Paste it in the area where you want to add the WebCall Back button.
  3. Save changes
  4. The callback button appears on the screen

blank
This is your web console. Open it first.
Customers, who want to receive a call back, will have to enter their contact information and hit the button. Ziwo will then initiate a call with those customers and link it with the contact centre number that has been configured.

No matter what web application you use, Ziwo’s Web CallBack script is compatible with all of them.

Step 3: Customize the HTML elements in CSS to change the look and feel of ‘Web CallBack’ .

Further, you can then customize the HTML elements of the Web CallBack to design the button as per your requirement. Developers can create new HTML tags, modify and upscale existing HTML tags, or extend the components that have already been authored.

Viewing an HTML element’s CSS
Right Click → ‘Inspect’ → Enter value of ‘data message’ → Enter padding value for the element you want to customize

Add a CSS declaration to the element
Right Click ‘add a background color’ → ‘Inspect’ → ‘element.style’ near the top of Styles tab → Change background color

Add a CSS class to the element
Right Click ‘add a class’ → ‘Inspect’ → ‘.cls’ → Add new class

Changing dimensions of an element
Use the ‘box model’ diagram in Styles tab to change width, height, padding, margin, or border length of any element in the web application or website

Step 4: Change the language to French if you want (Optional)

Ziwo’s Web CallBack is compatible in two languages – English and French. Developers can change the language setting directly while implementing the callback service. The script can be edited in French and the background image can also be updated likewise. The whole language can be changed to French.

This is Ziwo’s website in French.

Live Stats

Live Events

Ziwo Integration

Ziwo is a multi-channel customer support platform and all the core elements of the platform can be accessed via the API. The official front-end app also uses the same API and all the features implemented on the front-end app will be also accessible via the API. The demo version of the platform and the app can be accessed via the Ziwo Demo App!

The domain in the API url starts with the instance name. For example, if your instance is your-ziwo, then the url will be https://your-ziwo-api.aswat.co.

The response structure: All APIs return responses in the following structure:

{
“result”: true, # Status of the API request.
“content”: {}, # The content/body
“info”: {} # The info object which contains messages like deprecation warnings, error messages etc.
}

Integrations- CRM

The CRM – Customers (CDB) module is a typical CRM system for managing customers and its related information. A single customer can consist the followingOne profile
Multiple addresses
Multiple numbers
Multiple social accounts
The general idea behind the different entities is that multiple entities can be linked with other multiple entities i.e. an address can be linked to multiple different profiles (e.g. Family members can have same home address). or a customer can have multiple addresses linked to it (e.g. A customer have a home address and an office address etc.), same is the case for numbers and social accounts.Any information which is solely for a single customer i.e. First name, email, gender etc. are grouped together under an entity called profile. A profile is a collection of personal details about an individual and every other entity can be just attached to the profile like addresses, numbers etc. which can be sharedThere are different type of requests possible for this module, as listed belowAddressesAdd an address entity
Update an address entity
Delete an address entity
NumbersAdd a number entity
Delete a number entity
Social accountsAdd a social account entity
Update a social account entity
Delete a social account entity
ProfileCreate a profile
Update profile info
Delete a profile
Link address
Link number
Link social account
Unlink address
Unlink number
Unlink social account
Search

Integrations- CTI

The CTI module is one of the available apps which is a part of the integrations suite.

The module can be used to manipulate the state of the the platform (e.g. auto-login of agent, changing the status of an agent, initiating a call etc.)

To access the routes for CTI, an api_key is the required token instead of access_token. It can be passed in various ways in the request as follows:

Request Header
Request Body
Request Query
Best practice is to send the api_key in the Request Header

There are different type of requests possible for this module, as listed below

Agent login
Agent change status
Click to call
Click to IVR
Agent logout

Agents API

Admin API

References