Viber Integration with XCALLY
Requirements
The Plugin for the Viber Integration requires:
NodeJS, version 16.0.0 or higher, to run this plugin
The Motion instance itself must have a public address for Viber to broadcast events, and this public address must be accessible via HTTPS
Access to a Viber developer account with Enterprise access enabled; instructions about how to acquire one are included later on in the documentAccount, a bot and a channel.
Viber Account Configuration
Follow these steps to create a Viber service (bot) Account and enable its integration with XCALLY Motion:
Apply for Developer Account with Enterprise access, as described here (Applications for Enterprise access are reviewed by Viber's sales team, and the exact timings may vary) OR get access to your Viber Developer Account, from https://developer.Viber.com/en/apply-for-access.
We suggest the following settings:
OAUth 2.0 is not required
OAUth 1.0a is required
This plugin is a Web App
Emails from users are not required
Reading and writing and Direct messages is requiredFrom your app, generate a set of tokens to allow the plugin to access your account, as described here:
Save the API Key, App Secret, Access Token and Secret. We will need it to setup the Viber plugin.
Create and name an application environment, here:
Save the Application Environment name. We will need it to setup the Viber plugin.
Now your Viber service is completed!note
Viber is currently still in the process of migrating its API from v1 to v2: as the migration proceeds, we will make sure to update this plugin as needed. |
Info |
---|
For further Viber documentation, click here. |
XCALLY Configuration
In this section you’ll see how to install and configure the XCALLY Motion Viber Plugin interface, in order to let your Agents interact with Viber users.
In this phase of the process, you need to access your XCALLY Motion as Admin.
Setup Viber Account
Access the Open Channel Section:
Create a new Open Channel Account in your XCALLY Motion, clicking on the plus button and filling the fields:
To configure the Viber Account:
Select the Viber Account in the list of Openchannel Accounts, click on the button and Edit it:
Check the information and complete the Viber Account configuration:
On the top of the screen, you can see the ID Account (the number that follows the # ).
Save the Receive URL. We’ll need it to setup the Viber plugin.
Save the Token. We’ll need it to setup the Viber plugin.
Setup Viber Queue
In order to have Agents receive notifications from the Viber Account and manage interactions, you need to configure a specific Queue.
Follow the next steps:
Create a new Open Channel Queue, as Viber Queue.
Add Agents or Teams to the Viber Queue.
Associate he Viber Queue to the Viber Account.
Please refer to this documentation to complete this phase of the process.
Generate API Key
Plug-ins, as Viber, are connected to XCALLY Motion through the API Key.
To generate the API Key, go to the Staff section and open the User section
Select your Admin user and press on the three dots button to Edit it:
Click on the API Key Manager Icon:
Generate the API KEY, clicking on GENERATEbutton:
Save the API Key. We will need it to setup the Viber plugin.
Upload the Plugin to XCALLY Motion
It is necessary to upload the plugin.
Download the Viber Plugin zip file: https://repository.xenialab.com/repository/plugins/Viber-plugin/xcally-Viber-plugin-v2.0.0.zip
Open the App Zone section
Upload the Viber Plugin:
After the upload, you will find it in the list of the uploaded App Zone Plugins:
To Install the plugin, click on button, and click Install plugin:
Click on the button to edit the plugin. Select in the Sidebar field how/to whom this integration must be shown in the menu (default value: Admin Only)
Now your Viber Plugin is active!
Setup Viber Plugin
To configure the Plugin for Viber, access the Plugins section and select Viber Openchannel.
Fill and check the fields:
Plugin config
Motion API Key: Insert the API Key previously saved.
Plugin port: Plugin port (choose a different port for each plugin)
Map Key: Insert a key to map the plugin
Receive URL: Insert the Receive URL previously saved.
Public motion server address: Enter the public XCALLY Motion URL
Proxy token: If necessary, insert the proxy token
Viber config
App key: Insert the Viber App key previously saved.
App secret: Insert the Viber App secret previously saved.
Access token: Insert the Viber Access Token previously saved.
Access token secret: Insert the Viber Access Token Secret previously saved.
Environment: Insert the Viber Environment name previously saved.
Message config
Message config
Messages configAutomatic response to stickers: Message that appears to your Customers in case they’re trying to send stickers (Stickers are not supported on Motion)
Warning sent to agents for attachments too big to handle: Message that appears to your Customers in case the attachment is too big for Motion to handle
Warning sent to users when the message could not be delivered to Motion: Message that appears to your Customers in case of technical difficulties and your message could not be delivered
Warning sent to agents when the message could not be delivered to Viber: Message that appears to your Customers in case of impossibility to forward your message to Viber. Ask to your system admin to check your system logs.
Motion reply URL http://localhost:30093007/api/from-motion-to-Viber
Remember to Restart the Plugin:
Go to the App Zone section, select the Viber plugin
click on the button and choose the Restart plugin command:
Viber Integration is ready to be used!
Viber Interactions
The Viber interaction below shows the communication between the Viber user (who writes messages to the Viber Bot created) and your Agent (who interacts from the XCALLY Omnidesktop Interface.
PHOTO INTERACTION
Note that:
Attachments are sent as download links. Viber will not allow anything other than media to be sent through their systems. For this reason, any other file (PDF, TXT, everything other than images and videos) will be hosted on Motion and exposed as a downloadable link.
Some videos are sent as download links, even though Viber supports videos. Unfortunately, Viber won't accept all kinds of videos. There is a list of requisites for media files, but the plugin can't check them; we try to upload the file, and fall back to a download link in case Viber rejects itMotion can't show to agents any sticker sent by a user, as Viber currently doesn't allow any way to retrieve those from their systems. Users sending stickers will receive an automated response you can customize in the plugin's settings.
Text or attachments can be exchanged: they must be sent in different messages.
Additional Information
Debugging/Troubleshooting
All of the log files for Viber plugin events are available at /var/log/xcally/openchannel-Viber-info.log.