OVERVIEW:
- The 'Switch' Activity is used to identify unique branches of the selected data source. This allows for a single data source to have unique chains of Activities for every different type of values. For example, a single data source could contain logic to handle different types of events.
Default Configuration Parameters:
- Data Source: Value to execute the matched case.
Cases:
- Add multiple and different types of cases to perform unique operations in each case.
HOW IT WORKS:
A Simple Example to configure the 'Switch' activity in PopFlow Studio.
- Switch activity can be used if some data has unique requirements. You can add multiple cases to perform a unique operation on different data.
- To add the cases click on the case button. It will add a panel as shown below.
- The best way to see the power of this activity is to step through an extended example. Let us suppose that we can have three types of customers: Bronze, Gold, and Platinum. We might also have customers that have not yet been entered into a particular program. For every customer, we need to execute different activities.
- Now, let’s create Case Switch that branches the workflow based on the CustomerType. After creating it will look like as shown below:
- Note that the default case would be used to handle customers that have not yet been entered into a program.
- A case can also be removed by clicking on the red delete button.