Skip to main content

Creating new aggregates on streamable data

3 Tasks

20 mins

Visible to: All users
Intermediate Pega Customer Decision Hub 8.7 English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

U+ Bank uses Pega Customer Decision Hub™ to present personalized credit card offers to customers on its website. The system architects have set up the Customer Profile Designer Accelerator component and completed the integration of the U+ Bank website with the clickstream service. As a decisioning architect, you want to add two new attributes to the financial clickstream summary. The first attribute calculates the average time customer spent on the account overview page in the last week. The second attribute captures the last page that the customer visited.

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

Role User name Password
System architect SystemArchitect rules
Decisioning architect DecisioningArchitect rules

Your assignment consists of the following tasks:

Task 1: Browse the clickstream data generated from the U+ Bank website

Log in to the U+ Bank website as Troy to generate clickstream data for the Account overview page. The financial clickstream summary uses the clickstream data set as its source. As a system architect, browse the clickstream data set in Dev Studio to analyze the generated data for the account overview page and get a deeper understanding of the JSON payload.

Task 2: Add new attributes to the financial clickstream summary

Use the Profile Data Sources landing page to add two new summary attributes to the financial clickstream summary. The Avg Active Secs Account 7 Days attribute calculates the average time customers spent on the account overview page in the last 7 days. The Last Visited Page attribute stores the name of the page last visited by the customer on the U+ Bank website.

Tip: Avg Active Secs Account 7 Days – Calculate the average PageViewActiveTime in the last week when the event is PageView and page type is Account.
Last Visited Page – Store the value of the last page type when the event is PageView.

Task 3: Confirm that the new aggregates are populated

Log in to the U+ Bank website to generate some clickstream data. Then, browse the financial services clickstream summary records to confirm that new attributes are populated.

 

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 Browse the clickstream data generated from the U+ Bank website

  1. On the exercise system landing page, click U+ Bank to launch the U+ Bank website.
  2. In the upper-right corner, click Log in > Sign in to access the site as Troy.
    Login87
  3. Confirm that you are on the Account overview page.
    Caution: Do not click any links or log out.
    AccountOverview87
  1. On the exercise system landing page, click Pega CRM suite to log in to Dev Studio.
  2. Log in as the system architect with User name SystemArchitect and Password rules.
  3. In the header of Dev Studio, in the Search field, enter Clickstream, and then press the Enter key.
  4. In the list of results, click the data set Clickstream to open the data set.
    Clickstream87
  5. In the upper-right corner, click Actions > Run to browse the data set.
  6. In the run context, in the Operation list, select Browse.
  7. In the upper-right corner of the run context, click Run to view the run results.
  8. Confirm that the following properties have the following results:

    Event

    PageView

    PageType

    Account

    CustomerID

    14

    Note: The PageViewActiveTime value varies by system.
    If you accidentally click links on the U+ Bank website, you may see additional records on the clipboard. In that case, click Result(1).
    ClickstreamCP87
  1. In Dev Studio, in the lower-left corner, click the SA icon, and then select Log off.

2 Add new attributes to the financial clickstream summary

  1. Log in to Customer Decision Hub as the decisioning architect with User name DecisioningArchitect and Password rules.
  2. In the navigation pane of Customer Decision Hub, click Data > Profile Data Sources to view the data sources.
    SelectPDS87
  3. On the Summaries tab of the Profile Data Sources landing page, click Financial services clickstream to open the summary.
  4. On the right side of the summary, click Create aggregate to open the Create aggregate dialog box.
  5. In the Create aggregate dialog box, configure the following settings:
    1. In the Name field, enter Avg Active Secs Account 7 Days.
    2. In the Function list, select Average.
    3. In the Field list, enter or select PageViewActiveTime.
    4. In the lists for Time window, enter or select the following:
      • Last
      • 7
      • Days
        AvgActSecAcct7Day87
    5. Click Next to define the aggregate conditions.
  6. In the Create aggregate dialog box, click Add condition and configure the following settings:
    1. In the first list, enter or select Event.
    2. In the second list, select is equal to.
    3. In the last field, enter PageView.
      FirstCondition87
    4. On the right, click the Add icon to add another condition.
  7. On the second condition line, configure the following settings:
    1. In the first list, enter or select PageType.
    2. In the second list, select is equal to.
    3. In the last field, enter Account.
      SecondCondition87
    4. Click Next to review the aggregate.
    5. Click Submit to create the aggregate.
  8. On the right, click Create aggregate.
  9. In the Create aggregate dialog box, configure the following settings:
    1. In the Name field enter Last Visited Page.
    2. In the Function list, select Last.
    3. In the Field list, enter or select PageType.
    4. In the Time window list, select All time.
    5. Click Next to define the aggregate conditions.
      LastVisitedPage87
  10. In the Create aggregate dialog box, click Add condition and configure the following settings:
    1. In the first list, enter or select PageType.
    2. In the second list, select is not equal to.
    3. In the third field, enter "".
      Condition387
    4. Click Next to review the aggregate.
    5. Click Submit to create the aggregate.
  11. In the upper-right corner, click Save to update the Financial services clickstream summary.
  12. In the upper-right corner, click the DA icon, and then select Log off.

3 Confirm that the new aggregates are populated

  1. Return to the U+ Bank website.
  2. In the upper-right corner, click the user image, and then click Log out.
    Logout87
  3. In the upper-right corner, click Log in > Sign in to access the Account overview page as Troy.
    Caution: Do not click any links or logout.
    LoginAgain87
  1. On the exercise system landing page, click Pega CRM suite to log in to Customer Decision Hub.
  2. Log in as the decisioning architect with User name DecisioningArchitect and Password rules.
  3. In the navigation pane of Customer Decision Hub, click Data > Profile Data Sources to view data sources.
    SelectPDS871
  4. On the Summaries tab of the Profile Data Sources page, click Financial services clickstream to open the summary.
  5. At the top of the Summary: Financial services clickstream page, click the Records tab to review the summarized clickstream records.
    Records87
    Caution: The Financial services clickstream summary data set uses the Clickstream stream data set as its source of aggregation. The records can also be viewed for a specific customer by selecting Specific Key on the Showing list and manually entering a CustomerID.
  1. On the Records tab, scroll right to verify that Avg Active Secs Account 7 Days is calculated.
    Note: The displayed value varies depending on the time spent on the page.
    ResultAvgActive87
  1. On the Records tab, scroll right to verify that Last Visited Page is stored.
    ResultLastVisit87


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