When you create a decision table, you select a field that you want to compare against specific values, and then you define a method of comparison. You can compare one field against multiple values to find the result that best fits your business needs. Each column includes a field to evaluate, and each row includes values that an application uses to compare against the field. At run time, the application evaluates a decision table from top to bottom, starting with the row at the top of the table.
- Navigate to the place in your application where you want to use a decision table.
- In the Evaluate dialog box for a calculated field, click Add column.
- In the Column list, select the field that you want to
evaluate at run time.
For example: To include a monthly income of the customer in the calculation of the best account type to offer to the customer, select Monthly income.
- In the Comparator list, select a comparator to use for
evaluation.A list of comparators depends on the type of the calculated field that you want to edit.
For example: For a calculated field of an integer type, select Between > and < to indicate that a field in the Column list needs to be in a range of values at run time. In a sample scenario, a monthly income of a customer needs to be between 2,000 and 4,000 dollars.
- Optional: To add more fields to compare at run time, repeat steps 2 through 4.
For example: Apart from the monthly income of a customer, you can add columns to check whether the customer has loans or mortgages.
- Click Submit.
- Click a cell in the column that you want to edit, and then enter a value to
compare against the field at run time.
For example: In the Monthly income column, enter 2000 and 4000 to indicate that a monthly income of a customer needs to be between 2,000 and 4,000 dollars.If you have multiple columns, provide values for every column.
- In the Return column, click a cell, and then enter a value
that the decision table returns if the condition in the row that you want to
edit evaluates to true.
For example: To return a Standard account type for customers whose monthly income is between 2,000 and 4,000 dollars, in the Return column, in the row with the 2000 and 4000 values, enter Standard.
- Optional: To provide more values against the field to evaluate at run time, click the
Add icon, and then repeat steps 7 through 8.
For example: You can provide more values of monthly income and then associate them with different types of accounts.
- In the Otherwise row, in the Return
column, click the cell, and then enter a value that the decision table returns
if none of the rows evaluates to true.
For example: To assign an account of a Custom type to a customer whose income is different than options in the decision table, enter Custom.
- Optional: To reuse the configured logic in the future, save the decision table:
- Above the header of the decision table, click Add to decision table library.
- Optional: To provide your custom name for the decision table, in the
Add to library for reuse dialog box, in the
Name field, enter the label for the decision
table.By default, the system uses Evaluatecalculated field name as the name for a decision table.
- Click Submit.
- Close the dialog box with decision table configurations by clicking Submit.