# Create and Manage WhatsApp Message Templates in Robylon

Create WhatsApp message templates, submit them to Meta for approval, track their performance, and send them from the inbox, workflows, voice agents, campaigns or the API.

> Source: https://www.robylon.ai/docs/whatsapp/templates
> Section: WhatsApp

A WhatsApp template is a message you have pre-approved with Meta. You need one to message a customer first, or to reply after the 24-hour window has closed. Robylon lets you create templates, submit them for review, and see how each one performs.

Open templates from [**Outbound → WhatsApp**](https://app.robylon.ai/apps/outbound/whatsapp) in the left navigation.

## The templates page

The top of the page shows your WhatsApp Business account, its messaging tier, and how many templates you have and how many are approved. Use **Open in Meta Business Manager** to manage the account in Meta.

The list shows each template with:

| Column | What it shows |
| --- | --- |
| **Template** | The name, Meta's quality rating for it, its category and language, and a line showing its **Backup** (the backup's name, or **none**) and, for Marketing templates, its **Retry** (the number of days, or **off**). |
| **Last Used** | When it was last sent. |
| **Status** | Meta's review status, for example Approved or Rejected. |
| **Sent**, **Delivered**, **Read**, **Replied**, **Failed** | How many were sent, and the share delivered, read, replied to and failed. |

Filter by **Category**, **Status**, **Backup** (**Set** or **Not set**) and **Retry** (**On** or **Off**). Robylon refreshes templates from Meta each time you open the list, so templates created in Meta Business Manager appear here too.

<Frame>
  <img src="/assets/docs/app-whatsapp-templates.webp" alt="WhatsApp templates list in Outbound, with category and status filters and each template's status" width="2160" height="1350" />
</Frame>

## Create a template

Choose a category and type, write the content, and submit it to Meta for review.

