Skip to content

Dynamic content

Dynamic content is made of fragments of text in a scripting language. It is placed in an email message or pop-up to personalize it. Using dynamic content, you can add information sourced both from the platform – e.g., the customer’s name or surname – and from outside ExpertSender CDP, e.g. discount codes.

When you send an email, the dynamic content is replaced with the target content. Here’s an example:

  1. You create an email subject, e.g., Customer, summer sale starts!
  1. You want to replace the awkward ‘customer’ word with the name of each email recipient. It’s a good practice, but you have 5,000 of them in your database, so sending 5,000 separate messages with a changed name in the subject line would be very time-consuming.
  1. Fortunately, ExpertSender CDP allows you to personalize your email subject with one click.

How?

  1. Click the ‘@‘ icon which displays a list of available dynamic content.
  2. Choose Customer first name.
  3. The following string of characters is added to the Subject field: @(Model.CustomerFirstName),
  4. When sending this email, the string of characters will be replaced with the name of each of the customers you are sending it to.

By using dynamic content in your emails, you will give them an individual character, making them more effective – your recipients are more likely to click and read messages addressed directly to them and containing content that considers their preferences.

Where do I find dynamic content? 

You can add dynamic content to every email and sms message, web push notification and pop-up. You will find it: 

  1. In the email editor > Basic settings, click the ‘@‘ icon in the following fields: 
    • Subject  
    • Preview
    • Tracking > after enabling the Google Analytics and Custom parameters options.
  1. In the email and pop-up editors > Content > Blocks > Text 
    • Personalization 
  2. In the SMS message editor > Content > Message content.
  3. In the web push notification editor > Content > Title and Notification text.
  4. In scenarios > Create/Edit scenario > Channels: Send Email > Create content > click the ‘@’ icon in the following fields:
    • Name „From”
    • Email „From”
    • Name „Reply to”
    • Email „Reply to”
    • Subject
    • Preview text

Types of dynamic content

