Extending real-time container request

From PegaWiki
This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search



Description Extend the real-time container payload so an external application can pass additional input.
Version as of 8.4
Application Customer Decision Hub
Capability/Industry Area Cross-sell and upsell on digital



Purpose[edit]

Extend the real-time container payload so an external application can pass additional input, which could be used by the decision strategy.

Use case examples[edit]

An application needs to send aggregated data for each entity (for example department).

Before you begin[edit]

For a basic understanding of real-time containers, see the Pega Customer Decision Hub User Guide on Pega Community.

Extending the real-time container request[edit]

  1. Create a custom class that represents the request. Class: RequestData PageList: -PatronID -PEPAggregates
  2. Create a property in the container payload class. Class: PegaMKT-Data-Container Page: -RequestData
  3. Add the property to the Int-PegaCDH-Container-Request class.
  4. Access the property in the decision strategy from a Set property component. Category = Primary.ContainerPayload.RequestData.PatronID

Results[edit]

Testing / verification:

Simple Request

Request:

{

"ContainerName": "AllOffers",

"CustomerID": "Customer1",

"RequestData":{

"PatronID": "Customer1",

"PEPAggregates":""

}

}

Returns - Status OK and relevant offers with "Customer1" in category

Aggregate Pagelist

{

"ContainerName": "AllOffers",

"CustomerID": "Customer1",

"RequestData":{

"PatronID": "Customer1",

"PEPAggregates": [{

"Days": "7",

"Department": "Department101",

"PointBalance": "100.11"

},

{

"Days": "7",

"Department": "Department101",

"PointBalance": "1.0"

},

{

"Days": "7",

"Department": "Department102",

"PointBalance": "100.11"

}]

}

}