Table of Contents

Triggering a real-time container with the Container service

Call the Container REST service to trigger a real-time container. You can create the service request using the POST and GET methods.

Service URL

http://<host>:<port>/prweb/PRRestService/PegaMKTContainer/V2/Container

Request parameters

POST service request

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

  • CustomerID - Optional parameter. For the Web and Mobile channel, this parameter is used to identify individuals based on information captured during their interactions with the destination. For individuals yet to be identified, a unique id is stored in a browser cookie. Once an individual has been identified as a customer, their encrypted customer id is stored. For more information, see "Identity Matching" in the Pega Marketing User Guide on the Pega Marketing product page.
  • ContainerName - The name of the real-time container which the request must trigger.
  • Channel - Optional parameter. The channel where the container must be rendered, for example, Web.
  • Direction - Optional parameter. The direction of the communication, for example, Inbound.
  • Contexts - Optional parameter. Additional data such as customer mood, customer intent, or current web page. For more information, see "Accessing context in strategies" in the Pega Marketing User Guide on the Pega Marketing product page.
    • Key - Identifier for context info, for example, IntentName.
    • Type - Type of context data, for example, Intent.
    • Value - Value for the specified key, for example, Mortgage.
  • Resource - Type of data included in the response:
    • Offers – The default option, returns a list of actions
    • AllResults - Returns a list of actions and Next-Best-Actions
    • Actions - Returns a list of Next-Best-Actions

GET service request

For the GET request, the service expects a JSON object with the following attributes:

  • CustomerID - Optional parameter. For the Web and Mobile channel, this parameter is used to identify individuals based on information captured during their interactions with the destination. For individuals yet to be identified, a unique id is stored in a browser cookie. Once an individual has been identified as a customer, their encrypted customer id is stored. For more information, see "Identity Matching" in the Pega Marketing User Guide on the Pega Marketing product page.
  • ContainerName - The name of the real-time container which the request must trigger.
  • Channel - Optional parameter. The channel where the container must be rendered, for example, Web.
  • Direction - Optional parameter. The direction of the communication, for example, Inbound.
  • ContextKey - Optional parameter. Additional data such as customer mood, customer intent, or current web page. For more information, see "Accessing context in strategies" in the Pega Marketing User Guide on the Pega Marketing product page.
  • ContextValue - Value of the ContextKey parameter.

Sample request

POST service request

{

"ContainerName": "NextBestAction",

"Channel": "CallCenter",

"Resource": "AllResults",

"CustomerID": "CONT -1",

"Direction": "Inbound",

"Contexts": [{

"Type": "Intent",

"Value": "Refi mortgage"

"Key": "IntentName"

},{

"Type": "Intent",

"Type": "Moderate",

"Key": "CallVolumeIndicator"

}]

}

GET service URL

http://<HOST>:<PORT>/prweb/PRRestService/PegaMKTContainer/V2/Container?CustomerID=1&ContainerName=AcquisitionSD&Channel=Web&Direction=Inbound&ContextKey=intent&ContextValue=closeaccount

Service response

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

  • Status - The status of the request, for example, OK or ERROR.
  • Message - If the request failed, this parameter provides the description of the error.
  • ContainerList - The Container service can request multiple containers in a single request. This is an array of the called containers and results.
    • Status - The status of the request, for example, OK or ERROR.
    • ContainerName - Name of the container
    • RankedResults - An array containing one or more actions returned by the strategy execution. Each action in this array has the following attributes:
      • Name - Name of the action
      • Issue - Issue to which the action belongs
      • Group - Group to which the action belongs
      • InteractionID - Interaction History record identifier for this action. This is the same for all actions in the list since they are all part of the same strategy execution.
      • Category - Category to which the action belongs
      • CustomerCost - Cost of this product or service to the customer
      • Label - Business-friendly description of the action
      • Benefits - Benefits to the customer
      • WhyRelevant - Why this action is relevant for the customer
      • Direction - Direction in which the interaction was initiated, for example, Inbound.
      • ShortDescription - Short description of the action
      • PaidAudienceName - Name of the paid audience
      • Identifier - Unique identifier for the action
      • Pricing – Description of the pricing
      • Journey – Name of the associated customer journey
      • JourneyStage – Name of the associated customer journey stage
      • JourneyStep – Name of the associated customer journey step
      • EligibilityDescription – Criteria for customers to be eligible for this action
      • Propensity - Action propensity value
      • AgentCompensation – Agent compensation amount if customer accepts action
      • ClassIdentifier – Internal class for the action results
      • Priority - Action priority based on strategy configuration
      • Channel – Channel the interaction occurred on
      • BundleName – Name of the action bundle
      • ImageURL – URL to the associated action image
      • Rank - Action rank based on Strategy configuration
      • BundleParent – Indicates if this action is a bundle parent
      • Variant – Variation of the action (for example, Rewards, RewardsPlus, PremierRewards)
      • Treatment – The name of the action treatment
      • InternalCost – The internal company cost of the action
      • CampaignID - Work ID of the active Campaign associated with this Container
      • OfferValue – The value the customer receives from this action
      • ClickThroughURL – URL to invoke the CaptureWebClickThrough API. The encrypted parameter in this URL contains the actual click-through URL specified as part of the action details. Typically, this leads to a link or file that provides more details about the action.
      • DecisionTime - The time of the decision

