Skip to main content

Using behavioral data as predictors

4 Tasks

10 mins

Visible to: All users
Beginner Pega Customer Decision Hub '23 English

Scenario

U+ Bank is implementing cross-selling of their credit cards on the web by using Pega Customer Decision Hub™. All available customer data, including financial clickstream summary attributes, is available to the adaptive models that determine which offer to display for a particular customer.

To further enhance the predictive power of the adaptive models, you create a parameterized predictor as the ratio of two clickstream summary attributes that denote the number of visits to the website's Investment page in the last 30 days and the last 90 days.

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

Role User name Password
Data scientist DataScientist rules

Your assignment consists of the following tasks:

Task 1: Verify that customer behavioral data is collected

Simulate customer interactions on the U+ Bank website. Browse the FSClickstream data set and confirm that customer activity on the website is captured.

Task 2: Create a property to store the parameter value

In Next-Best-Action Designer, create a property to store a parameterized predictor that calculates the ratio of two clickstream summary attributes.

Task 3: Configure the pre-processing extension strategy

In the NBAPreProcessExtension strategy, set the new property to equal an expression that returns the ratio of the Investment page visits in the last 30 days to the last 90 days.

Tip: The applicable clickstream summary attributes are InvestmentPageVisitsLast30Days and InvestmentPageVisitsLast90Days.

Task 4: Configure the prediction

In the Predict Web Propensity prediction, set the class to save the result to CDH-SR. Add the parameter to the prediction.

 

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

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

Challenge Walkthrough

Detailed Tasks

1 Verify that customer behavioral data is collected

  1. On the Exercise System landing page, in the upper-left corner, select the Application Switcher and click the U+ Bank icon to open the website.
  2. On the U+ Bank website, in the upper-right corner, click Log in to access the site as Troy and display the marketing banner.
  3. In the header of the U+ Bank website, click Investment to see the Investment landing page.
  4. In the upper-right corner, click the user image, then click Log out.
    Troy log out
  5. Repeat steps 2-4 at least once.
    Tip: To generate more customer behavior data, you could click on the credit card offer or visit other pages on the website.
  1. On the Exercise System landing page, in the upper-left corner, select the Application Switcher and click the Pega Infinity™ icon to open Customer Decision Hub.
  2. Log in as a data scientist:
    1. In the User name field, enter DataScientist
    2. In the Password field, enter rules.
  3. In the navigation pane of Customer Decision Hub, click Data > Profile Designer.
  4. In the Customer section, click the Financial services clickstream summary to open the data set.
  5. On the Records tab, search for the Investment page visits fields and confirm that they are correctly populated for Troy (Customer ID = 14).
    Field are correctly populated

2 Create a property to store the parameter value

  1. In the navigation pane of Customer Decision Hub, click Next-Best-Action > Designer.
  2. In Next-Best-Action Designer, click the Taxonomy tab, and then click Properties tab.
  3. Click Edit, and then click Add property to create the new property.
  4. In the Create property dialog box, configure the property:
    1. In the Name field, enter RatioInvestmentPageVisits30to90.
    2. In the Property type field, select Decimal.
    3. For Property usage, select Dynamic.
    4. Deselect Include this property in strategy results for Inbound channels.
    5. Deselect This property is persisted to storage and available for offer processing.
      Create property dialog box
  5. Click submit to close the dialog box.
  6. Click Save to save the Taxonomy configuration.
    Note: Saving the taxonomy may take some time as it regenerates the entire Next-Best-Action framework.

3 Configure the pre-processing extension strategy

  1. In the header of Customer Decision Hub, in the Search field, enter NBAPreProcessExtension, and then press the Enter key.
  2. In the search results click NBAPreProcessExtension to open the strategy.
  3. In the upper-right corner, click Save as.
  4. In the Context section, in the Apply to field, select Data-Decision-Request-Customer-CDH.
  5. In the Strategy Record Configuration section, define the strategy in the CDH-SR class.
  6. In the upper-right corner, click Create and open to edit the strategy.
  7. On the canvas, right-click, and then select Enrichment > Set Property.
  8. Connect the strategy components as in this image:
    The preprocessing strategy
  9. Right-click the Set Property component, and then select Properties to open the Set property properties dialog box.
  10. In the Name field, enter RatioInvestmentPageVisits30to90.
  11. In the Define action, target, and source section, click Add item.
  12. In the Target field, enter or select .RatioInvestmentPageVisits30to90.
  13. Next to the Source field, click the Gear icon to configure the parameter calculation.
  14. In the expression builder, enter the calculation: @if(DecisionRequestCDH.Customer.FSClickstream.InvestmentPageVisitsLast90Days=0,0, divide(DecisionRequestCDH.Customer.FSClickstream.InvestmentPageVisitsLast30Days, DecisionRequestCDH.Customer.FSClickstream.InvestmentPageVisitsLast90Days))
    Tip: This expression returns a value of zero when the number of Investment page visits in the last 90 days is zero. Otherwise, it returns the ratio of the Investment page visits in the last 30 days to the last 90 days.
  1. Click the Test tab.
  2. In the Test data section, enter values for the two variables, and then click outside the value fields to see the result.
    The test results
  3. Click Submit to close the expression builder.
  4. Click Submit to close the Set property properties dialog box.
  5. In the upper-right corner, click Check in to save your work and check in the strategy.
  6. In the Check-in comments field, enter appropriate comments, and then click Check in.

4 Configure the prediction

  1. In the navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio to open Prediction Studio.
  2. On the Predict Web Propensity tile, click Open prediction.
  3. On the Settings tab, in the Prediction details section, click Configure.
  4. For Save results to select CDH-SR.
  5. Click Submit to close the dialog box.
  6. Confirm that you are aware that any previous learning will no longer be available, and then click Yes.
  7. In the upper-right corner, click Save.
  8. On the Models tab, in the Web Click Through Rate Customer row, click 6 Parameters to edit the parameters.
  9. In the Edit Parameters dialog box, click Add parameterized predictor.
  10. In the Name field of the new parameter, enter RatioInvestmentPageVisits30to90.
  11. In the Data type list, select Decimal.
  12. In the upper-right corner of the dialog box, click the Next page icon.
  13. Confirm that the Predictor type of the new parameter is Numeric.
  14. In the Field field, select .RatioInvestmentPageVisits30to90.
  15. Click Submit to close the dialog box.
  16. In the upper-right corner, click Save.

Confirm your work

  1. Click Web Click Through Rate Customer to open the adaptive model.
  2. On the predictors > Parameters tab, confirm that the new parameterized predictor is listed.
    The new parameter is listed
    Note: When you click, in the upper-right corner, Submit prediction for deployment, all changes to the prediction are included in a branch that need to be merged by a System Architect before they take effect.

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.

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