Expand my Community achievements bar.

SOLVED

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

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
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">
<% } %>

View solution in original post

1 Reply

Avatar

Correct answer by
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">
<% } %>