Randomize how a user is branched

Hello everyone!
I shot this 5 minute loom for a customer, so I thought I’d share it with the community as well.

The goal here is to send users down different branches at random to different sets of quiz questions.

In the video I use the API Config view in a gambit and conditional jump to accomplish the task.

Here is the video: https://www.loom.com/share/ce158cc27f0f45e3a28bbc857a4aa687

Here is the everything you need to recreate this:

For the API Config - http://api.mathjs.org/v4/

In Data/Body with “Raw” selected add:

{
“expr”: “randomInt(1,3)”
}

In the conditional logic branch - {{pre.number.result}} - equals - 1

Note: I originally used this trick to pull in random messages into a chatbot based off of a Google sheet. The chatbot was meant to be used repeatedly through a week, so I randomizes key messages to keep the experience fresh through each interaction. If anyone is curious how this works, I’m happy to shoot a more detailed video (just let me know in the comments).

2 Likes