Capturing responses to actions triggered by a real-time container
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
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 |
ContextName | ✓ | 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"
}
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