How to use dynamic content in WhatsApp templates
Add profile, custom, and event variables to personalize WhatsApp templates. Dynamic content lets you tailor each message with customer data, such as a first name, loyalty tier, product name, or checkout link.
Because WhatsApp templates require approval from Meta before sending, you must follow specific formatting rules when adding variables.
Before you begin
Connect your WhatsApp Business account to Klaviyo before submitting a template for approval. You can create a draft template before connecting.
Keep the following in mind before adding dynamic content:
- Always include a default value for every variable.
- Preview your template with real data before submitting it for approval.
- If you include links, add a fallback URL.
- Make sure the profile property or event field exists in your account.
Default values keep your message readable when data is missing. If a text variable has no value or fallback, Klaviyo sends a blank space in its place. An empty URL button link can still cause the message to be skipped.
Add profile and custom profile variables
Profile variables pull information stored on a customer’s profile, such as first name or email address. You can also use custom profile properties you have created, such as loyalty tier or preferred store location.
Use Add personalization in the editor to insert these variables instead of typing them manually.
To add a profile or custom property variable:
- Navigate to Content > Templates.
- Click Create > New template.
- Select WhatsApp as the channel.
- Enter a Template name using lowercase letters, numbers, and underscores, and select the Language.
- Choose your message intent: Marketing or Transactional.
- Click Create to open the template editor.
- In the body, click the Add personalization person icon.
- Search for and select the profile property or custom property you want to insert.
- If the property opens a settings panel, enter Default text and click Insert. You can also add or update the fallback in the inserted tag using the
|default:'value'filter.
Example:
Hi {{ person.first_name|default:'there' }},Example with a custom property:
Your current loyalty tier is {{ person.loyalty_tier|default:'Valued customer' }}.Default values are recommended so the message still makes sense when a profile property is empty. Klaviyo uses the fallback text instead of leaving a gap.
Add event variables
Event variables pull data from a specific event, such as Viewed Product or Started Checkout. Use event variables to reference a product name, cart value, or checkout URL.
Use event variables in a flow triggered by the matching event. For example, use Viewed Product data in a browse abandonment flow. Selecting an event for a template preview does not make that event data available in a campaign.
To insert event variables:
- In the template editor, click Preview.
- Under Preview data source, select Event, then choose the event type that triggers your flow.
- Use the arrows to browse recent event instances and select one with the data you want to preview.
- Click All properties to view available event variables.
- Under Event properties, click the property you want to use to copy its variable tag.
- Click Done to return to the editor, then paste the variable into your template.
- Add a default value using the
|default:'value'filter.
For example, if your event has a Name property:
You recently viewed {{ event.Name|default:'an item on our site' }}.If you are including a link, always provide a fallback URL. For example, a Viewed Product event can store the product link in URL:
View this item: {{ event.URL|default:'https://yourwebsite.com' }}.Replace https://yourwebsite.com with a valid URL for your brand. This fallback gives recipients a destination when the event field is empty. For a checkout link, copy the checkout URL field from your Started Checkout event.

Referencing custom profile properties with lookup
If a profile property contains spaces or special characters (such as /), reference it using the lookup filter.
For example:
{{ person|lookup:'Birthday' }}Add a fallback value
If the profile property may be missing, add a fallback value using the default filter.
{{ person|lookup:'Birthday'|default:'your birthday' }}This displays “your birthday” if the profile does not contain that property.
Best practices for Meta approval
Follow these guidelines to reduce the risk of template rejection:
- Include a default value for every variable.
- Ensure fallback links use a valid, branded URL.
- Preview the template with real profile and event data.
- Confirm that your variables match existing profile properties or event fields exactly.
If you do not follow Meta’s formatting requirements, your template may be rejected or messages may be skipped.
For more formatting requirements, see How to create a WhatsApp template.
Next steps
Now that you’ve added dynamic content to your WhatsApp template:
- Click Submit for review, review the template details, then click Submit to send the template to Meta for approval.
- After approval, use the template in a campaign or flow. If it contains event variables, use a flow triggered by the matching event.
- Test your message with internal profiles before sending to customers.