How to Integrate AI Agents with WhatsApp | Scoreapps

How to Integrate AI Agents with WhatsApp

Introduction

The new integration with WhatsApp (Twilio) allows you to connect your AI Agents of Scoreapps to WhatsApp via Twilio, making it possible for users to talk to your AI bot directly in WhatsApp. 

Warning
IMPORTANT: integration is only possible with accounts WhatsApp Business.


How to configure integration with WhatsApp


Step 1: Have an AI Agent

First of all you must have created an AI Agent following the steps in the article AI Agents at Scoreapps

Step 2: Twiliio Account Creation

Notes
To integrate AI Agents with WhatsApp, a Twilio account is required. The profitability of automating a channel like WhatsApp compared to a cost as low as Twilio is enormous, but if you want to automate a marketing channel completely for free, we recommend opting for Facebook Messenger or Telegram. 

A) If you already have a Twilio account, log in to your account and continue the article from STEP 3

B) If you do not have a Twilio Account, access https://www.twilio.com to create an account:

 


Next we click on the blue "Start for free" button:



On the next screen you must complete the different fields that request the information necessary to create the Twilio Account.
Complete the required information and then press the blue "Continue" button

 


On the next screen we will be asked to verify our email address:


You will receive a message like this in the inbox of the email used in the registration:



Enter the security code that you will have received in and then press the blue "Verify" button 


 On the next screen you will also be asked to verify your phone number.



First select the country prefix from the drop-down menu, then enter your phone number and click on the blue button "Send code via SMS" if you want to receive the code by SMS or "Send code via voice call" If you prefer they call you and tell you the code.

Once the code has been inserted, you will see the following screen in which you are informed of a "Recovery code" that you must save to recover your password if you lose it.
Then press the "Continue" button


Once the registration is complete you will enter the Twilio Console and you must click on the "Create New Account" button:


On the next screen you must complete the following fields:

- Account friendly name - Enter the name you want to give to the account
- What will this account be used for? - Here select the "Twilio" option


Then click the blue "Continue" button

Then on the next screen select your country and then click on "Create account":


On the next screen you must choose the payment plan "Pay as you go"

Next we must complete 4 steps to create the Profile and we will begin by clicking on the button "Get started"


Once the 4 steps are completed, click the button "Great, Start building"




You will see that you go directly to the Twilio Home
If you look closely you will see that in the "Connect to 3td-party applications" box the Twilio phone number check appears unchecked, this is because we have to add a number.


Step 3: Phone number

A) If you already have a WhatsApp Business phone number or a Twilio phone number, go directly to STEP 4

B) If you do not have a WhatsApp Business or Twilio phone number, follow the steps below:

Go to the left side menu and follow this path Messages > Senders > Whatsapp senders
Then we click on the blue button "Get Started"




Next we mark the box "accepting the Terms and Conditions" and click on the button "Next"




Next you must answer the following questions by selecting the option that best suits your circumstances.
Then click the "Next" button:



When you complete all the questions, check the checkbox and click the "Done" button




Then click on the "Create new sender" button



On the next screen you can choose between 2 options:

1- Use your own phone number if you already have a WhatsApp Business number.

2- Buy a Twilio number to then link it with WhatsApp.
In this case we will select the "Twilio phone number" option, then we will click on the "Select Twilio number" field and finally on "Buy a Number"




Next, on the next screen you must select a country prefix.
Info
Not all prefixes have available numbers nor do all prefixes have the same monthly cost but it is not essential that the number has a specific prefix so you can choose any other prefix.


The only thing you should keep in mind is that the prefix has at least the Capacibilitie Voice


 Select the number you want and press the "Buy" button


Then check the checkbox and click the button 



Then on the next screen you will receive confirmation of the purchase of the number and you must click on the "Configure" button



Step 4: Create a Sender

On the next screen, in the left side menu go to the section Messeging > Senders > Whatsapp senders and click "Create New Sender"




From here there are 2 options:

A) If you have a Twilio number, select the "Twilio Phone Number" option and choose the phone from the selector




B) If you already have a WhatsApp Business phone then you must select the "My own phone number" option and enter the phone number with the country prefix (without placing the + symbol)



Then we click on the "Continue" button

Then on the next screen click on blue button "Continue with Facebook"




