Creating a data flow for testing Next-Best-Action strategy
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
- 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.
- In the navigation panel of App Studio, click .
- On the Data Flows landing page, click Create.
- On the Create Data Flow page, enter the data flow description, for example, NBA strategy test.
- 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. - Click Create and open.
- On the data flow canvas, right-click the Source shape, and then select Properties.
- In the Import data from list, select Data set.
- In the Data set field, select Segment.
- Click Submit.
- Add a Convert shape to the data flow canvas, and then right-click the shape to edit its properties.
- 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.
- Select the Auto-copy properties with identical names
check box, as in the following example:
- Click Submit.
- 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.
- Configure the Compose shape:
- Right-click the Source shape for the Compose shape, and then click
Properties.
- In the Import data from list, select Data flow.
- 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. - 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. - Click Submit.
- Right-click the Compose shape, and then click Properties.
- 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.
- 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:
- Click Submit.
- Right-click the Source shape for the Compose shape, and then click
Properties.
- Verify that the final shape in the data flow is an Abstract shape which outputs
the results, as in the following example:
- Click Save.
Previous topic Configuring persona tests Next topic Testing the Next-Best-Action strategies with data flows