ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Personalizing WhatsApp Messages with Customer Data

Personalization helps your WhatsApp messages stand out and feel relevant, whether you’re confirming an order, reminding someone about an appointment, or sending a loyalty reward.

In Meiro CDP, personalization happens by mapping user data (like a name, order ID, or link) into pre-approved message templates. These templates contain variable placeholders, such as {{1}} or {{first_name}} — which are automatically filled with real values during campaign execution.

While WhatsApp templates themselves do not support scripting inside the text (like logic or loops), Meiro lets you apply LiquidJS outside the template, during the message configuration. This means you can use logic, conditions, and formatting (e.g., default, limit, if) when mapping data to template placeholders, just like in Mobile Push or Email.

The logic is processed before the message is sent, and the final message includes the resolved values, ensuring that personalization is both flexible and compliant with WhatsApp template rules.

You can personalize the following parts of a WhatsApp message:

  • Header – Include user-specific images (like an invoice) or text (like a booking ID).
  • Message Body – Add names, order numbers, delivery dates, etc.

  • Call-to-action Buttons – Add deep links that include parameters from user profiles.


Personalization Example

Let’s say you want to send a delivery update after an order is shipped.

another_WA_preview_croped.gif

Header template structure: 

Order #{{1}} confirmed!

Body template structure:

Hi {{1}}, thanks for your order! 🎉  
We’re preparing your items for shipment.  
You’ll receive updates once it’s on the way.  
Expected delivery: {{2}}
You can track your order or view your invoice below.

Mapped attributes:

    • {{1}}order_id"12345"
    • {{1}}first_name"David"
    • {{2}}delivery_datetime"30 Jul 2025"

Final message sent:

Order #12345 confirmed!
Hi David, thanks for your order! 🎉
We’re preparing your items for shipment.
You’ll receive updates once it’s on the way.
Expected delivery: 30 Jul 2025
You can track your order or view your invoice below.
[Track Order]


Mapping Attributes in WhatsApp Campaigns

When creating a WhatsApp campaign in Meiro, you’ll:

  1. Choose an approved message template that includes placeholders.

  2. For each placeholder, select a corresponding attribute from the CDP (like first_name, delivery_datetime, or order_id)

  3. Provide a default value in case the data is missing for a user.

You can use attributes such as:

  • Text (e.g., name, status)

  • Numbers (e.g., points earned, order amount)

  • Dates (formatted delivery_date)

  • Links (e.g., booking URLs or PDFs)


Using Default Values

WhatsApp requires that all placeholders have a value. If a mapped attribute is missing and no default value is provided, the message will fail to send.

To prevent this, you can use a default value that fills in when a piece of data is missing. This ensures your message is still delivered and remains clear for the user.

image.png

WhatsApp Template Structure:
Hi {{1}}, We´re glad to have you with us in {{2}}!🌍

With fallback:
Hi {{customer_first_name | default: "there"}}, We´re glad to have you with us in {{geo_country | default: "this part of the world"}}!🌍

If the name is missing, the message becomes:
Hi there, We´re glad to have you with us in this part of the world!🌍

This way, the message is still friendly, complete, however most importantly, delivered successfully.

Alternative approach:
You can also filter your audience segment to include only users who have all the required attributes.
Learn more about segment filtering → here.


Use Cases: Common Personalization Scenarios

Here are a few common ways to apply personalization in WhatsApp campaigns:

🎉Milestone Celebration Message

milestone_celebration.gif

Template Structure:

  • Header:
    Congratulations, {{1}}!

  • Body:
    You’ve just earned *{{1}}* points in our loyalty program.🎉
    Keep engaging to unlock even more rewards.

  • Footer:
    Thank you for being part of our community.

  • Button (CTA):
    View Rewards → https://loyalty.meiro.com/user/{{3}}

Mapped Attributes:

    • {{1}}customer_nameLaura Hall

    • {{2}}loyalty_points340

    • {{3}}user_id94738291

Final Message:

Congratulations, Laura Hall!
You’ve just earned 360 points in our loyalty program.🎉
Keep engaging to unlock even more rewards.
[View Rewards]


🛒 Abandoned Cart Reminder

abandoned_cart.gif

Template Structure:

  • Header (Text):
    Still thinking it over?

  • Body:
    Hey {{1}}, you left a {{2}} in your cart.
    Complete your purchase while it’s still in stock.

  • Footer:
    Need help? We’re here.

  • Button (CTA):
    Resume Checkout → https://shop.com/cart/{{3}}

