In this article, you'll learn how to create a required Twilio account, how to connect a WhatsApp business number to your Twilio account, which you'll use to communicate with customers, and how to connect a WhatsApp number to Orderry.
What is Twilio?
Twilio is a communication API platform that allows developers and businesses to easily integrate communication tools such as telephony, SMS, chats, and video into their apps and websites. With Twilio, you can send text messages, make phone calls, set up automated responses, and more. Twilio will help us integrate WhatsApp into Orderry.
Create a Twilio account
Before you get started with this guide, you'll need:
An upgraded Twilio Account. If you are new to Twilio, create a free account and upgrade it by linking a payment method. For more information on how to upgrade to a paid plan, see Upgrading to a paid Twilio Account in the article How to upgrade your account and buy numbers in Twilio
A Twilio Phone Number or your own phone number. You can learn how to buy a Twilio phone number in the article How to upgrade your account and buy numbers in Twilio in the section How to buy a Twilio number?
If you are using your own phone number, the number must be able to receive an SMS or phone call. If the number can only receive phone calls, it cannot be using an IVR (Interactive voice response).
Please note: to be able to use your own phone number, it cannot be connected to any other WhatsApp accounts.
Create a WhatsApp Sender
Once you have the paid version of Twilio, you need to register a WhatsApp sender, that will allow you to send and receive WhatsApp messages from your company's brand using the Twilio APIs. Certain restrictions are enforced by Meta (the company that owns WhatsApp) and you will likely need to complete Meta Business Verification before moving your application into production or onboarding additional WhatsApp Senders.
To create a WhatsApp sender:
1. Start by logging into the Twilio Console.
2. Navigate to Messaging > Senders > WhatsApp senders . This will take you to the WhatsApp Senders section of the console, where you will create your WhatsApp sender.
3. Review the information on this page and click Get Started.
4. View WhatsApp's Terms of Service and check the box if you agree to them. Then click Confirm.
5. Next, select the phone number you wish to connect to WhatsApp's Business API. You may use your Twilio Number or your own phone number. Click Continue.
Link your WhatsApp Business Account with your Twilio Account
This step will open a pop-up window leading to Facebook.com. Do not close the pop-up window or navigate to a different page in the Twilio Console. You will need the Twilio Console window for later steps in this guide.
1. Log into Facebook if you haven't already, or click Continue as [your name] if you're already signed in. After logging in, you will be shown an overview of the process to connect your number to WhatsApp.
2. After logging in, you will see the next steps in the process of connecting your number to WhatsApp. Click Get started.
3. Facebook will then ask you to allow Twilio to manage your WhatsApp Business Account. Click Continue to proceed.
4. On the next screen, select the Meta Business Account for your business from the list. If you don't have one, you may create a new one by selecting the option Create a Business Account.
5. Next, you will be able to select a WhatsApp Business Account (WABA) or create a new one.
When registering the first WhatsApp Sender in a Twilio account, please create a new WABA to be used only with that specific Twilio account. When onboarding additional senders in the same Twilio account, you will need to select the same WABA as you had created during the onboarding process for the first WhatsApp Sender. When a WABA is connected to your Twilio account, the ID will be shown on the WhatsApp Senders page.
Important: If you already have an approved WhatsApp number with another provider, then follow the steps in this article.
6. On the next screen, you will need to enter the following information:
WhatsApp Business Account Name - This is only used for internal purposes and is not consumer facing. If you had selected a WABA on the previous screen, you will not be able to change the name here.
WhatsApp Business Profile Display Name - This is what your customers will see. It must meet the requirements set by WhatsApp.
Category - Select the category that best describes your business. This is shown to consumers when they view your profile.
Business Description - This is also shown to consumers when viewing your profile in the WhatsApp application.
Website - This is also shown to consumers when viewing your profile in the WhatsApp application. Once you register your WhatsApp Sender, you will have the ability to add another website if you wish.
We highly recommend using your company name for your display name when registering WhatsApp senders, as WhatsApp will reject anything that does not match the company name in the linked Business Manager.
However, you may have a brand name that you wish to use as the Display Name for your WhatsApp Business Profile that differs from the name of your company. If so, there must be a clear, externally published association between your company and the brand. This association between the brand and your business needs to be displayed on your website and on the Display Name itself.
For example, if your company is Johnny Mobile and your brand is "PizzaApp", then we would recommend using the Display Name "PizzaApp by Johnny Mobile". This association must be published on your website, so WhatsApp can verify it. This means that somewhere on the website, there must be a visible relationship between the two names. If you would like to keep the name "PizzaApp", this will generally require an appeal to WhatsApp and may extend the registration process.
For more information, you can go to the WhatsApp's Display Name rules.
Verify your WhatsApp business number
1. If you are using a Twilio number with SMS capabilities, switch to the Twilio Console window you left open in step 1 and click to copy your Twilio number.
2. Then, paste the number into the Facebook pop up window. Keep the Text Message verification method selected and then click Send Code.
If you are not using a Twilio number, enter your number you wish to use and choose your verification method.
Do not continue if you receive a warning message about your number being moved. Instead, please open a support ticket and note you need your number migrated from Meta or the previous company (i.e. Business Solution Provider) that you worked with.
3. The verification code will then show in the Twilio console under the Verification code heading. Click Copy and paste it into the Facebook pop-up window.
4. You may then click OK on the following screen to close the pop-up window.
Register your number with WhatsApp
Congrats! Your WhatsApp Business Account is now linked to your Twilio account. Twilio will then begin the process to register your number with WhatsApp. This process may take up to 2 minutes.
Upon successful registration, your number will be displayed. You may click Edit Sender to use a messaging service, set your inbound message webhooks and update the rest of your WhatsApp Business profile including your profile picture.
If you haven't yet completed Meta business verification, your access to WhatsApp will be limited at first. If you've already completed business verification, then you will have full access to WhatsApp.
Onboarding additional numbers
To onboard additional numbers, you need to repeat this process, while taking care to select the same Meta Business Manager account and WhatsApp Business Account. The Meta Business Manager and WhatsApp Business Account currently linked to your Twilio account are shown in the Twilio Console.
Please note: until you complete Meta business verification, some numbers may stay in a pending status and cannot be used to send messages. After completing Meta business verification, you may need to delete the WhatsApp senders and go through the process again to onboard them completely.
Create a Messaging Service
To create a Messaging Service, go to Messaging > Services and click Create Messaging Service.
Step 1. Fill in the following fields:
Messaging Service friendly name - come up with a name for your Messaging Service (e.g. Order Chats)
Select what you want to use Messaging for - choose the goal that best suits your chats.
Click Create Messaging Service.
Step 2. Click Add senders, select WhatsApp Number and choose the number for which you want to enable Messenger Service. You can further customize the selected number.
Sticky Sender - ensures consistency for message recipients by selecting the same From phone number you previously used in conversation with a given customer.
Area Code Geomatch - Use local phone numbers with area codes that match or overlay your recipient's phone number when sending messages to the US and Canada.
These features are enabled by default. To turn them off, click on the toggle switch.
You can also add more numbers if you did not select several numbers in the previous step by clicking the Add Senders button, or delete an already added number by clicking Remove next to it.
Select the numbers you want to set up and click Step 3. Set up integration.
Step 3. On this step, you need to set up webhooks to automate processes and synchronize data between your Twilio and Orderry accounts.
Select the Use webhooks option and paste the necessary links in the following fields:
In the Request URL and Fallback URL fields – same link:
In the Callback URL field:
The HTTP Post option should be enabled next to the Request URL and Fallback URL fields.
We recommend leaving the default value of 14400 in the Validity period field. Validity Period refers to the number of seconds for which messages sent from your Messaging Service will remain in Twilio's platform. If the time taken to send the message exceeds the Validity Period, Twilio fails the message and sends a request to your status callback URL to notify your application of the failure.
To continue, click Step 4: Add compliance info.
Step 4. Add compliance information. This can be done by registering for the A2P 10DLC (10-digit code) in the United States.
This is a system in the United States that allows businesses to send app-to-person (A2P) messages using 10-digit phone numbers (10DLC). Registering for A2P messages will improve delivery quality and reduce filtering.
Important: this step is not mandatory.
To finish creating the Messaging Service, click Complete Messaging Service Setup.
An important step in setting up your Twilio account is to configure HTTP Basic Authentication in your Twilio account so that media receiving works correctly.
To do so, go to Messaging > Settings > General > HTTP Basic Authentication for media access, select the Disabled option, and click Save at the bottom of the page to save your changes.
You're done! The last step is to connect to Orderry, after which you will be able to use WhatsApp to communicate with your customers.
Connect to Orderry
1. On the Twilio dashboard, go to the Account Info section. Here you'll find the Account SID and Auth Token you need to connect to Orderry chats. Copy this information.
2. Then go to Messaging > Services and find the Messaging Service you created. Copy its Sid.
3. In Orderry, go to Settings > Chats and click + Channel. Select the WhatsApp by Twilio resource.
4. Fill in all the fields:
Channel name - come up with a name for your WhatsApp channel that you will use to communicate with customers.
Account SID - paste the Account SID code copied from your Twilio account.
Important: if a channel with an identical Account SID is already connected by another company, the system does not allow you to connect a new channel with the Account SID in Orderry. To fix this, you need to delete the existing integration in another company and then add a channel with this Account SID to Orderry.
Auth Token - paste the Auth Token code copied from your Twilio account here.
Phone number - enter the phone number that you have registered with Twilio and will use to communicate with customers.
Please note: you can connect only one channel per WhatsApp number. That is, if you already have an SMS channel connected to the same WhatsApp number, you will not be able to create a WhatsApp channel.
Messaging Service Sid - here you need to paste the Messaging Service Sid code copied from the Messaging Service page.
5. Configure the Access to channel:
All - all employees of the company will have access to the Chat settings, provided that such access is allowed by the system;
Selected - only selected employees will have access to the Chat settings, provided that they are authorized by the system;
Owner - only the company owner will have access to the settings.
To change the settings for employees' access to Chat and Chat settings, go to Settings > Employees > Roles and edit the necessary settings.
6. Click Create.
You're done! Now you can chat with customers using WhatsApp directly in Orderry. More information on how to use WhatsApp templates in Orderry can be found here.
WhatsApp pricing
WhatsApp pricing is calculated based on Meta's conversation-based pricing fee and Twilio's per-message fee.
The first 1000 conversations per month are free, provided they occur within the first 24 hours of receiving a message from a user. Any conversations you initiate after that period are chargeable.
For example, $0.015 for each conversation and $0.005 for each message from US number.
Thus, the total cost of using WhatsApp includes both the per-conversation fee from Meta and the per-message fee from Twilio. For more information on pricing of WhatsApp from Twilio, click here.