Creating WhatsApp Templates with Variables
A quick guide to using variables in WhatsApp templates on Maqsam, with simple rules to help your messages get approved and delivered smoothly.
🔍 Overview of Creating WhatsApp Templates with Variables
Variables can be used on all templates built on Maqsam. There are a few differing rules for variables sent in a message.
⚙️ WhatsApp Template Rules
For templates sent out through WhatsApp the following rules apply:
- Variables need to be created and used in sequential order. For example, Meta does not allow 1 words 3 but they allow 1 words 3 words 2.
- Not Allowed: "body": "Hi 1, Your flight will depart from gate 3. Please reply Stop to unsubscribe."
- Allowed: "body": "Hi 1, Your flight will depart from gate 2. Please reply Stop to unsubscribe."
- Variables cannot be right next to each other without a sample or an example. Meta considers variables separated only by a space as next to each other. There additionally needs to be characters separated by a space between variables.
- Example that would need a sample: "body": "Hi 1 2, flight will depart from gate 3. Please reply Stop to unsubscribe."
- Example that would not need a sample: "body": "Hi 1 and 2, flight will depart from gate 3. Please reply Stop to unsubscribe."
- Variables cannot be the start or end of a body string without a sample. Meta considers variable strings ending in a variable + punctuation as a variable at the end of a string. There will need to be extra text after the variable.
- Example that would need a sample: "body": "Hi 1, flight will depart from gate 2."
- Example that would not need a sample: "body": "Hi 1, flight will depart from gate 2. Please reply Stop to unsubscribe."
- Templates cannot have too many variables relative to the message length. The general rule observed for this is for every 'x' variable there needs to be 2x+1 non variable words. For examples, For 2 variables, you need 5 non-variable words.Words being defined as characters separated by a space. There is also a limit of 100 variables per template.
- Not Allowed: "body": "Hi 1, gate 2. Thank you."
- Allowed: "body": "Hi 1, Your flight will depart from gate 2. Thank you."
- Variables do allow for non-numeric variables. Variable names cannot have spaces
- Not allowed:
- Allowed:
- Template Body: Enter the content of your message. Make sure it follows WhatsApp’s guidelines for templates. When you copy the template content, from anywhere, and paste it in the body
- Add the variables by clicking on the “add variable button”
- The variables will be added at the end of the text
- Copy each variable and paste it in the intended place