Sample response

{ "Status": "OK",
"ContainerList": [{
"Status": "OK",
"ContainerName": "TopOffers",
"RankedResults": [{
"Group": "Mortgage",
"Issue": "Sales",
"Propensity": 0.5,
"InteractionID": "3944968229930172786",
"Category": "",
"CustomerCost": 0,
"Label": "30 Year Mortgage No Costs",
"Benefits": "Fixed rates are fixed until a specific end date. At the end of the fixed term, your mortgage interest rate reverts to the Variable Rate/Buy-to-Let Variable Rate. Call (800) 867-5309",
"WhyRelevant": "www.uplusbank.com/mortgage-offer",
"Direction": "Inbound",
"Name": "YearMortgageNoClosingCosts","ShortDescription": "U+ Bank Mortgages",
"PaidAudienceName": "",
"Identifier": "/Sales/Mortgage/YearMortgageNoClosingCosts",
"Pricing": "",
"Journey": "",
"JourneyStage": "",
"JourneyStep": "",
"ServiceCaseID": "",
"EligibilityDescription": "Purchase of a single-family,
primary residence, a credit score of 740,",
"Propensity": 0.76,
"AgentCompensation": 50,
"ClassIdentifier": "Offer",
"Priority": 0.76,
"Channel": "CallCenter",
"BundleName": "",
"ImageURL": "/u/bank/ad-imgs/30yrNo.png",
"Rank": 1,
"BundleParent": "false",
"Variant": "",
"Treatment": "",
"InternalCost": 0,
"CampaignID": "NBA",
"OfferValue": 0,
"ClickThroughURL": "http://myhost:myport/prweb/PRHTTPService/PegaMKTContainer/Services/CaptureClickThrough?Px=%09%7Bpr%7Dl1q%2FRWFI8c9EdhfxuvoNBOTDBNM0TCxZanC0vKI9bbQgRGRniKxg0i2nyDEWgNu1o5dyYZ3t69JE%0AaRZFiSVjQVyZdadsJOvdtrGVEk1AkVMa8FlEIm3ft0u9k7uFaSq2%2FpfyGaQEgifGUXCWmDpbgeqB%0AiOoAEVWWf1OjMaiQBlVo0KxAR4HiuWDsFG%2BOgg7FUCOyH6snxHXFVem0eV%2BrkOSvqcVybm
%2BvLr%2Ff%0ASVboogQ3M4Ui5QmuN2pOiyQ9Z8GEr5qVxMKZsFEJwqdVpsb35zerllqTbl%2FTAEhC8HAp1KRgGFPS%0AFfhyg48tUQ0ivQRsLmuHnM7XyRSgw0WaHMiSZGSaipR9dKQC3QMm0cyImjf%2BnDmYPMEAPC97EuDh%0Aessaj8kbPDuyqIakHl7nzGZm%2FQ%3D%3D",
"DecisionTime": "20180112T160708.764 GMT"
}]
}]

Response codes

  • 200 - Successful invocation
  • 400 - Bad request
  • 500 - Internal error
Suggest Edit

Have a question? Get answers now.

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