Breyta

Deila með


Create dynamic email content in multiple languages

When you have customers in multiple countries and regions, you often need to send them email with the same content but with small variations based on their location or language. Dynamics 365 Customer Insights - Journeys offers two ways to do that. Both methods use the audience profile to determine which content to deliver.

  • Create a separate email for each country you want to send to and in each language your customers speak. This method is easy to set up, although time-consuming. But because each audience requires a different email, the number of emails is higher.
  • Use a conditional content block that adapts to your customers' preferences. This method takes more steps to set up, but reduces the number of emails to one.

In this article, you'll learn how to use conditional content blocks to create multilingual email content for different audiences. You'll also learn how to customize your data model and add inline conditions and dynamic text to your email content.

Conditional content by free text country

Suppose you want to add a footer with terms and conditions that vary depending on the country of your customers. The simplest scenario is to use the Country/Region column in the Contact table, which is a free text field that identifies your customers' country of residence. You can use this column to create conditions that compare the country with the variations you want to show in your email content.

  1. Create a content block called "All Country Footer" and add a section and column where you place the text of the terms and conditions.

  2. Add a condition for each country where you do business; for example, the UK, Spain, and Mexico.

    Screenshot showing the All Country Footer content block with conditions highlighted.

    The following screenshot illustrates how to create a condition called "UK" that compares the value of the Country/Region field with the value "United Kingdom":

    Screenshot showing the All Country Footer content block with a condition defined.

  3. In each variation, add the appropriate text.

  4. Add a condition and text for the other countries or regions and languages you want to support.

  5. When you're finished, select Ready to send and use it in your emails.

Conditional content by lookup country

The previous scenario relies on your users typing the country in a free text field and matching the values exactly with the conditions in the content block. Manual data entry can be prone to errors and inconsistencies. To make the solution more robust, you can extend the data model and select the country from a lookup table instead of entering free text.

  1. In the Maker portal, create a table that contains just the names of the countries you support.

  2. Create a table relationship between the country table and the Contact table.

    This action updates the form for the Contact table to allow users to select the country from a list instead of typing it manually.

  3. Set the condition in the content block to use the lookup column instead of the free text column.

    Screenshot of a content block with a condition defined using the contact's custom country lookup column.

  4. Add a condition and text for the other countries and languages you want to support.

  5. When you're finished, select Ready to send and use it in your emails.

Multiple languages in the same country

Some countries have multiple official languages or languages that are widely spoken. In these cases, you may want to send email in the specific language of your contacts, not based just on their country. To do this, add another layer of personalization based on your customers' language.

  1. In the Maker portal, create a table that contains just the names of the languages you support.

  2. Create a table relationship between the language table and the Contact table.

    This action updates the form for the Contact table to allow users to select the language from a list instead of typing it manually.

  3. Set the condition in the content block to use the lookup column instead of the free text column.

  4. Add a condition and text for the other languages you want to support.

  5. When you're finished, select Ready to send and use it in your emails.

Multiple conditions in content block variations

With this data model extension in place, you can update the content block to use both the country and language columns to create conditions.

  1. Add a condition to your content block for each country-language pair you want to support.

  2. In each one, add two more conditions: one that compares the country column with a record from the country table, and another that compares the language column with a record from the language table.

    For example, here's how you can create a variation that shows the text for the UK in English:

    Screenshot of a content block with a condition defined using the contact's custom country and language lookup columns.

  3. When you're finished, select Ready to send and use it in your emails.

Make standard content easier to update

In the previous scenarios, you added the text of the terms and conditions directly in the content block. However, putting the content there can create a maintenance nightmare if you need to update the text often or in multiple content blocks and emails.

To make updating standard content easier, create another table that holds the text of the terms and conditions for all the country and language combinations you support. Then use inline conditions and dynamic text from other tables to read the text from this table and insert it in your email content.

Create and populate a table with formatted text

  1. Create a table called Legal Texts and add a rich text column called Formatted Text.

  2. Populate the table with formatted terms and conditions for each country and language you support.

Add inline conditions and dynamic text to the content block

With the table in place, update the content block to use inline conditions and dynamic text to read the text from the table based on the country and language and insert it in your email content.

  1. Add a condition to the content block. Make sure that Make condition on attribute is selected.

  2. Select Choose an attribute > Other tables (needs record selection).

  3. Select Legal Texts > Formatted Text.

  4. Select the Look for Formatted Text box, press Enter, and select a variation.

  5. Select Done.

  6. Repeat for each combination of country and language you support.

This process creates tokens that you can use to insert the text from the Legal Texts table in your email content.

To build the logic for each country and language variation, place each token in an inline condition that checks the contact's language.

For example, here's an example of the logic for the UK variation that shows the terms and conditions text for English and Welsh speakers:

Screenshot of tokens in a conditional content block.

Now, instead of updating the terms and conditions in dozens of places, you can update them in one place and the changes are automatically reflected everywhere they're used.

Create the email

With the content block ready, you can use it in your email and know that the terms and conditions will be sent according to the contact's country and language.

Learn how to create emails with Customer Journeys - Insights.

Next steps