Score to drive business logic on multiple options selected in Adobe Campaign web app

This blog post is related to Adobe Campaign Web applications and addresses the Use Case where we need to apply business logic on multiple options selected in multiple choice field in Survey app using SCORE attribute.

Capturing the options selected and followed by tweaking the subsequent flow through JavaScript can be troublesome in such scenario especially when we haven’t got much control on ID of multiple choice fields being generated.

A simple and easily maintainable solution to the problem is SCORE attribute. The “SCORE” attribute can be assigned to each option during Page configuration itself which can later be used in following transitions to drive the business logic.

In order to illustrate this, let’s consider a form which capture the type of Vehicle user owns with multiple selection available and we need to drive to a conclusion that whether user owns Truck or SUV among options like Bicycle, Bike, Car, SUV and Truck.

Create a new Survey app at location Resources > Online > Web applications

create survey app

We are creating the below workflow in this survey app where Vehicle Choice page contains the multiple select field with score assigned to each option. Based on cumulative score of the options selected with would be drive our filters and hence the business logic.

create survey app workflow

Add “Multiple choice” type control and make sure “Multiple values” checkbox is selected to get the required behavior. By doing this Storage archived field gets associated to the control.

configure the mutilple selection field

Now, add options to the Multiple choice field (vehicles is our case here) and assign the Score to each field.

add options and assign score

So, now we have assigned score to each option. Whatever options we selected, the cumulative score gets passed on to the next transition and based on its (@score) value we can implement the filters and test conditions.

Note: Javascript functions can be applied to parse and manipulate the value of score like parseInt(@score).

add business rule

Preview the application to see the results.

preview app

Note: the value of @score here and the options selected.

review app - results

Code snippet for above demo app is available at location

(Visited 110 times, 1 visits today)