How can you send/receive Line Messages from XCALLY?
XCALLY Motion Open Channel offers the integration of Line messenger as a New Channel, allowing:
- the Customers to interact with your Agents sending direct messages to your Line Official Account;
- your Agents to receive the incoming messages on a special Line Queue and to reply from the XCALLY Motion standard GUI;
- the Customers to receive the messages back on Line messenger.
Compatibility The minimum required version of XCALLY Motion is 2.0.69
The integration allows you to exchange text or attachments. To send both text and attachments, you must send more messages
Setup Open Channel Account
Below you can find the steps to create an Open Channel Account and an Open Channel Queue:
- Create a new Open Channel Account in your XCALLY Motion in the Open Channel Section:
The Reply URL should be http://localhost:3008/sendMessage
Complete the Open Channel account configuration (Disposition, Action, etc)
Don't forget to select line as the mapKey and add the proper Agents to your account.
- Create a new Open Channel Queue and then Add Agents to it as well;
Open Channel For more info on this step please refer to the Configure a new OpenChannel account section of documentation.
Setup Line Account
Below you can find the steps to create a LINE account and enable integration with XCALLY Motion:
- Create LINE Business ID (https://account.line.biz/login?redirectUri=https%3A%2F%2Fmanager.line.biz%2F)
- Create LINE Official account (https://manager.line.biz/)
- Add new LINE channel (https://developers.line.biz/en/docs/line-things/create-channel/)
Add new LINE channel
In details:
- Create new provider
- Create Messaging API channel
- Fill the mandatory fields and agree the Terms of Use
- Open channel configuration to:
- Copy Channel secret value
- Issue and copy the Channel access token from Messaging settings
- Enable Webhooks from Messaging settings
- Add Webhook URL from Messaging settings
The webhook URL should follow the format: https://{HOSTNAME}/api/plugins/webhook?port={PORT}&path=/api/messages&token={TOKEN} ○ where {HOSTNAME} is usually your XCALLY hostname or IP address, or the hostname of another server in case you would like to host your integration/application separately. ○ {PORT} is usually 3008, or the specific port you have defined in your Line Plugin settings inside XCALLY Motion. ○ {TOKEN} is the Open Channel Account token
- Make sure that Greeting message and Auto-response are disabled
About Line For more information about Line Messaging API go to: https://developers.line.me/en/docs/messaging-api/getting-started/ The public visibility of your Line official account is dependent on the type of Line@ subscription. Please consult Line documentation for more details. Alternatively, its also possible to share the QR code of your channel to provide users the possibility to add your Line official account as friend.
Installing the Plugin to XCALLY Motion
- Download the Line Plugin you find in the App Zone Page (A ZIP file should be obtained):
- Login as admin in XCALLY Motion, upload the Line Plugin and Install it
After the installation, it should be visible in the list of plugins:
and also in the list of Plugins on sidebar:
Setup Line Plugin
- Configure the Plugin for Line by selecting Line messenger from the list of Plugins (in sidebar) and
- Insert Channel Secret (as obtained in previous steps)
- Insert Channel access token (obtained in previous steps)
- Select your Open Channel account from the list (as created in the previous step)
- Insert the Username and Password for XCALLY Admin user
- After saving the changes, Reload the Plugin from: App Zone > Plugins > Line messenger (3 dots menu) > Restart Plugin
You are ready!
Additional Information
Configuring your firewall
If your XCALLY service is hosted behind a firewall then please make sure that the HTTPS port is able to accept incoming requests from LINE webhook server.
A few suggestions in this regard:
- Try to find the IP address for LINE server, that is sending webhook requests to XCALLY, using your preferable network analysis tool.
- Add the rule to allow incoming traffic from Line’s IP address, on Port 443, in your firewall policy.
— OR —
Modify the file /etc/sysconfig/iptables and add the following line:
-A INPUT -s 0.0.0.0/0 -p tcp –dport 443 -j ACCEPT
Disclaimer: This method will open port 443 of your XCALLY server for all IP addresses.
Debugging/Troubleshooting
All of the log files for Line Messenger plugin events are available at /var/log/xcally/ directory under openchannel-line- naming convention.