Information for:

Decision Tree node¶

The Decision Tree Node is commonly used across processes that are used to filter records through exclusion logic, apply a dynamic segmentation, or decide what kind of content a person is going to receive in a tweet, email, or personalized web experience. As the decision tree node is a generic piece of logic, it has a wide range of uses and applications.

A decision tree consists of columns, each referred to as a characteristic, and rows, each referred to as a condition. You can define as many characteristics as you need. The decision tree executes beginning from the top left condition, testing each condition in turn until either a True value is found or the Else condition is reached.

The value of each characteristic comes from your graph’s Data schema, Public variables, and Literals. When you create a new characteristic, it has two conditions, or branches. You can add more conditions as needed. Each characteristic always has an Else branch that executes if no other branch evaluates to True. As Acquia Journey executes along a decision tree branch, it will return the value in the Result column once it fully executes a branch.

In the preceding example decision tree node, Gender, Age, and Shoe Size are characteristics. Each characteristic column has several conditions. For the decision tree to return the “young woman” result, the decision tree will execute in the following sequence:

1. Gender - The condition “Female” evaluates as True
2. Age The condition VAL < 25 evaluates as True
3. Shoe Size The characteristic evaluates its conditions:
1. VAL < 4 The condition evaluates as False
2. The Else branch executes as all other possibilities are exhausted
4. After all characteristics are evaluated, the result “young woman” is returned.

Creating a decision tree node¶

To create a decision tree node, perform the following actions:

2. Find the tile for the project that you want to modify, and then click its Project Editor icon .

3. In the top left of the page, click the Action Menu icon.

4. Click Create New.

5. In the Name field, enter the name of your new decision tree node.

6. In the Type section of the Create a New Item view, scroll through the list of node types to find its Logic section, and then click Decision Tree.

7. Click Create New Item.

Next, you must configure your new decision tree node.

Configuring a decision tree node¶

A decision tree characteristic always includes an Else conditional branch and at least one user-defined conditional branch. To configure a decision tree note, perform the following steps:

1. Create a decision tree node with one characteristic and one branch:

2. To add additional characteristics, click the Plus icon at the top left of your decision tree and provide the name for the new characteristic.

3. To add more conditions to evaluate for a characteristic, click the Plus icon to the left of the item you want to expand.

Editing characteristics or conditions¶

After creating a characteristic or condition, edit it by performing the following steps:

1. Click the condition that you want to edit.
2. In the right pane, scroll to the Edit Rule panel, and then click the expand icon to display its entire contents.
3. Optionally, provide a description for your condition.
5. For Advanced conditions, supply the logic for your condition; for Basic conditions, click the Select box to select your condition, and if required, provide the values needed to complete your conditional.
6. Click Save Changes to Condition.

Providing results for each conditional¶

After creating your characteristics and their conditionals, supply the results for each conditional. Results can be in the form of literals (hard-coded, static variables), a section of your schema, or a dynamic field in your schema.

2. Find the tile for the project that you want to modify, and then click its Project Editor icon.
3. In the top left of the page, click the Action Menu icon .
4. Click Open.
5. Find the name of the decision tree you want to edit and click its name, then click Open.
6. In the Results column, select the result you want to edit, select a value from either the Data schema or Public variables panels or enter a specific value in the Literals panel. In the Edit Result Value panel, click the left arrow icon to set the Result value for this decision tree node.

Mapping characteristics to data sources¶

For each created characteristic, you must add a data source in the list of parameters outside of the node at the graph level. To add data sources, perform the following steps: