# WhatsApp (Twilio)

### Overview

Millions of businesses use WhatsApp to communicate with their customers, and Yada's WhatsApp integration allows you to easily manage those conversations as a team. Instead of juggling multiple mobile devices to handle WhatsApp conversations, you can efficiently receive and reply to WhatsApp messages from your Yada inbox, and respond faster to every guest.

### Instructions

Your team can manage WhatsApp conversations right from a shared inbox, just like they would email, SMS, or chat. Like other shared channels, WhatsApp channels will need to be set up by a Yada admin.

**Yada's WhatsApp channel is exclusively powered by Twilio, so you will need to use a** [WhatsApp-enabled number from Twilio](https://www.twilio.com/whatsapp). Twilio manages the approval process to enable WhatsApp Business. You will need to secure approval before setting up a WhatsApp inbox in Yada. The approval process follows [WhatsApp's Commerce Policy](https://www.whatsapp.com/legal/commerce-policy/), so be sure to abide by these guidelines to avoid any unnecessary delay.&#x20;

## Part 1 - Twilio Approval

**Step 1**

Sign up or log into your existing Twilio account. In your Twilio dashboard, click the *Develop* tab in the left sidebar. Open the *Phone Numbers* section, click *Manage*, then select *Buy a number*.

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FgZlAfcZrOFvL3ZAb84bA%2Febf8d586-4e43-497a-8300-fe401ee1e8c2.png?alt=media&#x26;token=04804d75-9bcd-4727-843d-bd91ebfcfb43" alt=""><figcaption></figcaption></figure>

If you've already purchased a Twilio number, you can also use this existing number. You can also port a number into Twilio by following Twilio's [usual process](https://support.twilio.com/hc/en-us/categories/203267567-Porting).

**Step 2**

If you are purchasing a new number, select all of the options you need under *Capabilities* and complete the check out process to select your number.

You can skip this step if you already have a Twilio number.

**Step 3**

Click the *Develop* tab in the left sidebar. Open the *Messaging* section, click *Senders*, then select *WhatsApp senders*.

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FmxBmhpiDkGxsXp7QJ7mL%2F63ed0b37-4059-435b-8668-b9b22c829940.png?alt=media&#x26;token=90b64915-0ef5-47ee-92db-ed437b6ee23b" alt=""><figcaption></figcaption></figure>

**Step 4**

Fill out the [form](https://www.twilio.com/whatsapp/request-access) that appears.

**Step 5**

Click *Submit Request* to start the WhatsApp approval process. It may take several business days for Twilio to complete your approval.

You can monitor number approvals in the *Status* section of your *WhatsApp Enabled Senders* dashboard.

**Step 6**

Once your number is approved, proceed to Part 2 to set up your Twilio WhatsApp inbox in Yada.

## Part 2 - Connecting Yada to Twilio

**Step 1**

**You must be logged in as an admin**. Go to the "Integrations" page in yada and select "Twilio"

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FqDDh4wholfR7HYe3v0R4%2FScreenshot%202024-04-23%20at%2011.42.51%E2%80%AFAM.png?alt=media&#x26;token=3a1d4248-c791-44ae-b4fb-0e318daa7b8e" alt=""><figcaption></figcaption></figure>

**Step 2**

Copy the twilio Account SID and Auth Token

The *Account SID* and *Auth token* are found in your Twilio Console Dashboard, by clicking on your company name at the top left corner of Twilio.

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2Fqi3V8iaJMC4kqnRhZbgM%2F9fadfd7a-6d7b-4d61-a4a8-fc086d58a5de.png?alt=media&#x26;token=824c4954-92f5-4654-8191-dceb2cee0cc8" alt=""><figcaption></figcaption></figure>

**Step 3**

Once you've entered your Twilio account credentials, a new card will appear below the SID and Auth Token card. Click the "Refresh" button to get the most up-to-date list of available phone numbers

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2F5V7JC2DfYJN0b6Vs6cFs%2FScreenshot%202024-04-23%20at%2011.45.32%E2%80%AFAM.png?alt=media&#x26;token=47f34db3-e340-40a0-bf27-2429fa4d1ff2" alt=""><figcaption></figcaption></figure>

**Step 4**

Select your WhatsApp enabled number from this list

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FRY6OdkkfQJvg151reUwk%2FScreenshot%202024-04-23%20at%2011.46.57%E2%80%AFAM.png?alt=media&#x26;token=8b4aab3b-d39b-4c8c-8d7f-3ac4b38e6b91" alt=""><figcaption></figcaption></figure>

At this point, the number has been associated with the whatsapp sender, and the number webhooks have been set up. There is **one more webhook step** which we will need to take.

## Finalizing Webhook

Yada has successfully at this point created the incoming and outgoing messaging webhooks for the *phone number* but we still need to make sure these webhooks are also associated with the **whatsapp sender**

Not to worry, there's only one more copy / paste to go!

**Step 1**

In your Twilio dashboard, click the *Develop* tab in the left sidebar. Open the *Phone numbers* section, click *Manage*, then select *Active numbers*.

**Step 2**

In the settings for your WhatsApp number, scroll down to the *Messaging* section. Copy the full URL from the *'A Message comes in' Webhook* section-- you will use this later in the setup process.

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FWfEncsvaYfltfLtiU9aZ%2F394b8eec-c42f-417c-bedd-e147ade0b2c5.png?alt=media&#x26;token=a189db4b-2f9b-4fc5-970c-71aa9d2b3317" alt=""><figcaption></figcaption></figure>

**Note:** If your Twilio number does not show a Messaging section, or the webhook URL is not set, please  [reach out to our support team](mailto:team@yada.ai), who will be happy to provide you with the webhook URL for your number.

**Step 3**

In the *Develop* tab in the left sidebar, open the *Messaging* section, click *Senders*, then select *WhatsApp senders*. Select your WhatsApp number to open its settings.

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FqXushxaVGDRmEUFglhKs%2F177dde6a-912f-448f-a94b-b4e72aa7334f.png?alt=media&#x26;token=215b6c9b-c6cc-4fdd-a9d3-26ede97d1be5" alt=""><figcaption></figcaption></figure>

**Step 4**

Under *How would you like to configure this sender?*, select *Use webhooks.* Paste the webhook URL that you copied in Step 2 into the *'Webhook URL for incoming messages'* field.

<figure><img src="https://112898604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAtZGXRaOVDks4wm8zpn3%2Fuploads%2FuIILBLYodtAbT3Tf4EOV%2F663d2f2c-8eb4-4e9d-a5e9-80e2c8719102.png?alt=media&#x26;token=39226e2a-1913-45cc-b691-cba76bd2e27e" alt=""><figcaption></figcaption></figure>

**Step 5**

Click *Update WhatsApp Sender.*

**Step 6**

Refresh your page to ensure the webhook URL is present. If it is not displayed, repeat Steps 4 and 5 until you've ensured that the webhook URL appears after saving/refreshing the page.

**Step 7**

Now, test the connection by sending a message to your shared inbox from another WhatsApp number (such as your personal phone). Your message should show up immediately in Yada
