When dealing with multiple variants defined within one delivery template featuring dynamic content blocks, stakeholders most likely want to see proofs for each variant. To enhance readability in their mailbox, I tend to add the email variant to the subject line.
A simple solution, similar to what we shown you when using salesforce marketing cloud platform, involves incorporating all necessary variants into the subject line exclusively for test sends. This strategy ensures that the integrity of the production send remains unaffected.
We need to do all nececessary changes on the delivery object modification script tab
Following code is used with Delivery activity for other activities you will need to figure out how to check whether we are in proof mode or not.
if (activity.actionType == 3)//proof mode action delivery.mailParameters.subject = '<%= targetData.variant%>' + delivery.mailParameters.subject.toString();
Please note that I’m using
delivery.mailParameters.subject.toString(). This is necessary because the subject is an XML parameter. If you don’t use the
toString() method, everything before the subject line will be removed by Adobe Campaign.