I am trying to create a report in which I want the details of email configuration.
For a particular delivery name -xyz
What is the
1.Sender address
2.Sender
3.Reply address
4.Subject
I am trying with using delivery logs by a query activity but not able to find above attributes, and it needs to be automated.
Solved! Go to Solution.
Views
Replies
Total Likes
@KD1 , from the above script remove those 6 logInfo script and paste the below script,
logInfo("Internal name of the delivery: "+vars.name+" ; SubjectLine: "+vars.subjectLine+" ; senderName: "+vars.senderName+ " ; senderAddress: "+vars.senderAddress+" ; replyAddress: "+vars.replyAddress+" ; replyName: "+vars.replyName);
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @KD1 ,
These attributes can't be configured or use in Query activity as these fields are XML element of type="CDATA".
As a workaround, you can use JavaScript activity to fetch those values as below and store it in variable,
var data = xtk.queryDef.create(
<queryDef schema="nms:delivery" operation="select">
<select>
<node expr= "[mailParameters/subject]" />
<node expr= "[mailParameters/senderName]" />
<node expr= "[mailParameters/senderAddress]" />
<node expr= "[mailParameters/replyAddress]" />
<node expr= "[mailParameters/replyName]" />
<node expr= "@internalName" />
</select>
<where>
<condition expr={"@internalName = 'myDelivery_internalName'"}/>
</where>
</queryDef>
)
var output = data.ExecuteQuery();
for each (var result in output.delivery)
{
vars.name = result.@internalName;
vars.subjectLine = result.mailParameters.subject;
vars.senderName = result.mailParameters.senderName;
vars.senderAddress = result.mailParameters.senderAddress;
vars.replyAddress = result.mailParameters.replyAddress;
vars.replyName = result.mailParameters.replyName;
logInfo("Internal name of the delivery: "+vars.name);
logInfo("subjectLine: "+vars.subjectLine);
logInfo("senderName: "+vars.senderName);
logInfo("senderAddress: "+vars.senderAddress);
logInfo("replyAddress: "+vars.replyAddress);
logInfo("replyName: "+vars.replyName);
}
Views
Replies
Total Likes
Thank you for your help.
As I am still in the learning phase of Adobe campaign and have never used javascript,can you guide me for below details
1.As above code is for a particular delivery internal name, if I want information of all delivery present , what are the required changes in the code?
2.After using javascript code, how to use those variable in the report or view them .
Views
Replies
Total Likes
@KD1 , you can remove <where> ... </Where> condition from above script to get all delivery details.
And by right clicking the JavaScript code activity > display logs > you can view all the details.
Views
Replies
Total Likes
I checked the display logs the logs are generated in below format
Internal name of delivery:
Internal name
reply Name:
reply Address:
sender Address
sender name:
subject line:
Actually I wanted to data to displayed column wise for eg
Below are the attributes and data to be added column wise.
Internal name,Reply Name, reply adress, sender Address, sender name, subject line
Views
Replies
Total Likes
@KD1 , from the above script remove those 6 logInfo script and paste the below script,
logInfo("Internal name of the delivery: "+vars.name+" ; SubjectLine: "+vars.subjectLine+" ; senderName: "+vars.senderName+ " ; senderAddress: "+vars.senderAddress+" ; replyAddress: "+vars.replyAddress+" ; replyName: "+vars.replyName);
Views
Replies
Total Likes
Thank you @ParthaSarathy
Is it possible to fetch those variable in next activity for segmentation
If possible how would you be?
Views
Replies
Total Likes
Views
Likes
Replies