How to use segmentcode from workflow in delivery template | Community
Skip to main content
Level 3
May 18, 2021
Solved

How to use segmentcode from workflow in delivery template

  • May 18, 2021
  • 2 replies
  • 3303 views

I am trying to access the segment code defined in a workflow split, in the personilazation step in a delivery template. However some steps need to be taken in order to include the segment code in the target data object. I fail to understand how this is done. I wish to hava recipients divided into segments, with personalized content based on segments in the same delivery. targetData.@segmentCode remains empty. Any help is greatly appreciated.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by CedricRey

Hello Jonas,

First, you shouldn't use the E4X notation into the content of a delivery. This is deprecated and it doesn't work into the newest build of Adobe Campaign.

Usually, if you delete the "@", it works if you use the segmentation :

<%=targetData.segmentCode%>

I've just test it with success.

First, can you verify if there is datas into the segmentCode columns ? (put a 1h wait activity just before the delivery, then right clic and "display the target" and check if you see something into the Segment code).

Also, have you choose the "specify into the transition" for recipient origin on the delivery activity into your workflow ?

 

Cedric

2 replies

Manoj_Kumar
Community Advisor
Community Advisor
May 18, 2021

@rbe_jonas 

 

Try this

<%= targetData.segmentCode %>
Manoj  | https://themartech.pro
CedricRey
CedricReyAccepted solution
Level 5
May 18, 2021

Hello Jonas,

First, you shouldn't use the E4X notation into the content of a delivery. This is deprecated and it doesn't work into the newest build of Adobe Campaign.

Usually, if you delete the "@", it works if you use the segmentation :

<%=targetData.segmentCode%>

I've just test it with success.

First, can you verify if there is datas into the segmentCode columns ? (put a 1h wait activity just before the delivery, then right clic and "display the target" and check if you see something into the Segment code).

Also, have you choose the "specify into the transition" for recipient origin on the delivery activity into your workflow ?

 

Cedric

RBE_jonasAuthor
Level 3
May 19, 2021
thank you for your quick reply! For me, the delivery object has "Specified by the inbound event(s)" under "recipients" selected (which I believe is the same thing you refer to). The segement code is shown when I chose "Display Target" (in column @segmentCode) and my personalization code produces <%= targetData.segmentCode %> when I preview the delivery (without personalization). Yet, when I preview with personalization the segment code is blank.