> For the complete documentation index, see [llms.txt](https://docs.sortment.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sortment.com/setup/communication-channels/whatsapp/wati.md).

# WATI

## Overview

Sortment lets you send broadcast messages via your existing WATI account. It is required to set up / have a WATI account before configuring the same on Sortment.

### Set up your WATI account on Sortment

1. Navigate to channels
2. Under WhatsApp channel, select WATI as the provider / integration
3. Add the following details
   1. Access token
   2. API endpoint

{% hint style="info" %}
You can find both of these in your WATI dashboard under API docs
{% endhint %}

4. Fetch your Admin access token of the Meta account linked with the phone number being used on WATI

{% hint style="info" %}
***Why is this needed ?***\
This allows Sortment to fetch the templates created against your WATI account from Meta directly. Sortment will use these imported templates to send messages in journeys / campaigns as per requirements.
{% endhint %}

1. Log in to business.facebook.com
2. Navigate to Settings -> Users -> System Users
3. Create an admin system user by clicking on the "Add icon" in the sub-nav bar
   1. Give a user name and assign System user role as admin

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-a2d8efe45a432b6e7e72905ca660c082bf9cf734%2Fimage.png?alt=media" alt=""><figcaption><p>Screenshot of Meta process to create system user</p></figcaption></figure>

{% hint style="info" %}
If you already have created an admin system user, Meta will not allow you to create another.\
\
In this case, you will have to share the created admin system user token with Sortment
{% endhint %}

## Set up Callback for events

This will allow Sortment to listen to necessary events to augment analytics and further audience creation.

To set up the same,

1. Click on '**Webhooks**' on the top navigation on WATI Dashboard
2. Click on '**Add Webhook**'
3. Enter the full webhook URL, set the status as '**Enabled**', and choose the events you would like to capture with this webhook
   1. The URL to be used here is: <https://callback.fyno.io/?fyno-provider=wati>

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-183eb5bb0ab5337f7ff78a35f54866e58cfd9307%2F9d53f50-3_Add_Webhook.png?alt=media" alt=""><figcaption><p>WATI screens for adding a webhook and selecting required events</p></figcaption></figure>

{% hint style="info" %}
The following events should be chosen while setting up the webhook:

1. Template Message Sent
2. Sent Message is DELIVERED
3. Sent Message is READ
4. Sent Message is REPLIED

<br>
{% endhint %}

<br>
