How to: Combine Calculators and Decisions Components

Prev Next

This how-to guide provides an example of how to use the Calculator and Decisions components to create more complex logic-based configurations. You'll focus on assigning a point value for each possible answer to a question. Then, you'll use a Calculator component to calculate the total points value and create a score. And then you'll use a Decisions component to set up outcomes based on that score.

Configuration

In this guide, you'll assess if your end-user prequalifies for a mortgage.

Configure the Radio Buttons Components

Begin by setting up some questions for your end-user to answer. You'll add four questions, each with Yes or No answers. You'll assign each answer a point value of 0 or 1. Your end-users’ answers create a total score to decide if they prequalify.

  1. In the Module Builder, drag and drop four Radio Buttons components onto your canvas, placing them one below the other.

  2. In the Property ID and Label Text fields, enter the following:

    #

    Property ID

    Label Text

    1

    creditScore

    Do you have a credit score of at least 700?

    2

    downPayment

    Will you put down at least 20% of the purchase price as your down payment?

    3

    lateFees

    Have you incurred any late payment fees in the last 12 months?

    4

    bankruptcy

    Have you ever declared bankruptcy?

  3. In the creditScore and downPayment Radio Buttons components, complete the Values table as follows:

    Label

    Value

    Yes

    1

    No

    0

  4. In the lateFees and bankruptcy Radio Buttons components, complete the Values table as follows:

    Label

    Value

    Yes

    0

    No

    1

  5. Click Save Component for each component as you add it.

Configure the Hidden Component

Next, configure a Hidden component to store the combined point values of your questions.

  1. Drag and drop a Hidden component onto your canvas, placing it below the Radio Buttons components.

  2. In the Property ID and Label Text fields, enter sumScore.

  3. Click Save Component.

Configure the Calculator Component

Next, configure the Calculator component with your Radio Buttons component as your inputs. Use the Excel SUM function to add point values for each answer and assign aliases as inputs for the SUM formula.

  1. Drag and drop a Calculator component onto your canvas, placing it above your sumScore Hidden component.

  2. In the Property ID and Label Text fields, enter calcApproval.

  3. In the Inputs table, enter the following:

    Source

    Alias

    Required

    creditScore

    A

    (checked)

    downPayment

    B

    (checked)

    lateFees

    C

    (checked)

    bankruptcy

    D

    (checked)

  4. In the Outputs table, enter the following:

    Source

    Formula

    sumScore

    =SUM(A,B,C,D)

    A static image displaying the Calculator interface showing inputs and outputs for credit score evaluation.

  5. Click Save Component.

Configure the Text Field Component

Next, configure a Text Field component to display the message if the end-user has qualified.

  1. Drag and drop a Text Field component onto your canvas, placing it below the calcApproval Calculator component.

  2. In the Property ID field, enter qualified.

  3. In the Label Text field, enter Are you pre-qualified?.

  4. From the Input Behavior drop-down, select the Disable User Input. This option makes the Text Field component non-editable for the end-users.

  5. Click Save Component.

Configure the Decisions Component

Lastly, configure a Decisions component to create your score-based outcomes. If your end-user's combined score is between 0 and 2, they do not meet the criteria to prequalify. If their combined score is between 3 and 4, they do.

  1. Drag and drop a Decisions component onto your canvas, placing it above the Are you pre-qualified? Text Field component.

  2. In the Property ID field, enter ruleApproval.

  3. In the Canvas Label Text field, enter Approval Decision.

  4. In the Inputs table, set the following:

    #

    Source

    Type

    Required

    1

    sunScore

    range

    Yes (checked)

  5. In the Outputs table, set the following:

    #

    Source

    Type

    1

    qualified

    value

  6. In the Conditionals table, enter the following:

    #

    sumScore_min

    sumScore_max

    qualified_value

    1

    3

    4

    Congratulations! You pre-qualify.

    2

    0

    2

    Sorry, but you don't pre-qualify at this time.

    A static image displaying the Decision-making interface showing input, output, and conditional ranges for approval process.

  7. Click Save Component.

  8. Save your module.

Here's how the completed example looks in the Module Builder:

A static image displaying the questionnaire assessing credit score and financial history for loan approval.

Preview your module in Express View and select answers to your questions. Based on what you select, you'll either see the approval or rejection message display.