Mapped Attributes:

  • {{1}}first_nameJames

  • {{2}}cart_product_nameWireless Charger

  • {{3}}cart_id839123

Final Message:

Still thinking it over?
Hey James, you left a Wireless Charger in your cart.
Complete your purchase while it’s still in stock.
[Resume Checkout]


✈️ Travel Check-In with Deep Link

Template Structure:

  • Header (Media):
    Image of a plane or boarding pass

  • Body:
    Your check-in is ready, {{1}}.
    Click below to confirm your flight to {{2}}.

  • Footer:
    Safe travels!

  • Button (CTA):
    Check In Now → https://travel.com/checkin/{{3}}

Mapped Attributes:

  • {{1}}first_nameDavid

  • {{2}}destination_cityBerlin

  • {{3}}booking_id5432110

Final Message:

(Image header)
Your check-in is ready, David.
Click below to confirm your flight to Berlin.
[Check In Now]


WhatsApp personalization with ID context attributes

WhatsApp is one of the most personal channels — messages arrive directly in someone’s chat. That means accuracy is critical. When profiles merge (e.g., multiple phone numbers tied to the same profile), traditional personalization can cause issues:

  • A booking confirmation might include the wrong passenger’s details.

  • A policy update could go to the wrong number.

  • A check-in link might send one user to another’s booking.

ID Context Attributes solve this by tying personalization to a specific identifier (like a phone number), ensuring:

Accuracy: Each WhatsApp number only receives messages relevant to it.
Privacy: Prevents one user’s information from being sent to another user’s number.
Relevance: Dynamic fields in WhatsApp templates stay tied to the correct user context.

How ID Context Attributes Work

Think of ID Context Attributes as “identifier-specific data containers.” Instead of pulling from generic profile data, they store details tied to a specific identifier — for WhatsApp, that identifier is the phone number.

When you enable ID Context Activation in a WhatsApp campaign, personalization happens per phone number. Even if multiple numbers exist under one profile, each message remains accurate, private, and relevant to the intended recipient.

Enabling ID Context Attributes in WhatsApp Campaigns

Remember: The Use ID Context Activation toggle only appears once at least one ID Context Attribute has been created for the WhatsApp channel.
Learn More: How to create ID Context Attributes

  1. In your WhatsApp campaign:

    • Toggle Use ID Context Activation ON.

    • Select the relevant ID Context Attribute from the dropdown.

      WA_toggle.gif

  2. Use the Attribute Picker:

    • Once enabled, an ID Context section appears.

    • Select dimensions (like name, destination, or checkin_url) and insert them into your WhatsApp template variables.

      WA_picker.gif


Campaign Activation Rules for ID Context Attributes

When ID Context Activation is enabled in this campaign:

  • Only one ID Context Attribute can be selected.

  • The campaign activates only identifiers (phone numbers) that have a record in the selected attribute.

  • You don’t have to use any dimensions in your content — activation still respects the selected context attribute.

Learn more: For the full explanation, see Campaign Activation Rules for ID Context Attributes.


Using ID Context Attributes in WhatsApp

1. Personalizing Message Text using ID context attributes in body parameters

Insert ID Context Attributes into body parameters to ensure each WhatsApp number gets the correct details.

Example – Flight Confirmation

Hi {{1}}, your booking #{{2}} for {{3}} is confirmed

  • Parameter {{1}} (Name): {{ id_context.name}}

  • Parameter {{2}} (Booking Reference): {{ id_context.booking_reference }}
  • Parameter {{2}} (Destination): {{ id_context.destination }}

Each phone number receives a confirmation with their own destination and departure time.

2. Personalizing Buttons using ID Context attributes

Insert ID Context Attributes into button parameters to ensure each WhatsApp number gets the correct link.

Example – Traveler Check-in Button

  • Parameter {{1}} (Check-in URL): {{ id_context.checkin_url }}

Each phone number receives a button linking to their own check-in page.

3. Personalizing Media using ID Context attributes

Use ID Context Attributes in the header image field to display personalized images.

Example – Product Recommendation

  • Image URL: {{ id_context.product_image_url }}

Each phone number sees an image of their own recommended product.

Learn More
Using ID Context Attributes in Mobile Push Campaigns
Using ID Context Attributes in Email Campaigns


Testing Personalization Messages

Before sending your campaign, always test personalization carefully:

  1. Use the Preview to verify how messages will look for real profiles.

  2. Send test messages to internal users or test accounts.

  3. Check that all variables resolve correctly.

  4. Review logs for failed messages due to missing data.