Automating Decisions with Decision trees
Archived
3 Tasks
10 mins
Beginner
Pega Platform 8.4
Case Management
English
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. Use the values in the following table:
Country | Credit score > | Loan amount > | Return | |
---|---|---|---|---|
if | Canada | 800 | .0200 | |
if | Canada | 700 | .0275 | |
if | Canada | 200 | .0425 | |
if | 800 | 50000 | .0225 | |
if | 800 | 0 | .0200 | |
if | 700 | 50000 | .0325 | |
if | 700 | 0 | .0275 | |
if | 200 | 50000 | .045 | |
if | 200 | 0 | .0425 | |
otherwise | .07 |
The following table provides the credentials you need to complete the challenge.
Role | Operator ID | Password |
---|---|---|
Application Developer | author@loans | pega123! |
Challenge Walkthrough
Detailed Tasks
1 Configure the Borrower risk adjustment decision tree
- 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:
- 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:
- 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.
3 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.