Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Creating a data flow for testing Next-Best-Action strategy

Updated on August 4, 2022

Improve the accuracy of your Next-Best-Action strategy by testing the framework. By creating a data flow which retrieves customer data from your relational database, and then running the data flow, you can verify that the Next-Best-Action strategy framework gives correct results.

Pega Customer Decision Hub
  1. Log in to App Studio as an operator with access to data flows. Only users with an access group that includes the user role CustomerDecisionHub:DataAdmin can access data flows.
  2. In the navigation panel of App Studio, click DataData Flows.
  3. On the Data Flows landing page, click Create.
  4. On the Create Data Flow page, enter the data flow description, for example, NBA strategy test.
  5. In the Apply to field, verify that the class to which this data flow applies is the primary customer class for your application.
    Tip: You can use the Context Dictionary to check the primary customer class for your application. For more information, see Complying with policies or regulations by detecting unwanted bias.
  6. Click Create and open.
  7. On the data flow canvas, right-click the Source shape, and then select Properties.
  8. In the Import data from list, select Data set.
  9. In the Data set field, select Segment.
  10. Click Submit.
  11. Add a Convert shape to the data flow canvas, and then right-click the shape to edit its properties.
  12. In the Into page(s) of class field, enter Data-Decision-Request-Customer. This option converts the source data from your customer class into a page of the Data-Decision-Request-Customer class.
  13. Select the Auto-copy properties with identical names check box, as in the following example:
    Convert shape configuration
  14. Click Submit.
  15. Add a Compose shape to the canvas. The Compose shape pulls in all customer data, including associated data that you configured in the Context Dictionary.
  16. Configure the Compose shape:
    1. Right-click the Source shape for the Compose shape, and then click Properties.
      Source properties for the Compose shape
    2. In the Import data from list, select Data flow.
    3. In the Input class field, select the primary customer class for your application.
      Tip: Use the Context Dictionary to check the primary customer class for your application. For more information, see Complying with policies or regulations by detecting unwanted bias.
    4. In the Data flow field, select the CustomerData data flow for your primary customer class.
      Note: The name of the data flow depends on the name of the primary customer context in your application. For example, if your primary customer context is Subscriber, the name for the CustomerData flow is SubscriberData. For more information, see Complying with policies or regulations by detecting unwanted bias.
    5. Click Submit.
    6. Right-click the Compose shape, and then click Properties.
    7. In the Compose Data_Decision_Request_Customer with data from field, select the property that corresponds to your primary customer context. For example, if your primary customer context is Subscriber, select the .Subscriber property.
    8. In the Compose when conditions below are met section, enter the following Join condition: When<your customer class key> is equal to.pySubjectID as in the following example:
      Sample Join condition
    9. Click Submit.
  17. Verify that the final shape in the data flow is an Abstract shape which outputs the results, as in the following example:
    Data flow for testing the Next-Best-Action strategy framework
  18. Click Save.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us