In ExpertSender you will find the following types of dynamic content:

  1. System features
    • Customer ID – @(Model.CustomerId) – displays the customer identification number assigned to them in the platform. 
    • Customer CRM ID – @(Model.CustomerCrmId) – displays the imported customer ID number assigned to them by the CRM system you are using.
    • Customer first name – @(Model.CustomerFirstName) – displays the customer’s first name.
    • Customer last name – @(Model.CustomerLastName) – displays the customer’s last name.
    • Customer full name – @(Model.CustomerFullName) – inserts the customer’s first and last name into the message content.
    • Customer date of birth – @(Model.CustomerDateOfBirth) – adds the customer’s date of birth to the message.
    • Customer last activity – @(Model.CustomerLastActivity) – Inserts content with the customer’s recent activity, e.g., purchasing a product, subscribing to a newsletter, etc.
    • Customer email – @(Model.CustomerEmail) – adds the address provided by the customer when registering in your online store or subscribing to your newsletter.
    • Customer email Md5 – @(Model.CustomerEmailMd5) and customer email Sha256 @(Model.CustomerEmailSha256) – enable content personalization for customers identified outside the ExpertSender CDP platform.
    • Customer last email – @(Model.CustomerLastEmail) – inserts the last email address used by the customer, e.g., when placing an order or subscribing to your newsletter.
    • Customer phone – @(Model.CustomerPhone) – displays the customer’s telephone number.
    • Customer last SMS – @(Model.CustomerLastSms) – displays the date and time of the last SMS message sent to that customer.
  1. Features you have introduced to the platform: 
    • Customer attribute exists – @(Model.CustomerAttributeExists(“string attributeName”)) – dDisplays content depending on whether the indicated customer attribute exists or not. You usually place this dynamic content directly in the newsletter code. Please go to the How the message editor works section to learn how to do it.
    • Customer attribute – @(Model.CustomerAttribute(“string attributeName”)) – allows you to add a selected customer attribute; instead of the string attributeName, insert the selected customer attribute, previously added to the system in the Settings > Customers > Customer attributes.
    • Customer attribute – set value – @(Model.SetCustomerAttribute(“attributeName”, objectValue)) – allows you to add a selected customer attribute; in place of the string attributeName, it will display the customer attribute you have previously added to the system under Settings > Customers > Custom attributes.
    • Customer attribute – clear value – @(Model.ClearCustomerAttribute(“attributeName”)) – resets the value of an attribute for a given customer, e.g., clothing size, city of residence.
      • Replace “attributeName” with the name of the selected customer attribute, e.g., “loyalty_card”.
      • Replace objectValue with the target value corresponding to the attribute. If the attribute “loyalty_card” has been set to a Yes/No data type in Settings > Customers > Custom attributes, you must enter either Yes or No as the objectValue.
      • An example of usage:
        @(Model.SetCustomerAttribute(“loyalty_card”, Yes))
  1. Links
    • Unsubscribe link – @(Model.InsertUnsubscribeLink()) – dDisplays a link to a separate landing page confirming unsubscription from your email list.
    • Preference Center Link – @(Model.InsertPreferenceCenterLink())merId) – displays a link to your Preference Center.
  1. Discount codes
    • Use discount code – @(Model.UseDiscountCode(discountCodeSetId)) – retrieves the first available discount code from the list loaded into the platform and then displays it in the email content. Replace the discountCodeSetId with the ID number of a discount code set.
  1. Message IDs
    • Email message ID – @(Model.EmailMessageId) – displays the message ID number.
    • Banner ID – @(Model.BannerId) – displays the ID number of the recommendation banner.
    • Pop-up ID – @(Model.PopupId) – displays the pop-up ID number.
  1. Remote content
    • Get remote content – @(Model.GetRemoteContent(“string url”, boolIsUnique)) – displays content available at the specified link (external server). How to use it?
      • Replace “string url” with the link where the content is available, e.g., discount codes.
      • Replace boolIsUnique with true if each recipient should receive a unique code.
      • Enter false to enable caching for 6 minutes, during which all recipients will receive the same code.
      • The example dynamic content is as follows: @(Model.GetRemoteContent(”www.myonlinestore.com/seasonalsalea/summer_25″, true))
    • Get remote content (with password) – @(Model.GetRemoteContent(“string url”, “string username”, “string password”, boolIsUnique)) – displays a password-protected link with access data.
      • Replace “string url” with the link to the content.
      • Replace “string username” and “string password” with the login credentials if the server requires authentication (HTTP Basic Authentication).
      • Replace boolIsUnique with true if each recipient should receive unique content.
      • Enter false to enable caching for 6 minutes, during which all recipients will receive the same content. If you do not set the boolIsUnique parameter, it will default to false.
      • The example dynamic content is as follows: @(Model.GetRemoteContent(”www.myonlinestore.com/seasonsale/summer_25″, “Adam Smith”, “nxewgh60#”, false))

How to use dynamic content?

Using dynamic content, you can create one message template (e.g., email) and send it to many customers. Specific data assigned to a given customer will appear in the places used in the dynamic content template. 

Adding the customer’s name in the email subject 

Adding a customer’s name is the most popular way to personalize emails. 
In ExpertSender you can do this not only in the email content itself, but also in its subject: 

  1. In the main menu, go to Campaigns > Email
  1. Click Create newsletter – it will open the message editor. 
  1. In the Subject field, enter the subject of your message. 
  1. Select where you want to insert the name of the message recipient. 
  1. Click the @ icon at the end of the field. A pop-up will open with a list of available dynamic content. 
  1. Select Customer name
  1. The following dynamic content will appear in the previously selected place: @(Model.CustomerFullName). You don’t have to add anything to it. 
  1. When sending the message, the dynamic content will be replaced with the customer’s name available in the Customers > Customers database. 

Adding the discount code to your email

At ExpertSender, we provide two ways of adding discount codes to the email content:

  1. When a set of codes has been imported into the platform.
  2. When you store a set of codes outside the platform, e.g., on your own server.

Add the discount code to your email using Use discount code. It will place in your email the first available discount code from the list you previously imported to the platform. The list is available in the Customers > Discount codes section.

When you select it from the list, this is the string of characters that will appear in the email content: @(Model.UseDiscountCode(discountCodeSetId))

All you need to do is insert the ID of the discount code set from which the codes are to be taken in place of discountCodeSetId.

You will find an example of using discount codes in email messages in the article How to add a discount code to a message?

How to add password-protected content to an email?

If you need to send password-protected content to your recipients, just use Get remote content (with password).

It looks like this:

@(Model.GetRemoteContent(“string url”, “string username”, “string password”, boolIsUnique))

How to insert data? Replace:

  • string url with the URL address where the target data is located.
  • string username with the name of the client to whom you are sending the message.
  • string password with the access password assigned to the content you want to send.

These are just two of many examples where dynamic content comes in handy. You can also use it to build communications based on unique customer characteristics or use UTM tags in it for better customer identification.