Expand my Community achievements bar.

SOLVED

Hello, what can I do to prevent delivery logs from being generated for a delivery with a population of 0?

Avatar

Level 2

In a workflow, I have a segmentation that creates 4 audiences with 4 respective deliveries, but in some cases, the result of that segmentation is 0. Nevertheless, the delivery runs and generates a delivery log with 0 recipients. This clouds my reports. Do you know what solution I could find?

 @Sukrity_Wadhwa Thanks for answering previous questions!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Javi_Landa ,

You can have 'Test' activity before delivery as below,

ParthaSarathy_0-1706692654005.png

 

And give the condition as vars.recCount > 0  inside Test Activity

ParthaSarathy_1-1706692726600.png

 

So, when the workflow runs, if the result is more than 0, then only delivery will gets created.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @Javi_Landa ,

You can have 'Test' activity before delivery as below,

ParthaSarathy_0-1706692654005.png

 

And give the condition as vars.recCount > 0  inside Test Activity

ParthaSarathy_1-1706692726600.png

 

So, when the workflow runs, if the result is more than 0, then only delivery will gets created.

Avatar

Level 2

Hello! I appreciate your response, and I largely agree with your points. However, I'm exploring other options that might be cleaner or more sophisticated.

I appreciate your assistance, and I'm open to any additional suggestions you may have, To not fill the workflow pannel with a lot of different activities,

Thanks in advance!

Avatar

Community Advisor

@Javi_Landa,

you can also do the same in the initialization script of the delivery activity. If vars.recCount = 0, then mark the activity as complete and move on to the next transition.

I don't have the code with me, I would have shared it.

 

Parthasarathy's solution is the standard and clean approach, adding code to your delivery activity init script is not as clean.

 

BR,

Ishan