Configure Twilio Whatsapp
Please note that Twilio for WhatsApp is currently a Beta product available from Twilio. Please review the details on this Beta product on the Twilio site https://www.twilio.com/docs/sms/whatsapp/api.
The Twilio API for WhatsApp helps organizations send and receive messages to their WhatsApp users.
To configure the WhatsApp chat channel, a Skills Builder Administrator needs to complete the following steps:
Register and create an account in Twilio. Once the account is created, set up billing for the Twilio messages/transactions. For details about the pricing and billing, refer to https://www.twilio.com/whatsapp/pricing/us.
Create a Project in Twilio. Copy the Account SID, Auth Token, Sender number, activation code, and retain them in an easily accessible location such as notepad or any text editor tool.
Configure and Enable the WhatsApp chat channel in Luma Virtual Agent using the Account SID and Auth Token from the Twilio Whatsapp project.
Invite users to use the WhatsApp channel to interact with Virtual Agent.
Step 1: Register in Twilio
To use WhatsApp with Luma Virtual Agent, you need to first register on Twilio. To do so, follow the below steps:
Navigate to the Twilio website by entering the URL www.twilio.com. The Twilio home page appears as shown below.
Create an account in Twilio by clicking Sign up. To know how to sign up for a Twilio account and other account management details, refer https://support.twilio.com/hc/en-us/sections/205104908-Account-Management.
If you already have an account, skip to the next step (point 3).On sign up screen, add the required details and Password.
Select the 'I accept Twilio Privacy statement….' and click on Start your free trial to create your account.
An email will be triggered to the email address (added in the above step) to verify your account.
Click on the link in the email and confirm your email address.
The link redirects you back to Twilio. To verify your phone number, add your number and click on Verify.
Enter the verification code received on your phone and click on Submit.
The account is now verified. Finish account creation and go to the Project Dashboard.
On ‘Do you write code’, click No and click on Skip to Dashboard.
If you already have an account, log in to Twilio using your account details and navigate to Dashboard.
Once logged in, the next step is to create a new project. If you already have a project, skip to the next step (point 5).
On the Project Dashboard, click on Create New Project.
Add the Project Name and click Verify.
Provide your phone number and verification code to verify your account (as in point 2→e). Now skip to Dashboard.
Your project is now ready.
On the Project Dashboard, copy the below details and retain the information in notepad to be used for channel configuration in Luma. Click on the copy button on the fields:
Account SID
Auth Token
Step 2: Configure Whatsapp in Luma Virtual Agent
The next step is to configure and enable WhatsApp as a chat channel in Luma Virtual Agent.
Log in to your tenant on the Bot Builder UI.
Navigate to Bot Menu → Configurations → Channels. Click on the Twilio WhatsApp tile and open configurations.
Now add the Account SID and Auth Token (copied in Step 2 → point 5) to the respective fields on the configuration screen in Bot builder UI.
On User Reconciliation For Channel Authentication section, specify the user information that should be used for auto authentication and user data reconciliation with Luma Virtual Agent record fields. Since Whatsapp uses the user’s Phone number for authentication, select ‘phone’ in User Fields and click on Set.
Copy the Message URL and retain the information on a notepad to be used to configure messaging service in Twilio in a later step.
Click on Configure to enable WhatsApp. The channel is now enabled and set to Active.
Step 3: Configure WhatsApp Sandbox
Once the channel is configured in Bot Builder UI, the next step is to create and set up your Sandbox. The Twilio Sandbox for WhatsApp helps you to connect to your Bot.
On Twilio, navigate to the Project Dashboard. Click on All Products & Services.
Go to Programmable Messaging.
Click on Settings → WhatsApp Sandbox Settings.
A confirmation message appears to activate your Sandbox. Agree to the Terms of Service and click on Confirm.
The Twilio Sandbox for WhatsApp page appears.
On the Sandbox Configuration section, set up the endpoint URL. This indicates the Luma environment and tenant the Sandbox should connect to.
Copy the Message URL copied/retained in Step 2 → point 1(e) and paste the URL in ‘When a Message Comes in' field and click Save.
The Sandbox is now ready.
Step 4: Invite Users to your Sandbox
Now the channel is active and Sandbox is configured, you can invite users from your organization to connect to Luma Virtual Agent through WhatsApp. In order to use your Whatsapp Sandbox, the End-user should do the following:
Add the Sender number given in the Sandbox Participants section of their contact list.
Once the number is added, send a WhatsApp message to the number with Activation code.
The user will be added to the Sandbox. All users (phone numbers) with access to the bot, are available under USERID.
The users can now start interacting with Luma Virtual Agent through WhatsApp. If the logged-in user is already available in Luma Virtual Agent , (with the phone number used for WhatsApp), the user will be auto-authenticated by the system. No manual registration is required.
In case, the user is not available in Luma Virtual Agent, the system recognizes such users as Anonymous Users and prompts the user to register in Luma Virtual Agent .
Points to Remember:
User’s Phone number in Luma Virtual Agent should be in the same format <Country code><phone number> as used to install and configure WhatsApp. If the number is not incorrect, the user will not be auto authenticated in Luma Virtual Agent .
Whatsapp is a text-based channel and does not support cards and quick replies. Bot Responses set as Cards or Quick replies appear as choices with numbers, that are used to select the required option.
Twilio Pricing
Once your Twilio account is created, ensure that you set up billing for the Twilio messages/transactions. There are two types of messages -
WhatsApp Session message
WhatsApp template message.
WhatsApp Session message is any message sent or received in response to a user-initiated session. A messaging session starts when a user sends a message to Luma Virtual Agent and lasts for 24 hours from the most recently received message. You can wait for users to message, or you can send a Template Message to invite the user to respond.
WhatsApp template message is Luma Virtual Agent initiated (follow up, approval, or resolution). They are pre-approved message templates for outbound notifications such as delivery alerts and appointment reminders. A WhatsApp Template Message can be used if more than 24 hours have elapsed since the user last responded to you. Any other type of message will fail.
For more details on how much Twilio charges for the different types of messages, refer https://www.twilio.com/whatsapp/pricing/us.
© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com