Line
XCALLY section | Plugins → Line |
On this page |
Overview
XCALLY Motion allows you to integrate Line as a New Channel through the Open Channel module.
Customer can send and receive direct messages from your Line Account.
Agent receive incoming messages in a dedicated Line Queue and can reply directly from the XCALLY Motion GUI.
Requirements
The Motion instance must have a public address accessible via HTTPS. For security reasons we strongly recommend to use a Reverse Proxy.
Access to a Line developer Account, a bot and a channel.
Line Account Configuration
Follow these steps to create a Line Account and enable its integration with XCALLY Motion:
Register to Line by downloading the app for your phone on your app store
Create your own developer account from https://account.line.biz/login?redirectUri=https%3A%2F%2Fdevelopers.line.biz%2Fconsole%2F
Create a provider and a channel, following this guide
From Messaging settings, enable Webhooks and add Webhook URL
Line plugin needs a long lived channel access token. Retrieve the Channel access token and secret from your channel configuration page.
Save the Access Token and the Channel Secret. They will be required later during the Line plugin configuration.
For further Line documentation, click here.
XCALLY Configuration
This section explains how to install and configure the XCALLY Motion Line Plugin interface, allowing your agents to interact with Line users. To perform this configuration, you must log in to XCALLY Motion as an Admin.
1. Setup Line Account
Access the Open Channel Accounts section, under Open Channel menu
Create a new Open Channel Account clicking on the plus blue button
Fill the below fields:
Name: choose a name for your Line Account
Key: enter a specif key (it must different for each channel)
Reply URL: http://localhost:3008/api/from-motion-to-line, where 3008 must be replaced with the port used for the plugin. This URL is going to be used by Open Channel to answer to the interactions.
List: Choose the List where the new contacts will be saved in the Contacts Manager. If a contact is already present in the List, the new interaction will be associated and reported in the Customer Journey.
Description: (Optional) Describe to which bot the channel is associate.
Click Add Open Channel Account
Find the Line Account, that you have just created, in the list of Openchannel Accounts
Click on the three dots button next to the Line account and select Edit Open Channel account.
Check the information and complete the Line Account configuration.
On the top of the screen, you can see the ID Account (the number that follows the # ).
Save the Open Channel Account ID – This will be required later during the Line plugin configuration.
Save the Token from the Advanced settings – This token is also needed for the Line plugin setup.
2. Setup Line Queue
To enable agents to receive notifications from the Lineaccount and manage interactions, you must configure a specific Queue.
Create a new Open Channel Queue for Line.
Add agents or teams to the Line Queue.
Associate the Line Queue with the corresponding Line Account.
Please refer to the Open Channel Queues documentation.
3. Generate API Key
Plugins, such as Line, are connected to XCALLY Motion using an API Key.
To generate the API Key:
Go to the Staff section
Open the Users section
Select the account of interest and press on the three dots button to Edit it.
Click on the API Key Manager Icon:
Generate the API KEY. If the API KEY has been already generated, you just need to copy it.
Copy the API Key. This will be required later during the Line plugin configuration.
4. Upload the Plugin to XCALLY Motion
XCALLY Motion does not support two or more identical plugins, concurrently active. For more information, please contact us via Support Portal.
Follow the below steps to upload a new plugin:
Download the Line Plugin zip file: https://repository.xenialab.com/repository/plugins/line-plugin/xcally-line-plugin-v2.0.0.zip
Open the App Zone section → Plugins
Upload the Line Plugin clicking the plus button, choosing the zip file and clicking on Confirm
After the upload, you will find the plugin in the list of the uploaded App Zone Plugins
To Install the plugin, click on the three dots button next to the plugin and click Install plugin
Click on the three dots button next to the plugin and click Edit plugin.
In the Sidebar field, select how and to whom this integration should be displayed in the menu. (default value: Admin Only)
5. Configure the Plugin
To configure the Plugin for Line:
Access the Plugins section and select Line 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
Line config
Access token: Insert the Line Access Token previously saved.
Channel secret: Insert the Line Channel Secret name previously saved.
Message config
Automatic 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 users when the message could not be delivered to Motion: Message that appears to your Customers in case of technical difficulties and messages could not be delivered
Warning sent to agents when the message could not be delivered to Line: Message that appears to your Agents in case of technical difficulties and messages could not be delivered to Line
Warning sent to agents for attachments too big to be forwarded to Motion: Message that appears to your Agents in case the attachment sent by the Customer is too big for Motion to handle.
Webhooks config
Line webhook: http://localhost/api/plugins/webhook?port=3008&path=%2Fapi%2Ffrom-line-to-motion&token= ; this needs to be set in the Line channel admin page (where localhost is your XCALLY instance hostname and 3008 must be replaced with the port used for the plugin).
Motion reply URL: http://localhost:3008/api/from-motion-to-line, where 3008 must be replaced with the port used for the plugin.
After the changes, remember to Restart the Plugin:
Go to the App Zone section
Find the Line plugin and click on the three dots button next to the plugin
Choose the Restart plugin command.
The Line Integration is ready to be used!
Agent experience
The following screenshot illustrates the communication between:
Line User – Sends messages to the Line Account you created.
Agent – Manages and replies to these messages directly from the XCALLY Omnidesktop Interface.
Note that:
XCALLY Motion can't show to agents any sticker sent by the users, as Line 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.
XCALLY Motion can’t receive contacts sent by the users, either from their personal contact list or their Line's contact list. Line is currently not forwarding those kind of messages to our systems.
XCALLY Motion can't directly send attachments to users other than video and images. Any other kind of attachment will instead be converted into a downloadable URL.
GIF\PNG images are converted to JPG. That's how Line send them back to Motion.
Text or attachments can be exchanged: they must be sent in different messages.
Debugging and Troubleshooting
Log files are saved in the following locations:
error logs only:
/var/log/xcally/logs/line-plugin.error.pm2.logerror and info logs:
/var/log/xcally/logs/line-plugin.pm2.log