Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Send random delivery between two options to single user

RaulOcana
Level 4
Level 4

Hi guys,

I have this WF that is triggered by a query that reads a schema and sends the delivery. The point is that I have two deliveries (A and B) and I want that to send the A or B randomly. Since there is only 1 person by send, I don't know how to use the Split activity since it is based on segment and my segment is always 1.

So this set is not working:

1797602_pastedImage_0.png

Do you have any idea how to workaround this please?

Regards,

Raúl

1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

In your split, use query filtering with this as the predicate:

Random() greater than .5

Thanks,

-Jon

View solution in original post

3 Replies
Anita_p
Community Advisor
Community Advisor

Hi Raul,

If I understand your question correctly, you are sure you will always have one record after random sampling to 50-50 .

Split works like mutually exclusive unless you select "enable overlapping" option.

Hence, whichever is the first sub-set defined would have the records as per the random sampling.

In your case, if you are attaching delivery A to the subset ,"Enviar Promo Millas", then the record would get this delivery.

If you still want to send both the deliveries to that one record , you can use fork activity after the split sub-set and attach both A and B deliveries to it so that the same record would receive 2 deliveries.

Screen Shot 2019-07-24 at 10.08.44 am.png

Hope this helps.

Regards,

Anita

RaulOcana
Level 4
Level 4

Hi Anita,

Thanks for your response. I will always have one record on the flow, but I want the system to send the delivery randomly, I mean, sometimes send the A and other times the B, but never both.

The set up that I posted is always picking the A option since my segment is always 1 record.

Regards,

Raúl

wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

In your split, use query filtering with this as the predicate:

Random() greater than .5

Thanks,

-Jon

View solution in original post