Table of Contents

Steps for Twilio Integration

Prerequisites

  • In the Twilio portal https://console.twilio.com/, create an account.
  • Once the account is created, access the general settings of your account via the Keys & Credentials menu to obtain the SID and AUTH TOKEN necessary for configuration in Lynn, as shown in the image:

Steps for Configuration in Lynn

With your Twilio account created, you can begin configuring the channel in Lynn.

1- Create a new WhatsApp channel from the flow designer in the configure channel option.

2.- Select the WhatsApp channel and then Twilio WhatsApp.

Channel Configuration Parameters

  • Configured WhatsApp number (TW_WHATSAPP_API_NUMBER): Text field where you should enter the phone number configured in the Twilio interface, which will be used for the WhatsApp service.

  • Twilio Identifier (SID) (TW_WHATSAPP_ACCOUNT_SID): Text field where you should enter the SID obtained from your Twilio account console in the Keys & Credentials menu. There, you will find both the test SID and the production SID to use.

  • Twilio Authorization Token (TW_WHATSAPP_AUTHORIZATION_TOKEN): Text field where you should enter the token obtained from your Twilio account console in the Keys & Credentials menu. There, you will find both the test token and the production token to use.

  • Configured timeout for detecting inactivity and closing the interaction. Maximum 7200 seconds (2 hours) (WHATSAPP_TIMEOUT_SECONDS): Numeric field where you should enter the wait time in seconds.

  • Language for presenting default elements of the interactive menu (WHATSAPP_MENU_PRESENTATION_LANGUAGE): Dropdown list where you should select the language for presenting the menu.

Once the channel is created in Lynn, take the WebHook provided by the channel and add it to the chatbot configuration in Twilio, as shown in the image. It's important to note that to perform this process, the chatbot must be inactive, and after modification, you need to activate it.

For more information on creating WhatsApp templates in Twilio, consult: https://www.twilio.com/docs/whatsapp/tutorial/send-whatsapp-notification-messages-templates