Expand my Community achievements bar.

SOLVED

Email configuration attributes for a report

Avatar

Level 2
Level 2

Hi @ParthaSarathy 

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.

 

IMG_20250102_155023.jpg

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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);

View solution in original post

7 Replies

Avatar

Level 2
Level 2

Hi Adobe team,

I am awaiting for your reply for above case.

@Sukrity_Wadhwa  @ParthaSarathy 

Avatar

Community Advisor

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);
   }

 

Avatar

Level 2
Level 2

Hi @ParthaSarathy 

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 .

 

Avatar

Community Advisor

@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.

Avatar

Level 2
Level 2

Hi @ParthaSarathy 

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 

 

Avatar

Correct answer by
Community Advisor

@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);

Avatar

Level 2
Level 2

Thank you @ParthaSarathy 

Is it possible to fetch those variable in next activity for segmentation 

If possible how would you be?