Skip to main content

Template variables

Placeholders let one approved template carry different content each time it is sent.

Who can do this

  • Developer
  • Owner
  • Admin
  • Agent

The three stages

A variable passes through three stages, and confusing them is the usual cause of a rejected or wrong-looking message.

StageWhat it isWhere you set it
Placeholder{{1}}, {{2}} in the template textThe template builder
Sample valueA realistic example Meta reviews againstThe template builder, next to each placeholder
ParameterThe actual value used at send timeThe campaign form, the inbox template picker, or an automation's variable mapping

The sample value is never sent to a customer. It exists so Meta's reviewer can tell what the message will look like.

Rules

  • Number them in order, starting at {{1}}. Gaps confuse review.
  • Every placeholder needs a sample value, or the template is submitted without examples and is likely to be rejected.
  • Do not start or end the body with a placeholder. Put a word before it: Hi {{1}}, ... rather than {{1}}, ....
  • Do not put two placeholders next to each other. Separate them with text.
  • Placeholders are allowed in the body and in a text header. Not in the footer.

Where the values come from

In a campaign

You type one value per placeholder, and that value goes to everyone in the send. There is no per-contact merge field in campaigns today.

So a campaign template should not use a placeholder for something personal like a first name; it will be the same name for every recipient. Use placeholders for things that vary per campaign, such as a discount code or an end date.

In the inbox

When you send a template into a conversation, you fill in each variable for that one send.

In an automation

This is where per-customer values come from. A Send template step maps each placeholder to a field from the trigger's payload, and each field shows a sample so you can see what it will become.

For a Shopify Order placed trigger, for example, {{1}} might map to the customer's first name and {{2}} to the order number. Full catalogue: Shopify events and variables.

Text interpolation in automation messages

A Send message step (plain text, only valid while the 24-hour window is open) supports inline interpolation, for example:

Order {{vars.order.name}} confirmed. Thanks!

Fields available under vars depend on the trigger. The variable picker in the builder lists them with samples, so you do not have to guess names.

Checking what a variable resolves to

If a Shopify store is connected, SettingsIntegrationsShopify has a variable inspector. It shows what the Shopify variables resolve to for your store, which is the fastest way to confirm a binding before you set an automation live.

Then rehearse the whole automation in Test mode before going live. See testing automations.

Message templates
Building the templates these variables live in.
Getting templates approved
Why sample values matter so much.
Shopify events and variables
The full field catalogue per trigger.