0

i have a question when it comes to how dynamic content works when an email is being sent as part of a journey.

I want the content to be displayed based on an data extension field that is linked via the contact model (subscriberkey) and not based on the data extension that is the journey entry source.

Is this possible to do with the standard dynamic content or do i need to write Ampscript to handle this?

Below is an example of what i am trying to understand: If I have a the Journey entry DE of the following

SubscriberKey – 123456 
Gender – M 

And I have another DE which I build the dynamic content off

SubscriberKey – 123456 
Gender – F

The content is set to show image 1 if Gender = F and show image 2 if gender=M

When I send the message in Journey builder will the content render image 1 (Female gender) or image 2 (male gender from the journey entry DE)

1
  • Thanks both Tom and Johannes your answers were exactly what i wanted to confirm i had a suspicion i couldnt use DC and would have to use Ampscript.
    – AndrewC
    Feb 13, 2019 at 21:25

2 Answers 2

2

The creation of the dynamic content block (where you have to chose a dataextension that you are able to build rules) has nothing to do with the send process itself. It just allows you to create the rules with the fields of that particular data extension.

When both of your data extensions have the same fields (that is the most important stuff) it does not matter which data extension you chose for the dynamic content block creation. You could have also chosen an empty one that will never be used in a send process but has the same fields.

Tom Callahan‘s answer covers a different aspect of dataextension in journeys.

When a journey has a long period of activities like 30 days or something, it might happen that the original value of the starting dataextension is not valid anymore. What I mean by this is that if you start as a male when the journey has been activated but then this attribute get changed to female on day 5 of the 30 day journey the journey will still use the starting value which was male.

To cover this aspect you cannot use dynamic content blocks at all because they always reference the starting dataextension and you have no option (inside dynamic content blocks) to use values of the contact model of Salesforce itself. Therefore your only option is to write ampscript (like tom callahans) that received the current values at send time. You cannot solve this problem with dynamic content blocks at all - from my point of view this is a huge mistake from Salesforce that dynamic content blocks are useless for longer journeys where you always want to display the current state of variables / attributes like they are in the contact model itself.

I hope you understood - if not just comment on the post and I rephrase or add stuff.

5
  • Old question but I just tested something. I have a journey with 2 emails. One is immediate and one after 1 hour. Dynamic content in both emails relies on journey entry data extension. I trigger journey and first email comes with correct dynamic content. I then clear the record from the entry DE before the second email is sent. Second email sends after one hour with the correct dynamic content again, even though the entry DE is now empty. So where is the dynamic content evaluation coming from in the case of the second email? Something to do with the journey data?
    – Ben
    Feb 25, 2021 at 5:06
  • The Journey itself keeps the data upon entry. I call it "Shadow DataExtension". Feb 25, 2021 at 6:39
  • That's what I'm thinking. The question is, the dynamic content is configured in the email where you explicitly choose the data extension to use. How does the email then magically know to use the "shadow de" instead when it is in a journey?
    – Ben
    Feb 25, 2021 at 22:01
  • When you define the dynamic content block the dataextension used for creating rules is basically just a template. All you really need to have in there is the correct column names and datatypes that match the dataextension from the sending process. When all sending dataextension have the same columns it does not make any difference which dataextension you chose to define the dynamic content. There is no magic involved in the journey. You define a dataextension as entry source and then the shadow dataextension just copies the column and stores it in the journey and takes this journey dextension, Feb 26, 2021 at 6:39
  • Thanks for the explanation Johannes. That's very interesting to know. Do you know if this is documented anywhere? In particular the fact that an email in a journey "knows" to use the journey data instead of the sending data extension? Thanks
    – Ben
    Feb 28, 2021 at 21:51
2

Pretty simple to do with an ampscript lookup function. It would look something like this:

%%[
var @subkey, @gender  
set @subkey = AttributeValue('SubscriberKey') set @gender = lookup("DE2", "Gender", "SubscriberKey", @subkey)
]%%

%%[if @gender == "Female" then]%% 
CONTENT A HERE

%%[else]%% 
CONTENT B HERE
%%[ endif ]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .