Template buttons and variables
Add call, website, copy-code, custom and form buttons to a template, and personalise it with variables.
Buttons let customers act on your message with one tap: call you, open a page, copy a code, send a quick answer or open a form. Variables fill in details that change per person, like a first name or an order number.
Add buttons#
- In the template editor, scroll to Buttons.
Click the type you want. Each click adds one button:
- Call phone number: opens the customer's phone dialer. Fill in Button text, Country and Phone number.
- Visit website: opens a link. Fill in Button text and Website url.
- Copy offer code: copies a code, such as a discount code. Fill in a Sample code.
- Custom button: a quick reply the customer taps instead of typing. Fill in Button text.
- Open a form: opens one of your WhatsApp forms. Fill in Button text and choose the Form.
- To remove a button, click the × on its card.

How many buttons you can add#
| Button | Maximum |
|---|---|
| All buttons together | 10 |
| Visit website | 2 |
| Call phone number | 1 |
| Copy offer code | 1 |
| Open a form | 1 |
| Custom button | the rest, up to 10 |
A button type greys out once you reach its limit. Custom buttons always show first in the message. With more than 3 buttons, WhatsApp shows 2 and puts the rest under See all options.
Carousel cards work differently: each card has 1 or 2 buttons, the same on every card. See Carousel templates.
Links that change per message#
A Visit website button can open a different link for each customer, such as their own order page.
- End the Website url with
{{1}}, for examplehttps://example.com/order/{{1}}. The variable must be at the very end of the link. - Fill in Sample URL with a complete example link, such as
https://example.com/order/12345. Meta requires it to review the template. - When you send the template, in a campaign or through the API, you only provide the part that replaces
{{1}}, for example12345.

Variables in the header and body#
- Body: click Add variable to insert
{{1}},{{2}}and so on, and give each one a sample under Samples for body content. - Text header: you can add one variable,
{{1}}, with its own sample.
You choose what fills each variable when you send the template:
- In a campaign, pick static to type a fixed value for everyone, or dynamic to use a detail from each contact: contact first name, contact last name, contact full name, contact phone or contact email. See Send a campaign.
- Through the API, you send the values yourself. On an approved template, Copy API payload in the template's menu gives you a ready-made request body. See the Messages API.
Good to know#
- Write variable samples with made-up data. Meta reviews them together with the template.
- A dynamic variable uses what's saved on each contact. Before you send, check that your contacts have that detail filled in, for example a first name.
- The Form list shows the forms published under Automation › Forms, the ones marked Ready to send. Build the form there before you add the button.
- Editing a form later publishes it as a new version and retires the old one. A template you already made keeps pointing to the old version.