Skip to main content

How to use variables in templates

Step by step

S
Written by Support Team

Variables should only be used for specific personalization, such as names, dates, order numbers, amounts, and specific links. You should never use a variable to replace the core message.
​
For example:

  • ❌ High risk of rejection:
    ​Hi {{1}}, {{2}} and the amount is {{3}}.
    ​
    In the scenario above, Meta cannot determine what variable 2 is without a more concrete context.
    ​

  • ✅ High chance of approval:
    ​Hi {{1}}, your order {{2}} has been confirmed and the total is {{3}}.
    ​
    In the other approved example, the context was more concrete.
    ​

Avoid sequential variables

Meta usually rejects templates that feature variables side-by-side without any text between them. This creates a "blind" text block that could be filled with anything, violating their safety policies.
​

  • ❌ Rejected: Your access code is {{1}} {{2}}.
    ​

  • ✅ Accepted: Your access code is {{1}} and your temporary password is {{2}}.


If it becomes necessary to send links or dynamic media, remember that Meta provides specific Call to Action (CTA) buttons and media headers for this.
​
It is safer and cleaner to put a dynamic link in a button than to drop a long {{3}} at the end of the text or you can even insert the link within the body of the template text.
​


​

Did this answer your question?