Expand my Community achievements bar.

Attention: Experience League Community will undergo scheduled maintenance on Tuesday, August 20th between 10-11 PM PDT. During this time, the Community and its content will not be accessible. We apologize for any inconvenience this may cause.

Using Personalization blocks

Avatar

Level 3

Hi, 

 

I am trying to create a workflow where each segment sees different banners. Currently that workflow is attached below. In each Segment, I have also specified Segment Code so that I can use the Segment Codes in Personalization blocks. However, within the Personalization block code, I am currently choosing "delivery.targets.deliveryTarget.targetPart.segmentCodeVal" . This does not seems to work and I would like to set condition to be used in Delivery so that Segment 1 sees image 1, segment 2 sees image two and so on. Please suggests ways onto how I could achieve the solutions. If you need any more information, please let me know.

 

Best,
Sching

1 Reply

Avatar

Community Advisor

Hi @ChanuteJo ,

If you're defining segment code inside split activity as below,

ParthaSarathy_1-1724152998414.png

then you can use the below script in personalized block,

<% if ( targetData.segmentCode == 'segment1' ) { %>
<IMG src="http://abcd.com/img1.png" border="0">
<% } else if ( targetData.segmentCode == 'segment2' ) { %>
<IMG src="http://abcd.com/img2.png" border="0">
<% } else { %>
<IMG src="http://abcd.com/img3.png" border="0">
<% } %>