We have two groups of customers who are being emailed the same html, so it make sense to send them the same email delivery that contains this html. But we want to track the email engagement of each group separately. To achieve this we currently create two email deliveries with two different delivery labels and then load the same html into both deliveries. Is there any way to use just one email delivery but to pass through a variable for each group into the delivery label?
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @paul_wotton,
you can change the delivery label, or delivery code depending on any shared date in your segment coming from the targetData. It is undocumented feature but works since forever.
var getSegmentName = function(name){ if( name === undefined) logError("Argument 'name' is required."); try{ var res = sqlSelect("targetData,@" + name + ":string", "select " + name + " from " + vars.tableName + " GROUP BY " + name); return res.targetData[0]['@'+ name].toString(); }catch(e){ logWarning("Segment name '" + name + "' does not exist in the targeting table."); return false; } } var mySegment = getSegmentName("sSegmentCode"); delivery.deliveryCode = delivery.deliveryCode + mySegment; delivery.label = delivery.label + mySegment; //do not forget establish the link as for this type of activity link is not created automatically delivery.operation_id = instance.operation_id; delivery.workflow_id = instance.id;
Notes:
When you run this workflow it will create as many deliveries as many split transitions you have created.
Your workflow should end up looking like:
Segments are set in split as follwing:
SQL fields:
The SQL field names you want to add to the delivery can be found when you explore the population schema in your workflow.
Marcel Szimonisz
MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/
Hi Paul,
Not OOTB, but you can add a segment code to your broadLogRcp schema to collect segment code created during your workflow and use this segment code to group by in your engagement report.
Thanks,
David
Views
Replies
Total Likes
Hello @paul_wotton,
you can change the delivery label, or delivery code depending on any shared date in your segment coming from the targetData. It is undocumented feature but works since forever.
var getSegmentName = function(name){ if( name === undefined) logError("Argument 'name' is required."); try{ var res = sqlSelect("targetData,@" + name + ":string", "select " + name + " from " + vars.tableName + " GROUP BY " + name); return res.targetData[0]['@'+ name].toString(); }catch(e){ logWarning("Segment name '" + name + "' does not exist in the targeting table."); return false; } } var mySegment = getSegmentName("sSegmentCode"); delivery.deliveryCode = delivery.deliveryCode + mySegment; delivery.label = delivery.label + mySegment; //do not forget establish the link as for this type of activity link is not created automatically delivery.operation_id = instance.operation_id; delivery.workflow_id = instance.id;
Notes:
When you run this workflow it will create as many deliveries as many split transitions you have created.
Your workflow should end up looking like:
Segments are set in split as follwing:
SQL fields:
The SQL field names you want to add to the delivery can be found when you explore the population schema in your workflow.
Marcel Szimonisz
MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/
Thanks for your reply Marcel. Although I was able to implement your suggestions, the result was the same in that both groups of customers are given the same delivery label and delivery code.
In the target data I can see customers are being assigned different segment codes depending on which segment they are in and a segment code is being pulled into the delivery label and delivery code. However, it is the same delivery label and delivery code for all customers.
I'm happy to try other suggestions but could it ultimately be that this isn't possible to achieve because Adobe Campaign will only ever assign a single delivery label and delivery code to a delivery?
Views
Replies
Total Likes
Hello @paul_wotton
You are doing something wrong. I use this for years. Can you share the screen shot? and also the place you change the label? Has to be added in second tab on delivery activity.. also the activity is not "Email delivery" but delivery where you create new send from template.
Marcel
Views
Replies
Total Likes
Hi Marcel,
The campaign workflow takes two customers
splits 50% to the subset which is assigned a segment code
and the remaining 50% to the complement which has a different segment code
The javascript activity is empty
The Delivery is set to New, created from a template
The coding has been added to the Delivery Script
After running the workflow there is only one delivery created
This delivery is being sent to both customers. There is not another delivery containing the other segment code in the label. If you have any other suggestions I'm more than happy to try them.
Thanks, Paul
Views
Replies
Total Likes
it's not the same as I posted. Remove the union and connect two transitions from split to empty javascript activity then to delivery and run it to see two deliveries created
Views
Replies
Total Likes
**bleep** unions
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies