Creating a custom treatment distribution report for simulations

From PegaWiki
Creating a Custom Treatment Distribution Report for Simulations / This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Creating a custom treatment distribution report for simulations

Description Distribution Simulations have a summary report at the Action level that is build into Pega Customer Decision Hub. This article shows how to prepare a custom report at the Treatment level using Simulation result dataset.
Version as of 8.7
Application Pega Customer Decision Hub
Capability/Industry Area Testing and Simulation



In business scenarios, where one action is mapped to multiple treatments, it is crucial to see simulation results at the treatment level, rather than just at the action level.

This article explains how to prepare a custom report at the treatment level for Distribution Test Simulations.

Create a New Report[edit]

  1. Create a new report in the data class where your simulation output will be written. In this example, it is Data-Simulations class.
  2. Click Add columns at the bottom of the page.
  3. Add the source columns: .pyIssues, .pyGroup, .pyName, .pyTreatment and a count summary in .pyTreatment column, as shown in the following figure.
    Data Simulations class report showing correctly configured report columns.
    Configuring new report columns
  4. Go to Pages & Classes tab.
  5. Map Pega-DM-Simulation class, as show in the figure below.
    Report definition Pages & Classes tab showing how to map Pega-DM-Simulation class.
    Mapping Pega-DM-Simulation class.
    This class will be used for filtering the report with current simulation run records.
  6. Add a filter into the report to see output results for current simulation run only. The filter should be set to the following: .pyWorkID is equal to pyWorkPage.pySimulationRunID, as in the following figure:
    Editing filter to see output results for current simulation run only.
    Adding a filter into the report.

Add a shortcut of your Report into Simulations Category[edit]

In order to make your report visible in the Simulations reports drop down list of Distribution Test screen, you need to add a shortcut.

  1. In Dev Studio, go to Reports > Category.
  2. Change the pxSimulations display type value from Never to blank in Private edit mode, as shown in the following figure:
    Category simulations settings showing how to change display type value in the private edit mode..
    Changing display type value
  3. Create a new shortcut for your new report in pxSimulations category, as shown in the following figure:
    Create shortcut window showing creaing a shortcut record configuration in pxSimulations category.
    Creating a report shortcut.
  4. After you apply these changes, you will see a new report titled Treatment Distribution in the Report menu of Assign reports to outputs section, as shown in the following figure:
    Distribution test window showing the Treatment Distribution report available in the Assign reports to outputs section.
    Treatment Distribution report in the Report menu list.

Result: After running the simulation, the report output will show counts at the treatment level, as in the report below:

Report output example showing counts at the treatment level.
Report output with treatment distribution