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

# Message templates

> Build a WhatsApp message template, get it approved by Meta, and use its variables in a broadcast.

A message template is a pre-written message that Meta has reviewed and approved. It is the only
thing WhatsApp delivers to someone whose 24-hour window has closed — which is almost everyone you
would broadcast to.

**Templates are WhatsApp-only.** Nothing else in DMLY uses them. Facebook, Instagram, SMS and
Telegram broadcasts have no template picker and never need one — see
[what the other channels do instead](#what-the-other-channels-do-instead). The **Templates** item in
the sidebar only opens on a WhatsApp channel; on any other channel it tells you *Message templates
are only available on WhatsApp channels.*

## Why templates exist

WhatsApp lets you send a free-form message only within 24 hours of a contact's last message to you.
Outside that window Meta delivers approved templates and nothing else. So:

**Templates start conversations. Free-form continues them.**

A broadcast is by definition a conversation you are starting, which is why a WhatsApp broadcast
shows no message box at all — only a template picker. The wizard says so plainly: *Broadcasts send
an approved WhatsApp template — you can't type a message directly. Only approved templates are
listed.*

<Note>
  Templates belong to your WhatsApp Business Account, not to one number. Every approved template in
  the workspace is available on every WhatsApp channel you have connected — the list on the
  **Templates** page is workspace-wide, not filtered by the channel selector.
</Note>

## Approved is the only status that sends

Saving puts a template into **Pending**; Meta then returns **Approved** or **Rejected**. **Draft**
means the submission didn't reach Meta — save it again.

Only **Approved** templates appear in the broadcast picker, the Inbox composer, or anywhere else you
choose a template. DMLY checks approval twice: once when it builds the list, and again at the moment
of sending. If Meta revokes a template between scheduling a broadcast and sending it, those sends
fail rather than going out as something else.

<Warning>
  If an automated message — an appointment reminder, an invoice, a receipt — has no approved
  template and the contact's window is closed, DMLY sends nothing at all. It does not quietly
  downgrade to a free-form message that Meta would reject. Check your `dmly_` templates are
  **Approved** before assuming a notification bug.
</Warning>

## Build a template

<Steps>
  <Step title="Open the Templates page">
    Go to **Messaging → Templates** on a WhatsApp channel and select **Add template**.
  </Step>

  <Step title="Name it">
    **Template name** is the name Meta references: lowercase letters, numbers and underscores only,
    up to 100 characters. You cannot rename it later without submitting a new template.
  </Step>

  <Step title="Pick a category and language">
    **Category** is **Marketing**, **Utility** or **Authentication**. Meta reviews against the
    category you choose, so pick honestly — a promotion filed as Utility is a rejection.

    Marketing adds a **Type of marketing message** choice: **Custom Message** (text, media and
    buttons), **Catalog Message** (products from your connected catalog), or **Carousel Message**
    (up to 10 swipeable cards).
  </Step>

  <Step title="Write the body">
    **Body** is the message itself, up to 1024 characters. Add personalisation with **Add variable**
    — see below.
  </Step>

  <Step title="Add a header, footer and buttons if you need them">
    All optional. A **Header type** of Image, Video or Document requires a **Sample header media**
    file, because Meta reviews media templates against a sample: JPG/PNG up to 5MB, MP4 up to 16MB,
    PDF up to 100MB.
  </Step>

  <Step title="Save">
    Saving submits the template to Meta immediately and sets it to **Pending**. There is no separate
    submit button.
  </Step>
</Steps>

<Note>
  With no live WhatsApp number connected, saving keeps the template locally and tells you: *Template
  saved. Connect a live WhatsApp number to submit it to Meta for review.* Nothing reaches Meta until
  a number is connected.
</Note>

### Limits Meta enforces

| Part           | Limit                                                       |
| -------------- | ----------------------------------------------------------- |
| Body           | 1024 characters                                             |
| Header text    | 60 characters                                               |
| Footer         | 60 characters                                               |
| Buttons        | 10 per template — at most 2 URL, 1 call, 1 copy-code        |
| Button text    | 25 characters                                               |
| Carousel cards | 2 to 10, each with a 160-character body and up to 2 buttons |

## Variables

Variables are numbered placeholders — `{{1}}`, `{{2}}` — that you fill in per recipient when you
send. Select **Add variable** to insert the next one; it numbers them for you.

One rule the builder blocks you on, and one Meta will reject you for:

* A template can't **start** or **end** with a variable. Meta wants text around it.
* Every variable needs a **sample value** for review. That value is only for Meta's reviewer — it is
  never sent to anyone.

<Tip>
  Use **Add variable** rather than typing the braces yourself. DMLY counts variables by the highest
  number in the body, so writing `{{1}}` and `{{3}}` with no `{{2}}` produces three parameter boxes
  at send time — one of which does nothing useful.
</Tip>

### Filling variables in a broadcast

Once a template is approved, picking it in a broadcast shows one **Enter parameter** box per
variable, under **Body parameters**. Each box takes either a fixed value or a personalisation token,
so a template with one variable can greet everyone by name: put `{{first_name}}` in parameter 1 and
DMLY resolves it per recipient as it sends. Custom fields work the same way — for example
`{{custom.order_id}}`.

This is the split worth understanding: **Meta approves the template's wording; you supply the
variable values at send time.** Changing what goes in a variable never needs re-approval. Changing
the sentence around it does.

## Approval

Meta reviews automatically. Most templates come back within minutes, but Meta allows itself up to 24
hours — plan a campaign around a day of slack, not five minutes.

Use **Refresh templates** on the **Templates** page to pull current statuses from Meta; the page
shows when it last synced. Statuses only change when you sync, so refresh to find out whether Meta
has approved yours yet.

<Accordion title="The template came back Rejected">
  The rejection reason from Meta is saved and shown on the template, with **Edit to fix**. The usual
  causes are a category mismatch (marketing content submitted as Utility), promotional wording in a
  Utility template, or a placeholder-heavy body with too little real text. Fix the content and save
  again to resubmit.
</Accordion>

<Accordion title="I edited an approved template and nothing changed">
  This is the big one. **Edits to a template Meta has already accepted are not pushed.** DMLY tells
  you when it happens — *Template saved. It already exists on WhatsApp — edits to a submitted
  template aren't pushed automatically* — and the message that actually sends is still the one Meta
  approved. To change approved wording, create a new template under a new name.
</Accordion>

<Accordion title="System vs My Templates">
  **System** holds the templates DMLY ships and maintains, marked **Managed by DMLY**. They are
  named `dmly_…` and power appointment reminders, invoices, receipts, review requests and the rest.
  They are submitted to Meta for you when you connect a live number.

  **My Templates** is everything you build. Broadcasts can use either, as long as it is approved.
</Accordion>

## What the other channels do instead

<Columns cols={2}>
  <Card title="Facebook & Instagram" icon="facebook">
    No templates. You type a plain message. Meta only delivers it to people who messaged you in the
    last 24 hours, or who opted in to notifications — everyone else is skipped.
  </Card>

  <Card title="SMS & Telegram" icon="comment-sms">
    No templates and no messaging window. You type the message and it sends to everyone, with
    personalisation tokens resolved per recipient.
  </Card>
</Columns>

The practical consequence: WhatsApp is the only channel where reaching a cold contact is a solved
problem. On Messenger and Instagram, a contact outside the window with no opt-in simply cannot be
broadcast to.

## Related

<Columns cols={2}>
  <Card title="Create a campaign" icon="bullhorn" href="/broadcasts/create-campaign">
    Pick a template, fill its variables and send.
  </Card>

  <Card title="WhatsApp rules and limits" icon="gauge" href="/broadcasts/whatsapp-rules-and-limits">
    How the 24-hour window plays out across a whole campaign.
  </Card>

  <Card title="Connect WhatsApp" icon="whatsapp" href="/channels/whatsapp">
    Set up the number your templates belong to.
  </Card>

  <Card title="Sequences" icon="list-ol" href="/automation/sequences">
    Multi-step follow-ups on Facebook and Instagram — no templates involved.
  </Card>
</Columns>