<Steps>
  <Step title="Start a template">
    In [**Outbound → WhatsApp**](https://app.robylon.ai/apps/outbound/whatsapp), click **Create template**.
  </Step>
  <Step title="Choose the category and type">
    Choose **Marketing** or **Utility**, then the type of message, and click **Continue**. See [which category to choose](#choose-a-category).
  </Step>
  <Step title="Name it and pick the language">
    Enter a **Name** (up to 512 characters) and choose the **Language**. The name and language cannot be changed later.
  </Step>
  <Step title="Write the content">
    Add an optional **Header** (text up to 60 characters, or an image, video or document), the **Body** (required), and an optional **Footer** (up to 60 characters). Use **Add variable** to insert placeholders that are filled in when the message is sent.
  </Step>
  <Step title="Add buttons (optional)">
    Add up to 10 buttons: **Custom** (a quick reply), **Visit website**, **Call on WhatsApp** or **Call phone number**. With more than 3 buttons, WhatsApp shows them as a list.
  </Step>
  <Step title="Set the options">
    For Utility templates, you can set a custom **Message validity period**. Under **Robylon settings**, turn on **Live agent access** to let your team send this template from inside a conversation. For Marketing templates, turn on **Retry if template marked as spam** to resend messages WhatsApp rejects for the customer's daily marketing limit. See [Retry](https://www.robylon.ai/docs/whatsapp/send-retry).
  </Step>
  <Step title="Submit">
    Check the **Template preview** and click **Submit for review**. The template is sent to Meta with the status Pending.
  </Step>
</Steps>

You can only send a template once Meta approves it. If a template is rejected, Robylon shows Meta's reason. Fix the content and submit again.

## Choose a category

| Category | For | Types |
| --- | --- | --- |
| **Marketing** | Welcome messages, promotions, offers, coupons, newsletters and announcements. | **Default** (media and custom buttons), **Calling permissions request** (asks customers if you can call them on WhatsApp). **Catalog** is coming soon. |
| **Utility** | Messages about an existing order or account: order confirmations, account updates, receipts, appointment reminders, billing. | **Default**, **Calling permissions request**. |

Choose honestly: Meta can reject a template, or change its category, if the content does not match. Marketing templates also need the customer to have agreed to receive marketing messages.

## How variables work in templates

Variables are placeholders filled with real values when a template is sent, for example the customer's name. Choose the **Type of variable** for the template:

- **Number:** placeholders are numbered, `{{1}}`, `{{2}}` and so on.
- **Name:** placeholders have names, for example `{{customer_name}}`.

Enter a sample value for each variable under **Variable Samples** before you submit, so Meta's reviewers can see what a real message looks like. Use made-up values, not real customer information.

## Edit an approved template

You can edit an approved template's content, category and Robylon settings. The name and language are fixed.

* **Content and category** go to Meta. Click **Re-Submit for Review**, and the template is Pending again until Meta approves it.
* **Robylon settings** (**Live agent access** and **Retry if template marked as spam**) are saved in Robylon only and never go to Meta. An edit that changes only these shows **Save changes**, and the template stays approved.

## Backup templates

A backup is a second template that campaigns and workflows send instead of the main one when Meta rates the main template Red, pauses it or disables it. Set it on the template's page, under **Backup Template**. The templates list shows **Backup: none** for templates without one. See [Backup templates](https://www.robylon.ai/docs/whatsapp/backup-templates) for when it is sent, the rules for choosing one, and how to map its variables.

## Retry

Retry resends a Marketing template's message on a later day when WhatsApp rejects it because the customer has reached their daily limit of marketing messages. Turn it on under **Robylon settings** with **Retry if template marked as spam**. See [Retry](https://www.robylon.ai/docs/whatsapp/send-retry).

## Where to send templates from

- **The inbox:** agents can send templates with **Live agent access** turned on, in an open conversation or to start a new one. See [Unified inbox](https://www.robylon.ai/docs/inbox/unified-inbox).
- **Workflows:** use the send WhatsApp template action. See [Workflows](https://www.robylon.ai/docs/product/product).
- **Voice agents:** the WhatsApp outbound message function sends a template during a call. See [Prompt and tools](https://www.robylon.ai/docs/voice/prompt-and-tools#built-in-functions).
- **Campaigns:** send a template to an audience. See [WhatsApp campaigns](https://www.robylon.ai/docs/whatsapp/campaigns).
- **The API:** send a template from your own systems (below).
- **A webhook:** let another system, for example your store, trigger the template (below).

## Send a template with the API

Open the template from the list and go to its **Integrations** tab. Under **API Access** it shows the **Endpoint** and a **Sample Payload** already filled in with the template's IDs. Send a `POST` request to `https://api.robylon.ai/chat/outbound/whatsapp/send/` with your API key in the `X-API-Key` header:

```json
{
  "template_id": "YOUR_TEMPLATE_ID",
  "recipient_phone_number": "+15551234567",
  "waba_id": "YOUR_WABA_ID",
  "phone_no_id": "YOUR_PHONE_NUMBER_ID",
  "template_variables": {}
}
```

The phone number must include the country code. Your **WABA ID** and **Phone Number ID** are also on the number's **Profile** tab in [**Settings → Channels → WhatsApp**](https://app.robylon.ai/settings/channels/whatsapp/interface). Create API keys as described in [API keys](https://www.robylon.ai/docs/developers/api-keys).

If the template has variables, the sample payload lists them in `template_variables`, grouped under `body`, `header` and `buttons`. Keep the variables in the order the sample payload lists them, and put the value to send in each one's `value` field:

```json
"template_variables": {
  "body": {
    "variables": [
      { "position": 1, "value": "Priya" }
    ]
  }
}
```

If the request fails, the response has status 400 and an `error` message.

## Trigger a template with a webhook

Another system can trigger a template with a webhook. On the template's **Integrations** tab, **Webhook Trigger** gives you a **Webhook URL**. Point Shopify, Razorpay or any system that sends outgoing webhooks to it, and Robylon sends this template to the phone number in each payload.

Under **Payload Mapping**, set the **Incoming Field** that holds the recipient's phone number and each template variable. Use dot notation for nested fields, for example `order.customer.phone`. Click **Save Webhook Configuration**.
