К сожалению, эта страница еще не переведена. Уже совсем скоро вся документация будет доступна вам на родном языке.
Once you have successfully set up your database connection, you can begin to use your relational data to personalize your messages.
Currently this is only available in emails. Other channels are coming soon...
Before you start
There are two prerequisites needed to be able to use Relational Data for personalization:
Setting up reference fields
If you have not already set up the reference fields for each of your database connections, do so now (Campaigns > Personalization > Tables & Views).
For more information, see: Reference fields.
Setting up relational data variables
Relational data variables are preconfigured sets of values for the reference fields of a particular table or view. They determine which data records are referenced by the placeholder that you add to your content.
In the Personalization pop-up, open the Relational tab and click New.
- Name your variable - Give the variable a name that will easily identify it.
- Select database connection - You should already have connected your database(s) under Campaigns > Personalization > Connection. Choose the database with the table or view you want to use to personalize your message.
- Select table or view - After selecting the database, choose the table or view (which is a virtual table based on the result-set of an SQL statement).
- Set reference fields - The reference fields you set up under Campaigns > Personalization > Tables and Views are shown here. You must add the Type and Value for each field that will determine which records are referenced by this personalization variable.
There are three types of input to choose from:
- Contact field - The value is a field from the contact database in Emarsys.
- External event - You can define the external event and a variable.
- Constant parameter - You can enter a fixed value yourself, for example a specific ZIP code or make of car.
After you have selected the type of input, add the Value for each one.
Since the reference fields are all linked by AND, you must define a value for every field before you can save your variable.
When you are finished, save your changes and your variable is now available for selection as the basis for a personalization placeholder.
Creating relational data personalization placeholders
When you have set up your variables, you can then use them to select the actual fields that you want to use for personalization.
- Select relational data variable - Choose from the variables you created earlier (or create a New one).
- Select field - All the fields in the view or table you selected for the variable are available for selection. It is the value in this field that will be added to the content for the recipients of your message.
- Make this field mandatory for sending - If one of your recipients has no value for this particular field, the message will not be delivered.
- Add fallback text - Fallback text is only available if you did not make the field mandatory. In this case, you can enter any text that can replace missing values.
- Format display text - Allows you to set the capitalization of your data if you wish, or you can leave it as is. For example, if you have stored ‘pet names’ with lowercase letters only, you can easily capitalize the first word (e.g. “simba” becomes “Simba” if you chose capitalization, or “SIMBA” with all caps).
- In the Placeholder field you will see the code of the personalization placeholder (written in Emarsys Scripting Language, ESL).
When everything is set, click Insert. A green personalization placeholder will appear in the text where you wanted to insert the personalization. You can move placeholders in the text freely by dragging and dropping them. It is also possible to modify the them - just click on them and then click the blue personalization icon to open the editor.