You will automatically be redirected to Facebook where you must click on "Allow all Cookies"


Next you must log in to your Facebook Business account

Now you must click on "Continue" to connect the Facebook account with Twilio





On the next screen you must complete the form according to the circumstances of your company and then click "Next" to advance




Next you will see this screen:




A) If you have a Twilio phone You must place the phone number that appears on the screen in the "Number to register with Whatsapp" field
B) If you already have a WhatsApp Business phone number insert it into the field "Phone number" 

Then you must choose the "Text message" verification option and click on the "Next" button





We wait a few seconds and a field will appear to insert a code



If you reported a Twilio phone, the verification code will be shown in point 3 (verify via test message)
If you used a WhatsApp Business phone you will receive the verification code on your phone.

Next we copy the code and insert it in the "Verification code" field
Then we click on the "Next" button



Now, once verified, we click on the blue "Confirm" button


Now we are going to go to “Account Dashboard” and in the “Account info” section we will find the following data:
- Account SID
-Auth Token
- My Twilio phone number


Now we will go to Scoreapps > Section IA > AI Agents



Next we will access the section "Channel" of our AI Agent by clicking on the 3 dots icon



Within Channel we will choose the option "WhatsApp"


Now we are going to fill in the requested fields with the data from the Twilio Account Info:

- Whatsapp SID = Account SID
- Whatsapp Token = Auth Token
- Whatsapp Phone = My Twilio Phone number
And in environment = Production



Finally we click on the blue "Add Channel" button

Next The created channel will be displayed and we will click on the button that says “Copy Webhook”


Then we will return to Twilio and go to the left menu section Messangin > Whatsapp Senders
And here we click on “Edit Sender”



Now, in the field “Webhook URL for incoming messages” we paste the webhook copied previously from Scoreapps and click on the button below “Updating sender”



And that's it! The integration of your AI Agent with WhatsApp has been configured.







    • Popular Articles

    • How to Create an App for Restaurants (with or without Delivery)

      Text Enter First Steps Once inside the platform, from the main dashboard you will find a series of icons on the left hand side menu. Just click on 'Apps'. Then click on 'Create App' and give it a name. Then you'll get to a screen where you choose the ...
    • APPS: Radio

      The function of Radio allows the addition of radio broadcast within its application. In addition to this function To add this function to your application go to step "Functions" and click on the icon "Radio": Once added you must name this new ...
    • APPS: Webhooks

      The advanced Webhooks feature lets you connect certain events that occur in your App by sending them to a URL called Webhook. You can use a free Webhooks service as Zapier to create automations that can help you with your App business. For example, ...
    • APPS: Audio & Music

      How to add this feature To add this feature to your application go to step "FUNCTIONS" and click on the " iconAudio": Then give this new section of the application a name. Then click on the + icon to add a new Playlist Then add a title and an image ...
    • QR Promotions

      This function would allow you to create discount coupons that would be unlocked by scanning a specific QR code. Once unlocked, the customer can use the discount whenever they want. The coupon would not appear in the application until the user has ...
    • Related Articles

    • AI Agents in Scoreapps

      Introduction Scoreapps AI Agents are one of the most powerful features of the platform, designed to help you automate communication with your users and convert that interaction into real business results. An AI agent is not just a chatbot. It is a ...
    • How to Integrate AI Agents with Telegram

      Overview This integration allows you to connect your ScoreApps chatbot with Telegram, allowing users to chat with your AI directly in the app. How to configure the integration with Telegram: Step 1: Create a Telegram bot Open the Telegram app on your ...
    • How to Connect an AI Agent to Shopify or WooCommerce

      What this function does The option Shopping Assistant Connect your AI agent to a Shopify or WooCommerce store so it can respond using real information from your eCommerce. This allows you to provide more useful answers about products, catalog and ...
    • Voice Agents

      The Voice Agents feature allows you to create a conversational chatbot integrated with Eleven Labs neural voices and embed it on external websites or Mobile Applications. How to use the function? Once you access the Scoreapps AI area, you will see ...
    • How to Integrate the Scoreapps AI Chatbot with Facebook Messenger

      Introduction The Scoreapps AI chatbot integration with Facebook Messenger allows you to serve your users directly from your Facebook page. Thanks to this connection, the messages you receive in Messenger will be managed by your Scoreapps AI assistant ...