Skip to main content
LinkedIn
Copied!

Table of Contents

Capturing responses to actions triggered by a real-time container

Version:

Only available versions of this content are shown in the dropdown

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.

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
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:

Name Required Description
SubjectID Optional Customer identifier. Set here if the same for all responses, or in RankedResults below.
ContextName Optional Singular user-friendly name of the context entity (for example, Customer, Account). Set here if the same for all responses, or in RankedResults below.
ContainerName Name of the Container to trigger.
RankedResults Optional List of actions for which you want to capture a response. Results from the Container service can be mapped into this array.

RankedResults attributes:

Name Required Description
SubjectID Customer identifier for the context entity
Context Singular user-friendly name of the context entity (for example, Customer, Account).
Name Name of the action.
Issue Issue 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.

Rank Action rank based on Strategy configuration.
Direction Direction in which the interaction was initiated, Inbound or Outbound.
Channel Channel the interaction occurred on.
Outcome The customer disposition of the action.
Journey Optional Name of the associated customer journey.
JourneyStage Optional Name of the associated customer journey stage.
JourneyStep Optional Name of the associated customer journey step.
Category Optional Category to which the action belongs.
CustomerCost Optional Cost of this product or service to the customer.
Label Optional Business friendly description of the action.
Benefits Optional Benefits to the customer.
WhyRelevant Optional Why this action is relevant for the customer.
ShortDescription Optional Short description of the action.
PaidAudienceName Optional Name of the paid audience.
Identifier Optional Unique identifier for the action.
Pricing Optional Description of the pricing.
EligibilityDescription Optional Criteria for customers to be eligible for this action.
Propensity Optional Action propensity value.
AgentCompensation Optional Agent compensation amount if customer accepts action.
ClassIdentifier Optional Internal class for the action results.
Priority Optional Action priority based on Strategy configuration.
BundleName Optional Name of the action bundle.
ImageURL Optional URL to the associated action image.
BundleParent Optional Indicates if this action is a bundle parent.
Variant Optional Variation of the action (for example, 64gb, 128gb, 256gb).
Treatment Optional The name of the action treatment.
InternalCost Optional The internal company cost of the action.
CampaignID Optional Work ID of the active Campaign associated with this Container.
OfferValue Optional The value the customer receives from this action.
ClickThroughURL Optional

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:

Name Description
Status OK for successful result, Error otherwise.
Message Confirmation message when successful, error message in case of an error.

A sample service response is shown below:

  • {
  • "Status": "OK",
  • "Message": "Response captured successfully"
  • }
Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us