Automating Decisions with Decision trees
2 Tasks
10 mins
Scenario
An organization is launching an application that facilitates loan requests. Customers initiate a loan request and enter their credit score, loan amount, and country. Configure a Decision tree and declare Expression so that the loan rate is determined automatically based on the credit score, loan amount, and country the customer enters. For this challenge, if the customer specifies Canada as the country, the loan amount does not affect the loan rate.
The following table provides the credentials you need to complete the challenge.
Role | User name | Password |
---|---|---|
Application Developer | author@loans | pega123! |
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.
Challenge Walkthrough
Detailed Tasks
1 Configure the Borrower risk adjustment Decision tree
- In the Pega instance for the challenge, enter the following credentials:
- In the User name field, enter author@loans.
- In the Password field, enter pega123!.
- From the navigation pane of Dev Studio, click App.
- Right-click LoanRequest and click Create > Decision > Decision Tree.
- In the Label field, enter Borrower risk adjustment tree.
- Click Create and open to create the Decision tree.
- Click <click here to add a Condition> to add a Condition.
- In the first empty field, enter or select .Country.
- Keep the operator value as =.
- In the second empty field, enter Canada.
- Click the return drop-down and select continue. An indented, nested Condition is displayed.
Note: If the Conditions do not display, save and refresh the Decision tree.
- Click the nested Condition and repeat steps 6-9 to specify the Condition if .CreditScore > 800 then return .0200.
- With the nested Condition selected, click Add Row twice to add two additional nested Conditions.
- Repeat steps 6-9 to define the following Conditions:
Country Credit score > Return if Canada 800 .0200 if Canada 700 .0275 if Canada 200 .0425 - Select the first top-level Condition and click Add Row three times to add three additional top-level Conditions.
- Repeat steps 6-12 to define the following Conditions:
Credit score > Loan amount > Return if 800 50000 .0225 if 800 0 .0200 if 700 50000 .0325 if 700 0 .0275 if 200 50000 .045 if 200 0 .0425 - In the otherwise row, enter the default return value of .07.
- Click Save to save the Decision tree.
2 Configure the Loan rate declare Expression
- From the navigation pane, right-click LoanRequest and click Create > Decision > Declare Expression.
- In the Target Property field, enter or select .LoanRate.
- Click Create and open.
- In the Build Expressions section, in the Value of drop-down, select Result of Decision Tree.
- In the empty field to the right, enter or select BorrowerRiskAdjustmentTree.
- Click Save.
Confirm your work
- In the header of Dev Studio, click Create > New > Loan Request to create a new Loan Request Case instance.
- In the Loan amount field, enter 5000.
- In the Credit score field, enter 600.
- In the Country drop-down, select Canada.
- Click Submit.
- Verify that the Loan rate is 4.25%.
- Create an additional Loan Request Case instance.
- In the Loan amount field, enter 50000.
- In the Credit score field, enter 600.
- In the Country drop-down, select Canada.
- Click Submit.
- Verify that the Loan rate is 4.25%.
- Optional: Create additional Case instances and enter different Credit score, Loan amount, and Country values. Verify that the Loan rate is consistent with the values specified in the Borrower risk adjustment Decision tree.
This Challenge is to practice what you learned in the following Module:
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?