Expand my Community achievements bar.

how to insert the count of an outbound activity in an e-mail?

Avatar

Level 2

Hi all,

I need to put in a delivery as a personalization the total count of an outbound transition (945 contacts)

ElisabettaPi_0-1732630875926.png

What is the correct procedure to do that?

Thanks

Topics

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

3 Replies

Avatar

Community Advisor

Hi @ElisabettaPi ,

Add an enrichment in the 945 records transition > add data > $(vars/@recCount) and give alias as @count 

ParthaSarathy_0-1732632052807.png

In Delivery, print the count value using below syntax,

 

<%= targetData.count %>

 

Avatar

Level 2

It works! Thanks 

 

Another question: If I have 2 outbound transitions from the split activity, how can I manage the 2 counts in the same delivery?

Avatar

Community Advisor

@ElisabettaPi , In both Split transitions, Instead of enrichment use JavaScript activity and store the count in 2 different variables as,
Transition-1: JavaScript > instance.vars.count1 = vars.recCount;
Transition-2: JavaScript > instance.vars.count2 = vars.recCount;
And in delivery, call this instance variable using the steps mentioned in this document (refer 'Calling a Variable in the Content of the Delivery' section)