Errors & fixesErrors & fixes

WhatsApp templates with variables in the header: why the preview doesn't show them properly

8 min read

If you're looking at the preview of a WhatsApp template and the header appears empty, with the {{1}} placeholder as is, or with text that isn't what you wrote, nothing is broken: the preview isn't guessing the content of the variable. A template with variables in the header is a mold, not a message. The preview can only show what the mold has defined plus what you enter as a sample value. When that sample is missing, or when the header type doesn't support variables, the preview shows the gap. It's annoying, but it's not serious: it doesn't affect messages that have already gone out and by itself it doesn't block Meta's approval. In most cases you fix it yourself, without support.

What exactly this problem means

A WhatsApp template has parts: header, body, footer and buttons. The header can be text, image, video or document. When the header is text and you add a variable to it, that variable is a blank space that is only filled in at the moment of sending, with the real data of each contact. The preview, on the other hand, is generated before that sending. That's why it needs a sample value: the temporary text that tells the system (and Meta) what shape that gap will have.

The problem, then, isn't that the template is badly written. It's that the preview has nothing to fill the gap with. That shows up in three ways: the header stays blank, the {{1}} placeholder appears unreplaced, or a sample text appears that doesn't match what you expected because it was left over from an earlier version of the template.

The preview is a review aid, not a guarantee of how the message will arrive. The final content depends on the value sent in each case. If you want certainty about the format and the API rules, the source is Meta's official documentation on message templates.

Why it appears: the most common causes

Almost all cases fall into one of these situations. It's worth reviewing them in order, because the first is the most frequent and the easiest to rule out.

  • The sample value for the header variable is missing. This is cause number one. You entered the text with {{1}} but didn't fill in the sample, so the preview has nothing to show.
  • The header doesn't support variables according to its type. An image, video or document header is filled with a file, not with variable text. If you expected to see text there, you're looking at the wrong part of the template.
  • The variable is in the wrong place. Body variables and header variables are counted separately. If you numbered the header as {{2}} because the body already used {{1}}, the preview can get confused or stay empty. Each section starts its own numbering.
  • An old version of the template was left over. You edited the text, but the preview still shows the previous sample because it wasn't saved again with the new value.
  • The sample text has a format that doesn't correspond to the real content. For example, an empty sample, one with only spaces, or one with characters that the system doesn't take as valid text.
  • You're looking at the preview of a different language than the one you edited. Templates can have several versions per language and each one carries its own samples.

How to fix it step by step

These steps can be done by someone who manages the WhatsApp Business panel or the tool you use to manage templates, without touching code. If in your case the template is created from an external platform, the button names may change, but the logic is the same.

  1. 1Open the template in the editor and first look at the header type: text, image, video, or document. If it is not text, do not expect text variables there.
  2. 2If the header is text, check whether it has a variable written as {{1}}. If it does not, the problem is something else: check the body.
  3. 3Find the example value or sample field for the header. It is usually right below the editable text, with a label like 'example' or 'sample'.
  4. 4Write a realistic and complete example, not a space or a period. For example, if the variable is the business name, put 'Panadería Los Tilos'.
  5. 5Save the template. If the preview does not update on its own, exit the editor and re-enter to force a refresh.
  6. 6Check that the header numbering starts at {{1}} and does not continue the body's numbering. If the body uses {{1}} and {{2}}, the header still starts at {{1}}.
  7. 7If the template has multiple languages, repeat loading the example in each language you are going to use.
  8. 8Look at the preview again. If the header now shows your example, the problem was solved in step 4.

If after loading the example the preview is still empty, try duplicating the template and creating a new one with the same structure. Sometimes the problem sticks to a saved version and a new template starts clean. If it still does not appear, then it is worth escalating: it may be a platform or account issue, not your editing.

The time it takes for a change to be reflected varies depending on the platform and the account. There is no single timeframe that can be promised. If several hours have passed and the behavior does not change, gather a screenshot of the template, the language, and the loaded example before writing to support: that speeds up the diagnosis.

How to prevent it from happening again

