How to Connect your Bot to SMS Text Messaging |
Through Bot Libre and Bot Libre for Business, you can now send and receive SMS messages with your own bot. You can use this to chat with your bot through SMS, but the possibilities are endless. You could also use it to perform surveys or marketing, send customer service escalations, or send notifications from social media or email. Any bot can be set up with SMS text messaging with an account on Twilio.com. This "How To" will give you a step by step process to connect your bot with Twilio to allow for SMS text messaging. Step 1 - Create a Bot First you must create a bot that you want to connect to SMS, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks Step 2 - Create a Twilio account Click here to go the Twilio website. To create a trial account, click on the "Sign up and start building" button in the middle of the website. Enter your information on the following form, then click the "Start your free trial" button. You will then need to verify your email address. Check your email and click on the link. You will also need to verify your cell phone number. Enter your cell number and click "Verify". Once you have received your verification code, enter it on the website and press "Submit" to complete your account creation. Answer the questions from Twilio or click "Skip to dashboard". Step 3 - Get a phone number from Twilio From the menu on the left side of the Twilio website, select the circle and three dots icon, shown in red below, and then select "Phone Numbers"
Click the "Get Started" button to begin. Next, click the "Get your first Twilio phone number". A screen will pop up with a phone number that has been chosen for you. You can accept this phone number by clicking the "Choose this Number" button. If you want to try again for a different phone number, you can click the underlined "Search for a different number" link. Ensure the number you select has voice capabilities. Step 4 - Connect webhook Navigate to your bot's page on the Bot Libre website. Go to its admin console by clicking on the gear icon. Click the "Twilio SMS & IVR" link to view your bot's Twilio settings. Copy the "Twilio SMS Webhook URL" to your clipboard. Now return to the Console on the Twilio website and select "Phone Numbers" Next, select "Manage Numbers" Click the phone number you created to edit its settings. Scroll down to the "Messaging" section and select "Webhooks, TwiML Bins, Studio, or Proxy" from the "Configure with" dropdown menu. Paste the Webhook SMS URL from your bot's Twilio SMS & IVR admin page into the "A message comes in" Webhook field. Step 5 - Accessing IVR from a script To start a voice call from a bot's script, you will need to enter your Twilio account's SID, Auth Token and phone number into your bot's Twilio admin page. You can find your Twilio Account SID and Auth Token on your Account Dashboard on the Twilio site. Return to your bot's Twilio admin page and enter your Account SID into the Twilio SID field, the Auth Token into the Twilio Secret field and your Twilio phone number into the Twilio Phone Number field. Press "Save".
You will now be able to send SMS messages from your bot through scripts. The method for sending an SMS message from a Self script is The script lets users escalate their chat session by sending an SMS message to an operator cell phone number. Ensure you replace the phone number with your own. In summary, your bot should now be able to send and receive SMS messages. By creating a Self script, you will be able to create custom behaviour for sending SMS messages in response to chat messages sent to your bot. If you encountered any issues, or would like help setting up your bot please email us at support@botlibre.com or upgrade to our Platinum service and we can build your bot for you. |
|
|
|
|