Skip to main content

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

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Headless decisioning in Pega 7.1.8 to Pega 7.2.1

Updated on March 23, 2020

The decision management capabilities of the Pega 7 Platform automate and enhance the decision-making process for your customers. By using these capabilities, your organization can make next-best-action decisions to balance customer needs with your business requirements. One scenario in which next-best-action strategies are used is "headless decisioning," in which channel applications request decisions for specific customers and capture customer behavior. To implement the logic of the decision and the response, this scenario uses instances of the Strategy rule and Data Flow rule.

Use case for the headless decisioning scenario

In this scenario, customers log in to a website where they see a number of clickable banners. The banners and their position on the page are decided by Pega Decision Management. When a customer clicks a banner, the channel application sends this information to Pega Decision Management, which stores it in the customer's interaction history, and refines the adaptive model. With this approach, the adaptive model always uses the updated data, so that when customers go to the website in the future, they see banners that they are likely to click. We are going to use this setup through the rest of the tutorial.

Decisioning process in the headless decisioning scenario

This scenario is built in the DMSample application, but it can be built in any other application.

When a customer logs in to a website, the customer enters a user name (ID) and password. Pega REST service calls the ServiceActivity activity in the DMOrg-DMSample-Int-Decision class and passes the customer's ID. Then, the ServiceActivity activity invokes the DecisionFlow data flow for this customer. The NextBestAction strategy that is referenced from the DecisionFlow data flow selects the banners to display on the website. When the customer clicks one of the banners, the website invokes the response service that calls the ServiceActivity activity created in the DMOrg-DMSample-Int-Response class. The ServiceActivity activity invokes the ResponseFlow data flow for the customer. The ResponseStrategy strategy that is referenced from the Response data flow gets the list of the customer's decision results from decision time, as well as the customer properties that rank the banners by using adaptive models. This data is used to update the previous results (the pxInteractionHistory data set) and refine the adaptive models (in the pxAdaptiveAnalytics data set).

Headless decisioning process

Headless decisioning process

Rules used by this headless decisioning scenario

The headless decisioning scenario uses several business rules. Before you learn how to use the Data Flow rules to set up a headless scenario, you need to prepare two instances of the Service REST rule, the Activity rule, and the Strategy rule. For details about how to create any rule instances, see Creating a rule or data instance.

To build a headless decisioning scenario for our use case, we use the following rule instances:

  • The DecisionService service in the DMOrg-DMSample-Int-Decision class

    To invoke this service on any system, use the following URL address: http://<IPaddress>/prweb/PRRestService/DMSampleServices/DMSample/DecisionService/decision?CustomerID=<CustomerID>.

    For example,​

    The service call returns offers in XML format, like this:


  • The ResponseService service in the DMOrg-DMSample-Int-Response class

    To invoke this service on any system, use the following URL address: http://<IPaddress>/prweb/PRRestService/DMSampleServices/DMSample/ResponseService/response?CustomerID=<CustomerID>&InteractionID=<InteractionID>.

    For example,>&InteractionID=641889359827003657. The customer ID and interaction ID match the values that you get when making a decision.

    The response call returns offers in XML format, like this:


    For details about how to create REST services, see About Service REST rules.​

After you create the required rule instances and configure them according to the information provided in the tutorials, the headless decisioning scenario is ready to use.

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

Close Deprecation Notice
Contact us