Skip to main content
Level 5
Mar 12, 2025 3:27 PM UTC
Solved

Best Way to Assign "Random" Selection on Inconsistent Batch Campaign?

Hello!
We're working on a campaign that would assign email personalization (From Address, Body Copy, etc) to one of three representatives.

In theory how it would work is:

  1. Lead qualifies for Campaign and enters Flow Steps
  2. Change Data Value step randomly assigns a score of 1-3 to a Custom Field (So Random Sample at 33% across 3 choices)
  3. Velocity scripting takes field score and outputs Representative information on email sent out same day

My question is if this is the best way to handle this, especially in possibilities where there may only be 1 qualifying Lead on some days without having to send to a list and wait for more than one potential Recipient?

SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Mar 12, 2025 4:02 PM UTC

Not sure what you mean by the last part (“... only be 1 qualifying lead...”).

 

If there’s only 1 lead, the other 2 sends wouldn’t go to anyone, but how else could it work?

 

Also, you may not need to use Random Sample at all here. You can randomize the content using Velocity itself.

3 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Mar 12, 2025 4:02 PM UTC

Not sure what you mean by the last part (“... only be 1 qualifying lead...”).

 

If there’s only 1 lead, the other 2 sends wouldn’t go to anyone, but how else could it work?

 

Also, you may not need to use Random Sample at all here. You can randomize the content using Velocity itself.

Translate
Level 5
Mar 12, 2025 4:06 PM UTC

Ah apologies, let me re-phrase that:

Essentially this would assign the score of 1-3 with a Data Change and then all recipients would receive the email just with the different personalization based on the score.

Oh, there's randomization in Velocity? I guess I did not think about that - I'll look into it! Thank you!!

 

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Mar 12, 2025 4:17 PM UTC

Oh, there's randomization in Velocity? I guess I did not think about that - I'll look into it! Thank you!!

Yes, $math.random(1,4) will give you a random value between 1 and 3.

Translate