Expand my Community achievements bar.

SOLVED

How to alert the different results from a split activity into a single alert?

Avatar

Level 5

I'm using an split activity to count how many recipients have field A and how many have field B.

Since those are 2 segments inside the split activty I get 2 outputs. I can send an alert for each output, but I need to send a single email containing both counts of Field A and Field B.

How to do it? 

Each alert has this format: Hoy <%= formatDate(new Date(), "%2D/%2M/%2Y") %>  la cantidad de recipients con Email Comercial es:  <%= vars.recCount %> 

Bonus: how to format the <%= vars.recCount %>  so it shows a "," for the thousends?

ogonzalesdiaz_0-1725377859534.png

 



1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ogonzalesdiaz ,

Use JS activity after both split transitions and store its recCount in a variable.

 

ParthaSarathy_0-1725380699068.png

//JS1 activity
vars.field1 = vars.recCount;

//JS2 activity
vars.field2 = vars.recCount;

And Union both the transition results and call this variable in alert activity.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @ogonzalesdiaz ,

Use JS activity after both split transitions and store its recCount in a variable.

 

ParthaSarathy_0-1725380699068.png

//JS1 activity
vars.field1 = vars.recCount;

//JS2 activity
vars.field2 = vars.recCount;

And Union both the transition results and call this variable in alert activity.

Avatar

Level 5

Hi Partha, do you know how to format: 

 

vars.field1 = vars.recCount

So instead of seeing: 1723232, it shows: 1,723,232?? In the email send?