Responsys: Deep dive into Dynamic Variables


In this article I'll focus on Dynamic Variables (DV) in campaigns. I'll try to explain why these are very important in you campaign work.

DVs are a feature in campaigns, and is setup together your data sources in the campaign dashboard.


Data sources in a campaign, are very powerful, and is the core of your campaign, if you are working with personalized newsletters. More on these in a later article :) At the end of your data source view, you can make DV's. When making a DV you define a name and a value. A value is either a text value or RPL code.




So what is DV's exactly?


It's exactly what is says - a dynamic variable. You can set a static value, but the real potential is when you use these as RPL code. When doing RPL code, you can lookup any data, which you have defined as a data-source. This can be based on any customer or order data you have. First time the DV is used, the RPL code will execute, and is static afterwards. Very powerful!

Ok, great, whats the point?? The point is that this data can be used anywhere in your campaign:


Subject


In the Message Designer you can write a subject or use RPL code. All your data-sources available and so is your DVs



This one gets DV_SUBJECT and does a TRIM and SKIP the mail, if the subject is missing.

Having DV_SUBJECT with this RPL Code:

Hi ${DV_FIRSTNAME}, DISCOUNT on ${DV_WEEKDAY}. get ${DV_RANDOM} % off!

And with these DV definded:



I'm getting these subjects in my preview:

Hi Martin, DISCOUNT on Tuesday. get 31 % off!

Hi Sanne, DISCOUNT on Tuesday. get 17 % off!

Hi Anja, DISCOUNT on Tuesday. get 50 % off!

As you can see its running once per customer, and generating a new personalized subject.


From Name, From e-mail, Reply To


You can use the same design on other fields as well.



This can be used to set a more personalized mail. It could be the agent, that the customer has been in contact with. This will have a better open rate!




Campaign file


When making a campaign you select a file, which is your campaign body content. This can also contain RPL code and can use you DV.

This way you can use DV as settings. Maybe make DV_PRODUCT_COUNT, which can limit your product list by 10 items, or maybe DV_PRODUCT_GROUP, if you want to filter your product list to specific product groups. This can also be a more personalized nature, which gets favorite product group from the customer.

DV has many great possibilities to make the code many flexible. They should be a central part of your campaign structure.

There some pitfalls, when using DV's.


Don't write too much RPL code in your DVs.



As the time flys, you are going to have many campaigns. Maybe 1 or more newsletters per week and all your campaigns in your programs, which easy can be 50+ campaigns. So adding a lot of RPL code gives a maintenance nightmare.



To compensate for this, you can include a file, which contains the RPL code. This means that all campaigns can share DV RPL code, which makes it easy to maintain code!


All DVs are TEXT format.



This means that any data fetched in a DV will eventually be formatted to TEXT. So if you are getting numbers or dates, you need to make sure that you define the format, or else the default or local format is used. This is not always what you want!

Here are some examples:



Key takeaways:

  1. Use DVs for options or settings in your campaign.
  2. Remember that all values are TEXT. Any other format is converted to TEXT.
  3. DV can have a text value or a RPL code. First time the DV is used, the RPL code will execute, and is static afterwards.


Best Regards

Henrik

Recent articles


Contact us




Do you have any questions? Please do not hesitate to contact us directly.