Calculating fields using Decision tables
2 Tasks
15 mins
Beginner
Pega Platform 8.7
Case Management
English
Scenario
GoGoRoad stakeholders want to ensure customer satisfaction by allowing the application of discounts based on whether the service provider is on time or late. Customers are offered a greater discount based on how late the service provider arrived. You are directed to add a calculated field to the Review service summary step in the Assistance Request case type. The calculation is based on a decision table.
The following table provides the credentials you need to complete the challenge.
Role | User name | Password |
---|---|---|
Application Developer |
author@gogoroad | 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 Create the view for the Review service summary step
- In the navigation pane of App Studio, click Case types > Assistance Request to display the Assistance Request case life cycle.
- In the Resolution stage, click the Review service summary step to open the Step properties pane on the right.
- In the Step properties pane, click Configure view to configure the step view.
- In the view configuration dialog box, on the Fields tab, click Add field to add a field to the Review service summary view.
- In the field configuration window, in the Field name field, enter On-time performance to name the field.
- In the Type list, select Picklist.
- In the Choices section, click Add choice to display an empty field.
- In the empty field, enter On time as a picklist value.
- Repeat steps 7-8 to add three additional picklist values: Up to 15 minutes late, Up to 30 minutes late, and More than 30 minutes late.
- Click Submit to submit the picklist values.
- In the menu on the left, click Fields to display the fields available in your data model.
- Hover over Service total, and then click the Plus icon.
- In the Options list, select Read-only.
2 Add calculated fields to the Review service summary view
- Click Add field to add a field named Service credit.
- In the Type list, select Currency.
- Click Advanced, and then select the This is a calculated field (read-only) check-box.
- In the Function list, select Use decision table. The second list defaults to Custom decision table.
- To the right of the Custom decision table field, click the Gear icon to open the Evaluate service credit dialog box to build the decision table.
- In the Evaluate service credit dialog box, click Add columns to display the Add columns dialog box.
- In the Column list, select On-time performance. The Comparator value defaults to Equal to.
- Click Submit to define the first column of the decision table.
- Under the On-time performance column, double-click the empty cell, and then enter Up to 15 minutes late.
- In the Return column, enter .ServiceTotal * .05.
- To the right of the first cell of the Return column, click Add row.
- Repeat Steps d-f to configure the decision table with the information from the following table.
On-time performance Return Up to 30 minutes late .ServiceTotal * .1 More than 30 minutes late .ServiceTotal * .25 Otherwise 0 - Click Submit to close the decision table.
- Click Submit to add the calculated field.
- Click Submit to finish configuring the Review service summary view.
- Click Save to save your changes to the case life cycle.
Confirm your work
- In the Assistance Request case type, click Save and run to create a new Assistance Request case.
- Advance the case to the Enter customer information view and select [email protected] from the customer ID list.
Note: If you select a customer ID with Gold coverage, the Invoice customer process is skipped.
- Advance the case to the Identify location step and enter an address.
Note: If you do not specify a value in the State field, the Select service provider step does not display any service providers.
- Advance the case to the Select service provider step, and then click Select provider to select a service provider.
- In the Select services step, enter a quantity for at least one service, and then click Submit.
- In the Review service summary step, in the On-time performance list, select More than 30 minutes late.
- Click Save to confirm that the value of the Service credit field updates.
- In the On-time performance list, select Up to 15 minutes late.
- Click Save to confirm that the value of the Service credit field updates.
This Challenge is to practice what you learned in the following Module:
Available in the following missions:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?