How to use an instance variable in a workflow Split activity

This document shows a working example of how to use an instance variable in a workflow for Adobe Campaign v6/v7.

In this example, an instance variable is used to compute dynamically the split percentage to apply on a population.

Create a workflow and add a Start activity.

Add and configure a JavaScript code activity to define an instance variable.

For example: instance.vars.segmentpercent = 10;

Add a Query activity and target recipients according to your needs.

Add a Split activity and configure it to perform a random sampling of the incoming population. The sampling percentage can be anything of your choice. It is set to 50% in this example.

It is this percentage which is updated dynamically thanks to the instance variable defined previously.

Inside the Initialization script section of the Advanced tab of the Split activity, define a JS condition. The JS condition selects the random sampling percentage of the first transition coming out of the Split activity and updates it to a value set by the instance variable created previously.