Skip to main content


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

Capturing responses to actions triggered by a real-time container

Updated on August 4, 2022

CaptureResponse is a REST service that supports the POST HTTP method. This service allows callers to capture responses to actions triggered via Real-Time Containers.

Pega Customer Decision Hub

The URL pattern for this service is:

http://<host>:<port>/prweb/PRRestService/PegaMKTContainer/V3/CaptureResponse

This service can also be used to initiate the first action in its request. To utilize this feature and include action initiation, use the following URL pattern:

http://<host>:<port>/prweb/PRRestService/PegaMKTContainer/V3/CaptureResponse/Initiate
Caution: When using a multilevel Context Dictionary with actions associated to the top level context which is not the primary context, the initiation of the action will NOT load the full data context when that action expires or when a response is received. Because of that, action flows and treatments that are part of the Wait expiration or Response received paths cannot access primary context entities other than the subject of the action. If the action was communicated to the primary contact on behalf of another entity, there will be an error because the QualifiedEntity page cannot be loaded.

Swagger document

To help you configure the service, you can refer to the following Swagger document: Swagger document for Container and Capture Response v3.

POST Service Request

For the POST request, the service expects a JSON Object with the following attributes:

NameRequiredDescription
SubjectIDOptionalCustomer identifier. Set here if the same for all responses, or in RankedResults below.
ContextNameOptionalSingular user-friendly name of the context entity (for example, Customer, Account). Set here if the same for all responses, or in RankedResults below.
ContainerNameName of the Container to trigger.
RankedResultsOptionalList of actions for which you want to capture a response. Results from the Container service can be mapped into this array.

RankedResults attributes:

NameRequiredDescription
SubjectIDCustomer identifier for the context entity
ContextNameSingular user-friendly name of the context entity (for example, Customer, Account).
NameName of the action.
IssueIssue to which the action belongs.
Group Group to which the action belongs.
InteractionID

The identifier of the original decision that resulted in the actions being selected for the customer.

All actions yielded for the customer in the same decision share the same InteractionID. The CaptureResponse API requires the InteractionID from the Container response in order to match the response to the original decision result, so that the adaptive models learn from the interaction. If the response is matched to the correct decision result, the merged response, with all SR properties, is captured in Interaction History. If the InteractionID isn't matched, the response is still captured in Interaction History but no adaptive model learning will take place.

RankAction rank based on Strategy configuration.
DirectionDirection in which the interaction was initiated, Inbound or Outbound.
ChannelChannel the interaction occurred on.
OutcomeThe customer disposition of the action.
JourneyOptionalName of the associated customer journey.
JourneyStage OptionalName of the associated customer journey stage.
JourneyStepOptionalName of the associated customer journey step.
Category OptionalCategory to which the action belongs.
CustomerCost OptionalCost of this product or service to the customer.
LabelOptionalBusiness friendly description of the action.
BenefitsOptionalBenefits to the customer.
WhyRelevantOptionalWhy this action is relevant for the customer.
ShortDescriptionOptionalShort description of the action.
PaidAudienceNameOptionalName of the paid audience.
IdentifierOptionalUnique identifier for the action.
PricingOptionalDescription of the pricing.
EligibilityDescriptionOptionalCriteria for customers to be eligible for this action.
PropensityOptionalAction propensity value.
AgentCompensationOptionalAgent compensation amount if customer accepts action.
ClassIdentifierOptionalInternal class for the action results.
PriorityOptionalAction priority based on Strategy configuration.
BundleNameOptionalName of the action bundle.
ImageURLOptionalURL to the associated action image.
BundleParentOptional Indicates if this action is a bundle parent.
VariantOptionalVariation of the action (for example, 64gb, 128gb, 256gb).
TreatmentOptionalThe name of the action treatment.
InternalCostOptionalThe internal company cost of the action.
CampaignID OptionalWork ID of the active Campaign associated with this Container.
OfferValueOptionalThe value the customer receives from this action.
ClickThroughURLOptional

URL to invoke the CaptureWebClickThrough API.

The encrypted parameter in this URL contains the actual click-through URL specified as part of the action’s details. Typically, this leads to a link or file that provides more details about the action.

A sample invocation request is shown below:

{"SubjectID":"","ContextName":"","ContainerName":"TopOffers","RankedResults": [{"SubjectID":"Customer-100","ContextName":"Subscriber","Name": "PlatinumCardOffers","Issue": "Sales","Group": "CreditCards","Rank": 1,"CampaignID": "NBA","InteractionID": "-563481321460449721","Outcome": "Accepted","Channel": "Web","Direction": "Inbound","Journey":"","JourneyStage":"","JourneyStep":""}]}

Service Response

For the response, the service returns a JSON object with the following attributes:

NameDescription
StatusOK for successful result, Error otherwise.
MessageConfirmation message when successful, error message in case of an error.

A sample service response is shown below:

{"Status": "OK","Message": "Response captured successfully"}
  • Previous topic Making custom Strategy Result properties available for real-time container data flows
  • Next topic Accessing a customer's interaction history with the CustomerOfferHistory REST service

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