Use dynamic data from external sources or API stored in your Brevo data feeds to personalize your SMS messages. You can include information like appointment dates, event details, account updates, service reminders, and more—any data provided in the feed to make your messages personalized and useful.
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 a recipient named John |
---|---|
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. -
⚡ Automation data variables
Personalize messages with data from the event that triggered an automation, such as an order total. - 🛢️ Data feed variables
Personalize messages with API or external data, such as lists of products or items.
Before you start
- Make sure you’ve learned all about data feeds in our dedicated article About data feeds in Brevo.
- Create the data feed that you will be using to personalize your SMS message. To learn more, check our dedicated article Create a data feed.
- Ensure your data feed contains concise data that fits within the SMS character limit. Indeed, 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 data feed variables:
- Using the { } Add Variable menu, or
- [Advanced] Manually, using double curly brackets.
In what type of SMS messages can I use data feed variables?
Data feed 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 data feed types and formatting in SMS messages
The type of data you can include in your SMS messages and their syntax depends on how you choose to insert your data feed:
The {} Add variable menu can be used to insert data feed with a flat, directly accessible structure with minimal nesting. By using the {} Add variable menu, you can fetch only data contained in the first-level items. |
➡️ To insert more complex data, check the dedicated tab [Advanced] Manually insert data feeds.
Unlike the {} Add variable menu, manually inserting data feed variables into your SMS messages allows you to fetch any data—including nested arrays and complex data structures. Data feed variables are formatted using double curly brackets. Depending on the complexity of your data feed structure, the format of your data feed variables varies: 🔡 Simple and directly accessible data structure
Simple data structures can easily be inserted using the {} Add variable menu. However, you can also manually insert them using the following syntax: {{feed.feedalias.variable}} You should then replace:
For example, to display the name of your next yoga class, your data feed variable would be: {{feed.yoga_classes.class_name}} 🔣 Complex and nested data structure
Complex and nested data feeds can only be inserted manually. The syntax of a complex data feed is: {{feed.feedalias.array.index.variable}} You should then replace:
For example, to display the name of the yoga class in the array following_classes, in index 0, your data feed variable would be: {{feed.yoga_classes.following_classes.0.class_name}} |
Insert data feeds into your SMS messages
To help you understand how to insert data feeds into your SMS messages, we created a use case for illustration purposes that you can easily adapt to your needs: Send an upcoming yoga class alert to your recipients.
Open the tab corresponding to how you want to insert your data feed:
In this use case, we want to send an SMS containing the next yoga class information such as name, location, date, and time. We will insert our data feed using the Add variable menu because this data is flat and directly accessible.
To insert data feed variables using the {} Add variable menu:
- Create an SMS campaign or an automation that contains the Send an SMS step.
- In the Message or Content field, enter your SMS content and place your cursor where you want to insert your data feed variable.
- Click the { } Add variable icon and click Data feeds from the list.
- Select the data feed that contains the data you need for this SMS message. In our example, next_yoga_classes.
- Select the variables you want to insert in your SMS message, and that will be replaced with their values at the time of sending. When the data feed variable is correctly inserted, an orange placeholder with its name will appear. In our example:
- class_name which is the name of the next yoga class.
- date and time which is the date and time at which the next yoga class will take place.
- studio_location which is the place where the next yoga class will take place.
- (Optional) Apply filters to use a default value if the data feed 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.
- Finish the content of your SMS campaign and click Save.
SMS sent from Brevo | SMS received by a recipient named John |
---|---|
In this use case, we already added information on the next yoga class with the { } Add variable menu. However, we also want to propose another yoga class if our recipient is not available for the first slot. We need to manually insert our data feed because this data is nested into arrays.
Open the accordion below to discover the data feed structure we will be using to personalize our SMS. Our data feed alias is yoga_classes:
To manually insert data feed variables into your SMS messages:
- Create an SMS campaign or an automation that contains the Send an SMS step.
- In the Message or Content field, enter your SMS content and place your cursor where you want to insert your data feed variable.
- Choose the placeholder you need for your data feed and insert it into your SMS content. We recommend adding the last two curly brackets only after replacing the values.
- Replace the values as described in the [Advanced] Manually insert data feeds tab of About data feed types and formatting in SMS messages. When a data feed variable is correctly inserted, an orange placeholder with its name will appear. In our example:
-
{{feed.yoga_classes.following_classes.0.class_name}}
which is the name of the following yoga class. -
{{feed.yoga_classes.following_classes.0.date}}
which is the date at which the following yoga class will take place. -
{{feed.yoga_classes.following_classes.0.time}}
which is the time at which the following yoga class will take place. -
{{feed.yoga_classes.following_classes.0.studio_location}}
which is the place where the following yoga class will take place.
-
- (Optional) Apply filters to use a default value if the data feed 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.
- Finish the content of your SMS campaign and click Save.
SMS sent from Brevo | SMS received by a recipient named John |
---|---|
⏭️ 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.