# WhatsApp and email templates

> Create WhatsApp templates for Meta approval, with variables and buttons, and MJML email templates with a live preview and an unsubscribe link.

Templates are ready-made, reusable messages. The **Templates** screen has two tabs: **Messages**, for WhatsApp and API, and **Email**, for email campaigns.

## What WhatsApp templates are for

On WhatsApp Cloud, a Meta-approved template is the only way to reach a customer after the 24-hour window closes, to start a conversation and to send campaigns. On **API** and **WhatsApp (Evolution)** inboxes, the template is local: it has a body only and is approved right away.

## Creating a WhatsApp template

1. In the menu, open **Templates** and click **New template**.
2. Pick the **Source inbox**. It sets the channel and, on WhatsApp Cloud, the WhatsApp Business account where the template is created.
3. Enter the **Language** as a Meta code, for example `en_US`.
4. Fill in the **Name**. It is saved in lowercase without spaces; the field shows how it will look.
5. Pick the **Category**: **Marketing**, **Utility** or **Authentication**.
6. Write the message **Body**.
7. Optionally add a **Header (text)**, a **Footer** and **Buttons**.
8. Fill in an example for each variable and, optionally, pick the audience segments.
9. Check the **Preview** and click **Create template**.

### Category

- **Utility**: messages about something the customer already did or asked for, such as an order confirmation, delivery status or payment reminder.
- **Marketing**: promotions, news and any sales message.
- **Authentication**: access and verification codes.

Once a template is approved, Meta doesn't allow changing its category.

### Variables

Use named variables in the body, in snake_case, such as `{{name}}` and `{{order}}`. For example: `Hi {{name}}, your order {{order}} is out for delivery.`

Variables only work in the body. For each one, enter an **Example value**: examples are required and are sent to Meta for review.

### Buttons

A template takes up to 10 buttons: up to 10 **Quick reply**, 2 **Open URL**, 1 phone and 1 **Copy code**.

- The URL must start with `https://`. For a dynamic URL, end it with a variable, such as `https://shop.com/order/{{order}}`, and enter a **Full URL example**.
- The phone number goes in international format, such as `+15551234567`.
- For **Copy code**, enter an **Example code**. The real code is filled in when sending.

### Audience by segment

Under **Audience — segments**, you can link the template to segments. In a conversation that has a segment, Conversations shows only that segment's templates plus the templates with no segment, which apply to the whole account. See [Labels and segments](https://talkvend.com/en/help/etiquetas-e-segmentos).

## Approval status

WhatsApp Cloud templates go to Meta for review as soon as you create them. The status shows in the list and on the template page:

- **Pending**: under review. Meta usually takes from minutes to hours to respond.
- **Approved**: ready to use.
- **Rejected**: Meta declined it. Adjust the content and submit again.
- **Paused** and **Disabled**: the template's use is suspended at Meta.

The status updates on its own when Meta responds. On the template page, **Sync** fetches the status right away.

## Editing, deactivating and deleting

- **Edit**: saving resubmits the template to Meta, and it goes back to **Pending** until approved again. Meta allows editing an approved template at most once every 24 hours and 10 times in 30 days.
- **Deactivate**: a local action. The template stops showing up for sending but stays at Meta. **Activate** brings it back.
- **Delete**: permanently removes the template from here and from Meta.

> **Warning:** deleting can't be undone. To just hide the template, use **Deactivate**.

## Creating an email template

Email templates are used in campaigns from email inboxes.

1. In **Templates**, open the **Email** tab and click **New email template**.
2. Fill in **Name** and **Subject**. The subject accepts variables.
3. Optionally fill in the **Preview text**, shown next to the subject in the customer's inbox.
4. Write the email in the **MJML** editor. The **Preview** beside it updates and switches between **Desktop** and **Mobile**.
5. Click **Create template**.

Use `{{variable}}` to personalize per recipient, such as `{{name}}`. Under **Sample values**, enter values used only for the preview and the test send.

### Unsubscribe link

Put `{{unsubscribe_url}}` where you want the unsubscribe link. If the template doesn't have it, a default unsubscribe footer is added automatically. Anyone who unsubscribes goes to the suppression list.

### Images

In the **Images** panel, click **Upload image** and then **Insert into MJML**. The image link is public so email clients can load it.

### Test before using

Click **Send test**, pick the **Email inbox** and the address under **Send to**. The test uses the saved version of the template, with the sample values.

> **Tip:** keep an eye on the size shown in the preview. Gmail clips emails over 102 KB of HTML.

To send templates in bulk, see [Campaigns](https://talkvend.com/en/help/campanhas).
