Skip to main content

Challenge

Creating a decision strategy

4 Tasks

25 mins

Visible to all users
Beginner Pega Customer Decision Hub 8.5 English

Scenario

As a Strategy designer, you are tasked to design a basic decision strategy that outputs the Label action with the lowest printing cost. A set of Label actions are already defined and available for you in the Enablement business issue and Labels group . The printing cost of a label depends on a label-specific base cost and a variable depending on the number of letters of the label. To do so, you need to use the Proposition data, Set Property and Prioritize components on the strategy canvas. You verify your work by testing the strategy.

Use the following credentials to log in to the exercise system:

Role

User name

Password

Decisioning Consultant

CDHAnalyst

rules

Your assignment consists of the following tasks:

Task 1: Import the actions from the Enablement Business issue and Labels group.

Create a new strategy canvas, add the BlackLabel and the GreenLabel actions using the Proposition data component.

Task 2: Set the PrintingCost property for each action.

Use a Set Property component to set the PrintingCost property for each action. The printing cost is computed as base cost + 5 times the number of letters from the label.

Task 3: Select the action with the lowest printing cost.

Use a Prioritize component to select the action with the lowest printing cost.

Task 4: Confirm your work.

Test the strategy created.

Challenge Walkthrough

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Import the actions from the Enablement Business issue and Labels group

  1. Login as a Strategy Designer using User name CDHAnalyst and Password rules.
  2. In the left-hand menu, select Intelligence > Strategies.
  3. In the top-right, click Create > Start with new canvas.
  4. Give the strategy a name: Lowest Printing Cost.
  5. For the Business issue, select Enablement. For the Group, select Labels.
  6. Scroll down and, in the Context section, change the Apply to class in PegaCRM-Data-Customer. In case there is a Development branch, ensure No branch is selected.
  7. Scroll up and click Create and open.
  8. Right-click on the canvas and select Import > Proposition data.
  9. Right-click on the new component and select Properties to configure it.
  10. Select the BlackLabel action in the Proposition data dropdown.
  11. Click Submit.
  12. Repeat steps 8-11, this time importing the GreenLabel action.
    Black and Green Labels

2 Set the PrintingCost property for each action

  1. Right-click on the canvas and select Enrichment > Set property.
  2. Connect both Proposition Data components to the Set Property component. To connect two components, hover over on the Proposition Data component, select the gray triangle on the right, click on it and hold, and draw an arrow to the Set Property component.
  3. Right-click on the Set Property component and select Properties.
  4. Give the component a name: Set Printing Cost.
  5. In the Target tab, click Add item.
  6. Set the Target to .PrintingCost and click on the icon next to the Target field. Notice the Apply to class is: CRM-SR-Enablement-Labels.
  7. Click Create and open.
  8. In the Property type section, change the type to Decimal.
  9. Click Save.
  10. Close the Property rule to return to the canvas by clicking on the X in the right top corner.
  11. Click the icon next to the Source field to enter the Expression builder.
  12. Enter the expression: .BaseCost + (5 * .LetterCount).
  13. Click on Test.
  14. Enter a value for the BaseCost and one for the LetterCount and click outside of the input field. Verify that the Result is correct. For e.g. BaseCost=10, LetterCount=5 results in Result=35.
    Expression builder
  15. Click Submit to save changes to the expression.
  16. Click on Submit to save changes of the component.

3 Select the action with the lowest printing cost

  1. Right-click on the canvas and select Arbitration > Prioritize.
  2. Connect the Set Property component to the Prioritize component.
  3. Right-click on the Prioritize component and select Properties.
  4. Give the component a name: Prioritize on PrintingCost.
  5. In the Expression field, select or enter: .PrintingCost.
  6. Change the Order by to Lowest first.
  7. Scroll down and set the Output to Top 1.
  8. Click Submit.
  9. Connect the Prioritize component to the Results component.
    Prioritize actions
  10. Save the strategy

4 Confirm your work

  1. Click on Check out.
  2. Open the Test run panel on the right side.
  3. Double click on the canvas in a white area to re-align the strategy.
  4. Click Save and Run.
  5. Select the Set Property component and check the value of the PrintingCost property for both actions in the Results section of the Test run panel.
  6. Select the Results component and verify that the action with the lowest printing cost has been selected.


Available in the following missions:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice