Expand my Community achievements bar.

SOLVED

Is it possible to get a count of outgoing transition records in a delivery script?

Avatar

Level 1

I'm setting up alerts for a series of recurring deliveries that is meant to inform the operators of how many delivery records were generated / deliveries were sent. 

If I pull a count of records in the scripts of the delivery node itself, I find that recipient records excluded by the sending typology are included in the count. Is there a way to pull a count of outgoing records (so these excluded records are not included) within the delivery script? Or is it only possible to do so in a separate script node following the delivery? 

For the latter, I'd use the following method (https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/how-to-get-the-cou...). 

Thanks in advance, 
e


1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @espiewak 

 

If you do not want to use the JS, you can directly get this information from the delivery schema, which will have total counts as well as failed and successful counts.

 

More information is available here: Indicator calculation | Adobe Campaign

 

 


     Manoj
     Find me on LinkedIn

View solution in original post

9 Replies

Avatar

Community Advisor

Hello @espiewak 

 

You can add a javascript right after your delivery activity and use this code to get the success counts.

 

var delivery=nms.delivery.load(vars.deliveryId);
var successfulCounts=delivery.indicators.success;

     Manoj
     Find me on LinkedIn

Avatar

Level 1

Thanks @_Manoj_Kumar_ 

 

I'm hoping to avoid having any js nodes following the deliveries. I believe that, if absolutely necessary to have a js-node following, I can simply perform a record count as all failed deliveries will have dropped off the records, correct?

instance.vars.OutogoingCount = vars.recCount; 

Avatar

Community Advisor

Hello @espiewak The output count might not be accurate. The output count can include the population of the proof + target + bounces.

 

Also, Suppose you plan to add this code snippet in the Delivery script tab. In that case, you will get the counts from the previous activity, not the counts processed successfully by the delivery activity.


     Manoj
     Find me on LinkedIn

Avatar

Level 1

I was hoping to accomplish this without the need for a js node, either by using just the delivery script or the script in an Alert node, as this is meant to generate a report following deliveries. 

 

However, I'm having an issue with the delivery.indicators.success returning a 0 count despite successful deliveries. Screenshots below show my generation of instance variables for both recCount and delivery.indicators.success and the counts then populated into the Alert email. As can be seen in the workflow, despite 1 successful delivery, this is returning a 0 count unlike the recCount. 

espiewak_0-1684885365885.png

espiewak_1-1684885393142.png

Alert Email Body: 
espiewak_2-1684885437770.png

 

 

Can you advise? 

Avatar

Community Advisor

Hello @espiewak 

 

Are you getting the correct value in vars.deliveryId ?


     Manoj
     Find me on LinkedIn

Avatar

Administrator

Hi @espiewak,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!



Sukrity Wadhwa

Avatar

Level 1

Hi @Sukrity_Wadhwa, thanks for following up. Is there any way to accomplish this without having any js nodes following the deliveries? I would love to integrate this in a streamlined way as I have a large number of workflows that will need to be updated here. 

Thanks in advance, 
e

Avatar

Administrator

Hi @espiewak,

I have escalated this among our SMEs to get you more help.

Thanks!



Sukrity Wadhwa

Avatar

Correct answer by
Community Advisor

Hello @espiewak 

 

If you do not want to use the JS, you can directly get this information from the delivery schema, which will have total counts as well as failed and successful counts.

 

More information is available here: Indicator calculation | Adobe Campaign

 

 


     Manoj
     Find me on LinkedIn