A/B testing the bot jump logic branches

If you want to create custom jumps based on the A/B experiment value you will need to do the following:

Step 0: Enable developer mode:

Step 2: Add a script variable, name - experiment, type - script:

function(callback, variables) {
// The `callback` argument has to be called with the result value in order to support the async operations. The `variables` argument is an object containing other variables
var experiments = ['1', '2', '3'];
var experiment = experiments[Math.floor(Math.random() * experiments.length)];
callback(experiment)
}

Step 1: Add a GoTo Step that uses the value of this variable ({{experiment}} in this example) and create your Response and corresponding Jump logic based on the value

That’s it! By randomly selected experiments (from 1 to 3), the bot will jump to either theΒ first, second, or third branches of the flow.

Edit this page