Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Send out not linked to a campaign

Avatar

Level 3

Hello!

I have a problem, we see in the systemet that we have some deliveries (send-outs) that are not linked to any campaign. 

The workflow that triggers these deliveries is in a campaign and nothing seems wrong but when I look in the Delivery folder I noticed that they are not linked to any campaign:

A_B_SE_0-1699957176095.png

 

When I look in the Campaign dashboard those deliveries do not appear there either.

This is the delivery node:

A_B_SE_1-1699957466556.png

 

Execution folder and Folder of the delivery template is the same as for other deliveries. Same for the workflow, it has the same folder as the other wkfs.

 

This is a delivery that is showing both the campaign and target (wkf) linked to it as it should be (image taken from the Deliveries folder):

A_B_SE_3-1699957995355.png

 

Here can you see the one that I am talking about and which is not showing any link:

A_B_SE_4-1699958121946.png

 What am i missing?

 

 

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @A_B_SE ,

Open the delivery activity and in script tab, paste the below code and Run the campaign.

 

delivery.operation_id = instance.operation_id;

 

ParthaSarathy_0-1699959779174.png

This delivery activity which you used, calls the delivery template and its not linked with any campaign or workflow. That is the reason, the delivery gets created in the correct execution folder mentioned in delivery property and this is an expected behavior. So, to map the delivery and campaign, the above script needs to be executed.

You can also find the same scenario when you use a continuous delivery activity and calling a delivery template in it.

View solution in original post

8 Replies

Avatar

Correct answer by
Community Advisor

Hi @A_B_SE ,

Open the delivery activity and in script tab, paste the below code and Run the campaign.

 

delivery.operation_id = instance.operation_id;

 

ParthaSarathy_0-1699959779174.png

This delivery activity which you used, calls the delivery template and its not linked with any campaign or workflow. That is the reason, the delivery gets created in the correct execution folder mentioned in delivery property and this is an expected behavior. So, to map the delivery and campaign, the above script needs to be executed.

You can also find the same scenario when you use a continuous delivery activity and calling a delivery template in it.

Avatar

Level 3

Hello,

 

When I look to those deliveries that have a link they do not have any code in the script tab. Why? I am using the exact same delivery node (no continuous delivery) and almost every delivery gets a link but some don't.

 

I'm assuming this code will solve the issue for those specific deliveries if i re-run them but I would like to know why this problem occurs and fix it without including this code in every delivery node.

Avatar

Community Advisor

@A_B_SE , It's an expected behavior for delivery activity under actions tab,

ParthaSarathy_0-1699978747065.png

Deliveries under 'Deliveries tab' are automatically attached to Campaign (You cannot able to see these 'Deliveries tab' deliveries in a standalone workflow).

But deliveries under actions tab are not automatically linked as you can linked them in the technical workflows.

ParthaSarathy_1-1699978798732.png

 

So if you want to use them (Action tab's delivery activity) in a campaign, then you need to use the code to link the delivery with campaign.

Avatar

Level 3

Hello and thank you for your answer.

We do not use delivery nodes from the Deliveries tab you are showing, we just use the other ones in the Action tab and they usually work fine (without adding any code/script):

A_B_SE_0-1700052569451.png

 

Avatar

Level 3

So is this just a bug or why does it happen to some deliveries? As I said we are using always the same nodes.

Avatar

Community Advisor

@A_B_SE , its not a bug. Its an expected behavior.

 

If you use this activity,

ParthaSarathy_0-1700063281749.png

Then we have to add the below script in script tab

delivery.operation_id = instance.operation_id;

 

If you use continuous delivery activity, place a JavaScript code activity next to continuous delivery and add below script in it.

ParthaSarathy_1-1700063434532.png

var delivery = NLWS.nmsDelivery.load(vars.deliveryId);
delivery.operation_id=instance.operation_id;
delivery.workflow_id=instance.id;
delivery.save();

Avatar

Community Advisor

Hello just to add to above, the first scenario you should also link workflow to campaign is also not done automatically with this activity.

Also i thought this is the only activity that is not linking these two. Rest should work. did no know also continuous delivery is not linking it

 

Marcel

Avatar

Community Advisor

Thanks Marcel for adding the Workflow linking point. So, @A_B_SE  you can add the below code in script tab to link both campaign and workflow to the delivery,

delivery.operation_id = instance.operation_id;
delivery.workflow_id = instance.id;