Hi!
I want mass update sender and reply address for delivery templates.
But this information is only in XML memo.
So how I can do it? Via JavaScript or something else?
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @MariaKonstantinova1995 ,
if you want to programatically change sender information you need to create workflow where
example
var results = NLWS.xtkQueryDef.create( {queryDef: {schema: vars.targetSchema , operation: 'select', select: { node: [ {expr: '@id'}, ] } }}).ExecuteQuery()), delivery; for each (var w in results.getElements("query")){ delivery = NLWS.nmsDelivery.load(w.getAttribute('id')); delivery.mailParameters.senderEmail ="newemail@example.com"; .. .. .. delivery.save(); }
query - in results.getElements('query') is the internal name of the query activity that is used to get all delivery templates
Marcel Szimonisz
MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/
Why would that info be in the XML memo?
In general it would not be in that field unless your instance has been customized.
Generally speaking you can just use personalization scripts in the Sender and Reply fields. Note you can only change the text and anything before the "@". You can't change the subdomain here.
so your From Sender and even reply to info could look like
From <% personalization.field>, <% personalization.field>@mypreConfiguredSubdomain.com
For more information: https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/key-steps-when-creat...
notice the personalization icons on the right. they will let you select certain schema. Also possible to populate temp tables in the workflow and dynamically pull those in too.
Views
Replies
Total Likes
Hello @MariaKonstantinova1995 ,
if you want to programatically change sender information you need to create workflow where
example
var results = NLWS.xtkQueryDef.create( {queryDef: {schema: vars.targetSchema , operation: 'select', select: { node: [ {expr: '@id'}, ] } }}).ExecuteQuery()), delivery; for each (var w in results.getElements("query")){ delivery = NLWS.nmsDelivery.load(w.getAttribute('id')); delivery.mailParameters.senderEmail ="newemail@example.com"; .. .. .. delivery.save(); }
query - in results.getElements('query') is the internal name of the query activity that is used to get all delivery templates
Marcel Szimonisz
MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/
Hi Marcel!
Thanks for your answer.
It's very helpful.
This is my script, it's working correctly.
var delivery = NLWS.xtkQueryDef.create(
{queryDef: {schema: vars.targetSchema , operation: 'select',
select: {
node: [
{expr: '@id'},
]
}
}});
var results = delivery.ExecuteQuery();
for each (var res in results.getElements("query2")){
delivery = NLWS.nmsDelivery.load(res.getAttribute('id'));
delivery.mailParameters.senderAddress="TEST@example.com";
delivery.save();
}
Views
Replies
Total Likes
Views
Likes
Replies