> ## Documentation Index
> Fetch the complete documentation index at: https://cntillion.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp tools

> Let an agent send an approved WhatsApp template from any channel, calls included, or offer tappable choices in a WhatsApp conversation.

The WhatsApp integration on the **Tools** page gives an agent three tools:

* **Send WhatsApp template** sends an approved template to any WhatsApp user,
  from any channel. A phone agent can text a confirmation to the caller's
  WhatsApp while still on the call. This page covers it.
* **Send interactive buttons** and **Send interactive list** offer tappable
  choices to the customer of a live WhatsApp conversation. They work only in
  WhatsApp message conversations. See
  [Interactive messages](https://cntillion.com/docs/channels/whatsapp/interactive-messages.md).

## Set it up

**1. Import your WhatsApp account**

Import the WhatsApp business account into the workspace first. See
[Getting started](https://cntillion.com/docs/channels/whatsapp/getting-started.md).

**2. Add the tool**

Open the agent's **Tools** page, choose **Add tool**, **New tool**, then **Integration**,
and pick **WhatsApp**. Choose **Send WhatsApp template**.

**3. Choose the account**

Under **WhatsApp account**, pick the number the template goes out from. A
workspace with several imported numbers lists them all; the tool only ever
uses the one you pick. If no agent answers that number, templates still go
out, but replies wait in the conversation unanswered.

**4. Agree to the outbound terms**

Templates sent by the agent go out without a person pressing send, so the
first time you save this tool you agree to the
[WhatsApp outbound terms](https://cntillion.com/docs/channels/whatsapp/outbound.md#outbound-terms),
the same ones a WhatsApp campaign asks for.

**5. Choose the channels and the limit**

Under **Channels**, turn on where the agent may send it. A new tool starts
on the chat bubble only: turn on **Phone** to send from calls (it appears
once a phone number is assigned to the agent), and any other channel the
agent talks on. **Templates per conversation** caps how many it can send
from one conversation, from 1 to 10 (3 by default).

## Use the tool

**1. Create a template in WhatsApp Manager**

Create and submit the template in
[WhatsApp Manager](https://business.facebook.com/latest/whatsapp_manager/message_templates).
The tool fills **body** parameters only: a template with a parameter in its
header or a button cannot be sent by this tool.

**2. Tell the agent when and how to use it**

In the system prompt, say when to send the template, its exact name and
language code, and which values go in each parameter. Give one example:

```text theme={null}
When a caller asks for the list of documents, send the WhatsApp template
"documents_pending" in language "en" to the caller's WhatsApp, with
first_name = the caller's first name, company_name = their company and
missing_items = what is still missing. Send it to the number they are
calling from, {{call.lead_number}}, once they confirm it has WhatsApp.
```

**3. Test**

Try it in Preview with **Mock tools** off to send a real template to your
own WhatsApp, or keep it on to see what the agent would send.

The template lands in the customer's WhatsApp conversation on that number as
the business's message. The agent assigned to the number answers when they
reply, with the template in the conversation.

## Parameters and language codes

What the agent fills in:

| Parameter | What it is |
| - | - |
| `whatsapp_user_id` | The recipient's WhatsApp number with its country code, digits only, such as `14155552671`. A `+`, spaces and dashes are removed. |
| `template_name` | The template's exact name in WhatsApp Manager. |
| `template_language_code` | The language the template was approved in, such as `en_US` or `es_MX`. |
| `body_parameters` | One `{name, value}` per body placeholder: the name for a named template (`first_name`), the number for a positional one (`1`). With all names left blank, values fill the placeholders in order. |

The language code must match the template exactly: Meta treats `en` and
`en_US` as two different templates. Some countries write a person's WhatsApp
number differently from the number you dial; see
[recipient numbers](https://cntillion.com/docs/channels/whatsapp/outbound.md#recipient-numbers).

## When it fails

The agent is told why, so it can correct the call or tell the customer:

* **Template not found or not approved**: the name or language code doesn't
  match WhatsApp Manager, or the template belongs to another WhatsApp
  business account than the one the tool uses.
* **A parameter is missing or unknown**: the agent passed the wrong names.
  State the template's parameter names in the system prompt.
* **Header or button parameters**: this tool cannot send that template.
* **The person opted out**: they sent `STOP`, or turned off marketing
  messages from your business for a marketing template.
* **Meta refused it**: the reason and code are passed on; see the
  [Meta error reference](https://cntillion.com/docs/channels/whatsapp/troubleshooting.md#meta-error-reference).

Sending the same template to the same person twice in one turn sends it once.

## Related

> [card] [Interactive messages](https://cntillion.com/docs/channels/whatsapp/interactive-messages.md)
>
> Reply buttons and lists in a WhatsApp conversation.

> [card] [Outbound messages and templates](https://cntillion.com/docs/channels/whatsapp/outbound.md)
>
> Templates, the API, calls and campaigns.

> [card] [Troubleshooting and FAQ](https://cntillion.com/docs/channels/whatsapp/troubleshooting.md)
>
> Delivery problems and Meta's error codes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.