Personalize your SMS messages with contact attributes and event data

Personalize your SMS with contact attributes and event data to send tailored messages to your subscribers and customers. Include unique details for each contact, such as their first name or order total, and send a single SMS to multiple recipients while making the message feel personal.

How does SMS personalization work?

SMS personalization works by adding variables to your SMS content. When the SMS is sent, these variables are automatically replaced with information relevant to each recipient.

SMS sent from Brevo SMS received by John who made a $49.99 purchase
sms_example-automation-data-variable_en-us.png sms_example-automation-data-variable-replaced_en-us.png

You can include different types of variables in your SMS messages:

  • 👤 Contact attribute variables
    Personalize messages with contact details, such as first and last names.
  • Event data variables
    Personalize messages with data from the event that triggered an automation or the latest instance of an event, such as an order total.
  • 🛢️ Data feed variables
    Personalize messages with API or external data, such as lists of products or items. 

Good to know

  • If you are using a Brevo plugin to send SMS messages directly from your website (rather than through Brevo's interface), the process may differ from the one described here. To learn more, check your plugin-specific documentation.
  • When using personalization in SMS messages, since variables are replaced with actual values at the time of sending, the final character count may vary from the one displayed in the SMS editor. For example, "Hi, FIRSTNAME." might be estimated as 33 characters, but it becomes 10 characters with "Hi, Paul." and 15 characters with "Hi, Alexander.". 
  • You can insert personalization variables:
    • Using the { } Add Variable menu, or
    • [Advanced] Manually, using double curly brackets.

👤 Personalize an SMS message with contact attributes

Use the contact attributes stored in your Brevo account to personalize your SMS messages. You can include details like your recipients' first and last names, birthdays, and more—any information saved in their contact attributes.

In what type of SMS messages can I use contact attribute variables?

Contact attribute variables can be used in:

  • SMS campaigns sent from the Campaigns page
  • Promotional SMS and transactional SMS sent from an automation created in the new editor.

About contact attribute variables formatting

Contact attribute variables are formatted using double curly brackets like this:

{{contact.ATTRIBUTE_NAME}}

The ATTRIBUTE_NAME part needs to be replaced with the exact name of your contact attribute, matching the spelling and case as it appears on the Contact Attributes page.

For example, if the contact attribute for the first name of your contacts is FIRSTNAME, the {{contact.FIRSTNAME}} placeholder is inserted into your SMS content.

Insert a contact attribute variable in an SMS message

In this use case, we want to display our recipient's first name. To insert contact attributes in your SMS messages: 

  1. Create an SMS campaign or an automation that contains the Send an SMS step. 
  2. In the Message or Content field, enter your SMS content and place your cursor where you want to insert your contact attribute.
  3. From there, choose how you want to insert your contact attribute variable:
    With the Add variable menu [Advanced] Manually
    1. Click the two curly brackets icon { } and select Contact variables from the list.
    2. Search through the list of contact attributes and click on the one you want to include in your SMS campaign. In our example, we will choose FIRSTNAME.
      When the contact attribute is correctly inserted, an orange placeholder with its name will appear.
  4. (Optional) Apply filters to use a default value if the contact attribute is empty, or apply uppercase to your text, for example. To learn more, check our dedicated article Modify the formatting of your placeholders with filters.
  5. Finish the content of your SMS campaign and click Save.

You have personalized your SMS with a contact attribute. When the SMS is sent, the variable will automatically be replaced with information relevant to each recipient.

SMS sent from Brevo SMS received by a recipient named John
sms_attibute-variable_en-us.png sms_contact-variable-replaced_en-us.png

⚡ Personalize an SMS message with event data

❗️ Important

Only transactional SMS messages sent through an automation created in the new editor can be personalized with event data. Ensure that the Brevo tracker is installed on your website to receive the events that trigger the automation.

Use event data to personalize your transactional SMS messages. This data is gathered from the event that triggered the automation. For example, if your automation is triggered by an Order completed event (when a contact completes a purchase), you can include details like the recipient's order total in the SMS.

Here's an example of how it'd work for an automation that sends a transactional SMS when a contact completes a purchase:

sms_auto_ perso_ex_en-us.png

  1. A contact completes a purchase on your website.
  2. The Order created event and its associated data, such as the order total, are sent to Brevo.
  3. The automation is triggered by the event and the contact enters it.
  4. The contact progresses through the steps of your automation. When they reach the Send an SMS step, the variables in the SMS are replaced with data from the Order created event, and the SMS is sent to the contact.
  5. The contact receives the personalized SMS.

In what type of SMS messages can I use event data variables?

Even data variables can only be used in transactional SMS messages sent through an automation created in the new editor.

About event data variables formatting

Event data variables are formatted using double curly brackets like this:

{{params.parameterNAME}}

There are two types of event data variables you can use to personalize your transactional SMS messages:

  • Default event data variables
    These variables are available by default once the Brevo tracker is installed on your website and allow you to include basic cart information from eCommerce events in your SMS messages.
  • [Advanced] Custom event data variables
    These variables can be used with custom events and allow you to include more advanced data from your own custom events in your SMS messages.

Use the tabs below to view more information about the default and custom event data variables ⬇️.

Default event data variables [Advanced] Custom event data variables

Once the Brevo tracker is installed on your website, you can personalize transactional SMS messages using data from our default eCommerce events: Cart updated, Cart deleted, and Order created. When one of these events triggers an automation, the relevant data will be sent to Brevo, and the variables in your SMS will be replaced with the personalized data from that event.

You'll find the list of default event data variables you can use to include basic cart information in your SMS messages in the table below ⬇️.

Cart data Corresponding variable
URL to view cart {{params.url}}
Subtotal {{params.subtotal}}
Subtotal, including tax, including discounts, excluding shipping {{params.subtotal_taxinc}}
Discount {{params.discount}}
Discount, including tax {{params.discount_taxinc}}
Shipping {{params.shipping}}
Shipping, including tax {{params.shipping_taxinc}}
Total before tax {{params.total_before_tax}}
Tax {{params.tax}}
Total {{params.total}}
Currency  {{params.currency}}
Date {{params.date}}
Affiliation {{params.affiliation}}

Insert an event data variable in an SMS message

In this use case, we want to send an order confirmation SMS containing the total amount of our recipient's order:

  1. Using the new automation editor, create an automation that contains the Send an SMS step.
  2. Select the type of SMS you will be sending with this automation: 
    1. Transactional SMS if you are sending order status updates, delivery notifications or subscription status. 
    2. Promotional SMS if you are sending welcome offers, discounts or deals. 
  3. In the Sender name field, enter a personalized name of 3-11 letters or 15 digits for your sender. We recommend using your company name to help your recipients recognize your brand. Avoid special characters such as GSM characters, Unicode in non-Latin alphabets (e.g., Arabic, Russian), and emojis. 
    💡 Good to know
    Recipients in some countries (including the USA and Canada) cannot see sender personalization, which is displayed as a numerical shortcode. To learn more, check our dedicated article Short codes, long codes, and personalized SMS senders.
  4. In the Content field, enter your SMS content and place your cursor where you want to insert your event data variable.
  5. Click the two curly brackets icon { } and select Event data from the list.
  6. From there, choose how you want to insert your event data variable:
    With the Add variable menu [Advanced] Manually
    1. Click the two curly brackets icon { } and select Event data from the list.
    2. Select the type of event and event you want to use to personalize your SMS message. In this example, we will select Custom events > order_created.
    3. Select the object containing the data you want to display. In our example, we want to display the total amount of our recipient's order and its currency. We will first select currency and then repeat the steps above to select the total. When the event data is correctly inserted, an orange placeholder with its name will appear.
    💡 Good to know
    To view the list of available default event data variables, check the Default event data variables tab above.
  7. In the What event data to display section, choose which event to retrieve data from based on whether your SMS includes event-related personalization. Expand the following accordions to learn when to use each option:
    This SMS doesn’t have variables

    Select this option if your SMS does not include event-related personalization, such as a product name or price.

    Event that triggered this automation

    Select this option if your SMS includes personalization related to the event that triggered the automation. For example, an order confirmation SMS personalized with product details would use data from the "Order Created" event, which is the trigger of the automation.

    Latest instance of an event

    Select this option if you want to pull data from the most recent occurrence of a specific event, even if it’s different from the event that triggered the automation. For example, if you're sending a follow-up SMS about a customer’s most recent purchase, this option ensures the SMS reflects the latest order details rather than the one that triggered the automation. 

    automation_sms-event-data_en-us.png
  8. (Optional) Apply filters to use a default value if the contact attribute is empty, or apply uppercase to your text, for example. To learn more, check our dedicated article Modify the formatting of your placeholders with filters.
  9. Finish the content of your SMS campaign, configure its settings, and click Save.

You have personalized your SMS message with event data. When the SMS is sent, the variable will automatically be replaced with information relevant to each recipient.

SMS sent from Brevo SMS received by John who made a $49.99 purchase
sms_example-automation-data-variable_en-us.png sms_example-automation-data-variable-replaced_en-us.png

⏩ What's next?

🤔 Have a question?

If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.

If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo Agency partner.

💬 Was this article helpful?

8 out of 11 found this helpful