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
  • 3328 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

LaurentLam
Level 5
May 28, 2021

Just a quick hint:

Avoïd too complex personnalization code in your delivery

Less works MTA will have to process for one delivery part, better it will be

So, in your case, 2 ways to implement this correctly with a segment Code:

1- you do not have any throughput issue and you want to factorize most things in a delivery template

-> extend your broadlog schema and enrich your mapping in order to save the segmentCode at broadlog level... It will helps for reporting / analysis purpose. Specially if someone can move from a segment to another depending of the day (imagine a segment like "recipient less than 25 years old": the 24 years olds recipient will move to another category after its birthday)

2- you can also use your split to call different templates regarding the segmentation: you will not have reporting problem (delivery code could be used as a segmentation code) and you could maximise the personnalization regarding the different segment