Expand my Community achievements bar.

SOLVED

Problem attaching 3 data extraction in recurring delivery

Avatar

Level 1

Hi,

based on this post (https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/how-to-add-2-attac...) I'm trying to attach 3 attachments from three different data extractions to a recurring delivery but the delivery continues to fail like this, even though other deliveries with single extraction and attachment work correctly: 

Cocozza3_0-1732781744994.png

This is how I set up the workflow:

Cocozza3_1-1732782002009.png

 

The first column of 3 javascript activities contain

 

Spoiler

instance.vars.count1 = vars.recCount;

instance.vars.count2= vars.recCount;

instance.vars.count3 = vars.recCount;

 

because in the email I send to my customer I also print the number of that outbound transition.

 

In the file_1, file_2 and file_3 javascript activities i put: 

Spoiler

 instance.vars.file_1 = vars.filename;

instance.vars.file_2 = vars.filename;

instance.vars.file_3 = vars.filename;

 

 

And in the Email report delivery script i put:

 

Spoiler

delivery.variables._var[0].stringValue=instance.vars.count1;
delivery.variables._var[1].stringValue=instance.vars.count2;
delivery.variables._var[2].stringValue=instance.vars.count3;

delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{instance.vars.file_1}</name>
</attachment>);

delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{instance.vars.file_2}</name>
</attachment>);

 

delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{instance.vars.file_3}</name>
</attachment>);


delivery.hasAttachments = true

 

 

I can't understand why the recurring delivery fails. Is there something wrong with the workflow or the javascript code?

 

Thanks a lot,
Osvaldo

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Cocozza3 ,

Connect all 3 output transition of  'File' JavaScript activity with AND-Join activity, and in AND-Join select 'File-2' as primary set (the transition in which you planned to target the recipients), and connect it with Delivery.

ParthaSarathy_0-1732784027962.png

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @Cocozza3 ,

Connect all 3 output transition of  'File' JavaScript activity with AND-Join activity, and in AND-Join select 'File-2' as primary set (the transition in which you planned to target the recipients), and connect it with Delivery.

ParthaSarathy_0-1732784027962.png

Avatar

Level 1

Hi @ParthaSarathy 

thank you for your help, really appreciated!

 

I tried but I got the same errors.

Cocozza3_0-1732784773701.pngCocozza3_1-1732784812245.png

 

However the delivery must not go to the target resulting from the transition of the javascript activity file_2 but only to me (and in the future only to my manager) because it is only a periodic reporting email, not a communication to end customers.


I configured it as follows:

Cocozza3_2-1732784877270.pngCocozza3_3-1732784904923.png

Is there something wrong with the delivery configuration?

 

Thank you a lot,

Osvaldo

Avatar

Level 1

Or maybe is something related to the size of the data attached?

Cocozza3_0-1732786882887.png

 

Thanks,
Osvaldo

Avatar

Community Advisor

Hi @Cocozza3 , the script in JavaScript activity and Delivery activity is perfect. Might be you need to check in MID server for the reason or might be the size of the file.
As you mentioned in your previous comment as it works with one file (let say file_1), Try other file (File_2) run and check; then with File_3.

If it worked fine, you can attach file_1 & file_2; then by file_2 and file_3; If it works and not only with all 3 files, might be the issue with file size

Avatar

Level 1

Thank you so much for the support, I found out that I was missing ".csv" in the file extraction name!

 

It works fine now, thank you!

 

Osvaldo