> For the complete documentation index, see [llms.txt](https://docs.saleschat.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saleschat.pro/getting-started/whatsapp-waba-templates.md).

# WhatsApp (WABA) templates

Bring your Meta-approved WhatsApp templates into Saleschat, set how their parameters are filled, and keep them in sync with Meta or Interakt.

Templates are the WhatsApp messages Meta has approved for your WhatsApp Business Account (WABA). Journeys and human agents use them to start conversations with leads. You create and submit templates with your provider, either Meta or Interakt, and then bring the approved ones into Saleschat, where you decide how their parameters are filled and who can use them.

## Register a template

Before you start, create the template with Meta or Interakt and wait for it to be approved. Saleschat accepts only templates in the `APPROVED` state, so a template that is still pending review can't be registered. Registering a template needs the Owner or Admin role.

1. In Saleschat, open **Templates** and select **+ Register Template**.
2. Under **Select Waba**, choose the WABA the template belongs to.
3. Enter the template's name in **Search by Template Name** and select **Search**. Saleschat fetches the template from your provider and shows its content. If the template is already registered, Saleschat says so.
4. Under **Parameters**, set each parameter's type and tag, as described in [Parameter types](#parameter-types).
5. Select **Register** and confirm.
6. Back on the **Templates** page, set **Enabled** and **Visible** the way you want them. See [Control where a template can be used](#control-where-a-template-can-be-used).

## Supported components

Saleschat registers templates in the **Marketing** and **Utility** categories. Authentication templates aren't supported. Within a template, check this table before you submit it, so that it uses only components Saleschat can send.

| Component    | Supported     | Notes                                                                                                 |
| ------------ | ------------- | ----------------------------------------------------------------------------------------------------- |
| **Body**     | Yes, required | Use numbered placeholders, such as `{{1}}` and `{{2}}`. Named placeholders aren't supported.          |
| **Header**   | Media only    | `IMAGE`, `VIDEO`, or `DOCUMENT`. Text and location headers aren't supported.                          |
| **Footer**   | Yes           |                                                                                                       |
| **Buttons**  | Yes           | `URL`, `PHONE_NUMBER`, and `QUICK_REPLY`. A URL button can have one parameter, at the end of the URL. |
| **Carousel** | No            |                                                                                                       |

### Use one template for many links

A URL button can take only one parameter, at the end of the URL. To send a different link from the same template, set the button's URL to the Saleschat redirect URL below when you create the template, and pass the destination URL as the parameter when you send it:

```
https://apis.saleschat.pro/cta?redirect=
```

To measure clicks, add UTM parameters to your destination URLs and read them in Google Analytics or a similar tool. If you want the UTM values to change per message, put them in the button's parameter.

## Parameter types

Each parameter in a registered template has a type and a tag. The type decides who fills the value, and the tag is the name that identifies which value goes into the parameter. Because Saleschat can fill some values on its own, journeys can send templates with parameters, and human agents don't have to type the same values every time.

| Type           | Who fills it                        | Tag rules                                                                                                           |
| -------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **AUTO\_FILL** | Saleschat, from data it already has | Use one of the supported tags: `sc.contact.name` for the lead's name, or `sc.user.name` for the human agent's name. |
| **USER\_FILL** | The human agent, before sending     | The tag must not start with `sc.` and must be shorter than 128 characters.                                          |

The `sc.contact.name` tag keeps the word "contact" from an older data model, but it reads the lead's name.

Each tag must be unique within a template.

### Media headers

The media you upload when you create a template on Meta or Interakt is only a sample for review. It isn't sent to leads. In Saleschat, you decide which file goes out with the parameter type of the header:

* **AUTO\_FILL**: select **Upload Media** during registration and upload the file to send. Saleschat sends that file every time, so only a pre-approved document reaches leads, and human agents can't replace it.
* **USER\_FILL**: the human agent uploads a file each time they send the template.

{% hint style="info" %}
You can't change a parameter's type or tag after you register the template. To change them, contact the Saleschat team.
{% endhint %}

## Control where a template can be used

Two settings control where a registered template can be used:

* **Enabled or disabled** decides whether journeys and the Saleschat APIs, such as the [Apps API](https://docs.saleschat.pro/api-documentation/apps.md), can send the template.
* **Visible or hidden** decides whether human agents can find and send the template from their chat screen. Hidden templates stay available to journeys and the APIs if they're enabled.

## Keep templates in sync

When a template changes with your provider, Saleschat learns about it through webhooks from Meta or Interakt:

| Change              | Meta   | Interakt            |
| ------------------- | ------ | ------------------- |
| **Template status** | Synced | Synced              |
| **Quality score**   | Synced | Synced              |
| **Category**        | Synced | Synced              |
| **Components**      | Synced | Sync from Saleschat |

Status changes also affect whether the template can be sent. If a template leaves the `APPROVED` state, for example because Meta pauses or rejects it, Saleschat disables it, and enables it again when it's approved.

When Meta reports that a template's components changed, Saleschat compares the new version with the registered one. If the parameters are still in the same places, with the same header parameter type, the same number of body parameters, and the same dynamic button parameters, Saleschat updates the template and keeps your parameter types and tags. You don't need to do anything, and the **State** column shows **Synced**.

If the parameters changed, Saleschat can't map them on its own. It marks the template **Requires Manual Sync** in the **State** column, and disables and hides it so that no journey or human agent sends the old version. A user with the Owner or Admin role then resyncs it:

1. On the **Templates** page, select the arrow next to the template's name.
2. Compare the **New Template** with the **Previous Version** in the preview, and set the parameter types and tags for the new version.
3. Select **Resync Template** and confirm.
4. Check that **Enabled** and **Visible** are set the way you want them.

Interakt doesn't send a webhook when a template's components change. After you edit a template's components on Interakt, select the template's icon in the **Sync** column in Saleschat. Saleschat fetches the latest version and runs the same check: it updates the template if the parameters are unchanged, or marks it **Requires Manual Sync** so you can resync it with the steps above. You can use the **Sync** icon for Meta templates too, to check for changes without waiting for a webhook.

If you delete a template with your provider, disable it in Saleschat. Saleschat doesn't support deleting templates.

## Quick replies

The **Templates** page also holds quick replies. A quick reply is a saved response that human agents can send while the lead's 24-hour conversation window is open. Quick replies aren't WhatsApp templates: you create them in Saleschat with **+ Register Quick Reply Template**, and Meta doesn't review them.