This how-to guide provides an example of how to use the Calculator and Decisions components to create more complex logic-based configurations. You'll focus on assigning a point value for each possible answer to a question. Then, you'll use a Calculator component to calculate the total points value and create a score. And then you'll use a Decisions component to set up outcomes based on that score.

Configuration

In this guide, you'll assess if your end-user prequalifies for a mortgage.

Configure the Radio Buttons Components

Begin by setting up some questions for your end-user to answer. You'll add four questions, each with Yes or No answers. You'll assign each answer a point value of 0 or 1. Your end-users’ answers create a total score to decide if they prequalify.

  1. In the Module Builder, drag and drop four Radio Buttons components onto your canvas, placing them one below the other.

  2. In the Property ID and Label Text fields, enter the following:

    #

    Property ID

    Label Text

    1

    creditScore

    Do you have a credit score of at least 700?

    2

    downPayment

    Will you put down at least 20% of the purchase price as your down payment?

    3

    lateFees

    Have you incurred any late payment fees in the last 12 months?

    4

    bankruptcy

    Have you ever declared bankruptcy?

  3. For the creditScore and downPayment Radio Buttons components, complete the Values table as follows:

    Option Label

    Value to Store in Submission Data

    Yes

    1

    No

    0

  4. For the lateFees and bankruptcy Radio Buttons components, complete the Values table as follows:

    Option Label

    Value to Store in Submission Data

    Yes

    0

    No

    1

  5. Click Save & Close each component as you add it.

Configure the Hidden Component

Next, configure a Hidden component to store the combined point values of your questions.

  1. Drag and drop a Hidden component onto your canvas, placing it below the Radio Buttons components.

  2. In the Property ID and Label Text fields, enter sumScore.

  3. Click Save & Close.

Configure the Calculator Component

Next, configure the Calculator component with your Radio Buttons component as your inputs. Use the Excel SUM function to add point values for each answer and assign aliases as inputs for the SUM formula.

  1. Drag and drop a Calculator component onto your canvas, placing it above your sumScore Hidden component.

  2. In the Property ID and Canvas Label Text fields, enter calcApproval.

  3. In the Inputs table, enter the following:

    #

    Property ID

    Alias

    Required

    1

    creditScore

    A

    (checked)

    2

    downPayment

    B

    (checked)

    3

    lateFees

    C

    (checked)

    4

    bankruptcy

    D

    (checked)

  4. In the Outputs table, enter the following:

    #

    Property ID

    Formula

    1

    sumScore

    =SUM(A,B,C,D)

    A static image displaying the Calculator interface showing property IDs and formulas for credit score calculations.

  5. Click Save & Close.

Configure the Text Field Component

Next, configure a Text Field component to display the message if the end-user has qualified.

  1. Drag and drop a Text Field component onto your canvas, placing it below the calcApproval Calculator component.

  2. In the Property ID field, enter qualified.

  3. In the Label Text field, enter Are you pre-qualified?.

  4. Set Disable User Input to A toggle switch icon indicating an on state for user interface settings. (ON). This option makes the Text Field component non-editable for the end-users.

  5. Click Save & close.

Configure the Decisions Component

Lastly, configure a Decisions component to create your score-based outcomes. If your end-user's combined score is between 0 and 2, they do not meet the criteria to prequalify. If their combined score is between 3 and 4, they do.

  1. Drag and drop a Decisions component onto your canvas, placing it above the Are you pre-qualified? Text Field component.

  2. In the Property ID field, enter ruleApproval.

  3. In the Canvas Label Text field, enter Approval Decision.

  4. In the Inputs table, set the following:

    Property ID

    Type

    Required

    sunScore

    range

    (checked)

  5. In the Outputs table, set the following:

    Property ID

    Type

    qualified

    value

  6. In the Micro Decisions table, enter the following:

    sumScore_min

    sumScore_max

    qualified_value

    3

    4

    Congratulations! You pre-qualify.

    0

    2

    Sorry, but you don't pre-qualify at this time.

    A static image displaying the Settings for approval decisions with input and output values displayed clearly.

  7. Click Save.

  8. Save your module.

Here's how the completed example looks in the Module Builder:

A static image displaying the questionnaire for credit approval with multiple choice questions and decision options.

Preview your module in Express View and select answers to your questions. Based on what you select, you'll either see the approval or rejection message display.