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
- 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 their 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. For example, in the data feed on the right, you can fetch only the data from Object, like the offer or date validity. ➡️ To insert more complex data, check the dedicated tab [Advanced] Manually insert data feeds. |
You can also insert data contained in the first-level items manually using this syntax: {{feed.feedalias.variable}} where:
- feedalias is the exact alias name of your data feed, matching the spelling and case as it appears on the Data feeds page.
- variable is the specific variable or field name you want to display, e.g. name, price, date.
Manually insert your data feeds into your SMS messages to fetch nested and more complex data structures than with the {} Add variable menu.
By manually inserting your data feed variables into your SMS messages, you can fetch any data from it, including the data contained in an array of items. For example, in the data feed on the right, you can fetch data nested in the Items or City arrays, like the different class types, their levels, and the city in which they take place. |
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 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:
- feedalias with the exact alias name of your data feed, matching the spelling and case as it appears on the Data feeds page.
- variable with the specific variable or field name you want to display, e.g. name, price, date.
Complex and nested data feeds can be inserted manually into your SMS content. The syntax of a complex data feed is:
{{feed.feedalias.array.index.variable}}
You should then replace:
- feedalias with the exact alias name of your data feed, matching the spelling and case as it appears on the Data feeds page.
- array with the array that contains the values for each item.
- index with the position of the specific item you want to display from your data feed (starting from 0 for the first item).
- variable with the specific variable or field name you want to display, e.g. name, price, date.
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 illustrations purposes that you can easily adapt to your needs: Send a promotional offer for first yoga classes. For reference, we will use the following data feed for which the feed alias is yoga_classes_offers:
Open the tab corresponding to how you want to insert your data feed:
In this use case, we want to send an SMS containing a discount offer and its last day of availability. We will insert our data feed using the Add variable menu because this data is flat and directly accessible:
- 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, yoga_classes_offers.
- Select the variable you want to insert in your SMS message, and that will be replaced with its value at the time of sending. When the data feed is correctly inserted, an orange placeholder with its name will appear. In our example:
- offer displays the discount available for first yoga classes, and
- DateValidity contains the offer last day of validity.
- (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 want to send an SMS containing a discount offer, its last day of availability, as well as the type of yoga class, level, and location. We will manually insert our data feed because soe of this data is nested into arrays:
- 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.
- Replaced the values as described in the [Advanced] Manually insert data feeds tab of About data feed types and formatting in SMS messages. When the data feed is correctly inserted, an orange placeholder with its name will appear. In our example:
-
{{feed.yoga_classes_offers.offer}}
contains the offer information and conditions. -
{{feed.yoga_classes_offers.DateValidity}}
contains the offer's last day of validity. -
{{feed.yoga_classes_offers.Items.0.level}}
contains the yoga class level concerned by the offer. -
{{feed.yoga_classes_offers.Items.0.ClassType}}
contains the type of class concerned by the offer. -
{{feed.yoga_classes_offers.City.0}}
contains the name of the city concerned by the offer.
-
- (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?
🤔 Dúvidas?
Em caso de dúvida, sinta-se à vontade para entrar em contato com nossa equipe de suporte, criando um tíquete a partir da sua conta. Caso ainda não tenha uma conta, entre em contato conosco aqui.
Se você está procurando ajuda com um projeto usando o Brevo, podemos encontrar o parceiro especialista certificado em Brevo.