The error is almost always repeated for two reasons: the example is loaded in a hurry or the template is edited without checking the preview before sending it for approval. A couple of simple habits prevent it.

  • Load the example at the same time you write the variable, not later. If you leave the gap for later, you will forget.
  • Use examples with the real shape of the data: if the variable will carry a name, put a name; if it will carry a date, put a date.
  • Before sending the template for review, look at the complete preview: header, body, footer, and buttons. It is the last cheap check you have.
  • If the template has multiple languages, check each one. The example does not copy itself from one language to another.
  • Save a base template that already works and duplicate it when you need a similar one. Starting from a proven mold reduces oversights.
  • Note in a visible place which templates have variables in the header, so you check them more carefully than fixed-text ones.

How long does Meta take to approve a template

This point always comes up whenever someone touches templates. Meta does not guarantee a more precise approval timeframe than 'up to 48 hours'. It can be less, but the only timeframe that can be stated is that one. The preview does not influence approval: Meta reviews the content of the template, not how it looks in your dashboard. If the template is well written and complies with the policies, the empty preview is not going to make it bounce.

WhatsApp conversation costs are defined by Meta and vary by country. We do not set them, nor does any tool that uses the official API: they are in Meta's official documentation and it is best to check them there before doing the math.

When the real problem is something else and the preview is just the symptom

Sometimes the preview looks bad because something else is broken behind it. These are the cases worth ruling out before continuing to struggle with the header example.

  • The message does not arrive even though the template looks fine. There the problem is not the preview: it could be an expired access token, a misconfigured number or an account issue. The preview has nothing to do with it.
  • The template was rejected by Meta. If the status is 'rejected', the preview is the least of your concerns: you need to review the reason for rejection and correct the content.
  • The header carries an image or a document and it does not appear. In that case the gap is not filled with text: you need to upload the corresponding file.
  • You are testing with data from a test contact that does not have the field that feeds the variable loaded. The preview can look fine and the real send can go out empty, or the other way around.
  • The problem appears only in some languages. It is usually because the example was loaded in one and not in the others.
  • The template looks fine in the dashboard but bad on the phone. There the problem is in the device's WhatsApp client, not in the template.

What to look at if you use a tool to manage WhatsApp

If you manage templates from a platform instead of Meta's direct dashboard, most of these tools use the official API and respect the same rules. The difference is in where they ask you for the example value and how they show the preview. In Wando, for example, templates are loaded with their variables and their examples before being sent for approval, and the preview serves to review them before using them in a campaign. Whatever the tool, if the header has a variable and you did not load the example for it, the preview will show the gap: it is an API rule, not a platform rule.

In summary

A template with variables in the header almost always doesn't display properly in the preview because the example value is missing, because the header isn't text, or because the numbering of the variables got mixed up between the header and the body. It's fixed by loading the correct example, checking the header type, and saving again. It doesn't affect Meta's approval or messages already sent. If after that the preview is still wrong, the problem is probably something else: token, account, language, or platform.

Frequently asked questions

Why does my WhatsApp template show {{1}} in the header instead of the text?+

Because the preview doesn't have an example value loaded for that variable. The {{1}} placeholder is the gap that only gets filled at the actual send. Load an example in the header's sample field and look at the preview again.

Can the header of a WhatsApp template carry text variables?+

Only if the header is of the text type. If the header is an image, video or document, it's filled with a file and not with a text variable. Check the type before looking for the problem elsewhere.

Does the numbering of header variables continue from the body?+

No. Each section starts its own numbering. If the body uses {{1}} and {{2}}, the header still starts at {{1}}. Mixing numbering between sections is a frequent cause of the preview looking wrong.

Does this make Meta reject the template?+

Not on its own. Meta reviews the template's content, not how the preview looks in your panel. An empty preview is not grounds for rejection. The approval timeframe that can be stated is up to 48 hours.

How long does the preview take to update after loading the example?+

It varies by platform and account, so there is no single timeframe that can be promised. If after saving and going back in the header is still empty, try duplicating the template. If that doesn't work either, escalate to support with a screenshot.

Why does the preview look fine but the message arrives with an empty header?+

It may be that the test contact doesn't have the data that feeds the variable loaded, or that the actual send isn't sending the value. The preview uses the example; the send uses the real data for each contact. Check where that data comes from.

What do I do if the header is an image and it doesn't appear in the preview?+

In that case the gap isn't filled with text: you have to upload the corresponding image file. If the header is an image, don't look for a text variable there, because it doesn't apply.

Answer WhatsApp with AI

Try Wando free. No credit card required.