Understanding the PaidAudiencesContainer REST service
Paid Media Manager allows you to include the power of Next-Best-Action decisioning into the pixel calls. You can extend the pixel call with a call to the PaidAudiencesContainer web service to determine ad targeting based on the enterprise decisioning and intelligence embedded in Next-Best-Action.
PaidAudiencesContainer is a REST service that allows callers to retrieve the list of paid media audiences for a customer in one or more paid media destinations.
The service supports the GET HTTP method.
The URL pattern for this service is:
http://<host>:<port>/prweb/PRRestService/PegaMKTContainer/V1/PaidAudiencesContainer
For the GET request, the service expects a JSON Object with the following attributes:
- CustomerID
- 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 management for the Container REST service.
- DestinationKey
- Destination key of the paid media destination. For multiple destinations, comma-separated lists of paid media destination keys are allowed. To check the destination key for a specific destination, in App Studio, click . Take note of the value in the Destination key column.
- Refresh
- If set to true, this parameter triggers the Next-Best-Action strategy at the top level for the customer. The results of the strategy execution are sent back to the caller. This process also takes into account any paid strategy that is configured at the top-level Paid Media configuration in the Channels tab of Next-Best-Action Designer. The response will contain all the base audiences returned by the Next-Best-Action strategy and paid strategy (if configured).
- If set to false, or not included in the request, the response will contain all the audiences in the paid media master records which include base audiences, negative audiences, lookalike audiences, device-based audiences, and all customer next-best-action audiences.
Sample invocation request and response
Request:{
"CustomerID":"101",
"DestinationKey:"DKa93e1234"
}
Response:{
"Status":"OK",
"CustomerID":"101",
"AudienceData":{
"DKa93e1234":{
"PaidAudiences":[
{
"AudienceId":"6e43cf87"
},
{
"AudienceId":"f7fb59b1"
},
{
"AudienceId":"d9d172bb"
}
],
"pxSubscript":" DKa93e1234"
}
}
}
The AudienceId in the responses is generated by Paid Media Manager and associated with an audience generated in the paid destination. You can see the audience ID for each audience in the AUDIENCE KEY field on the Paid Media Audiences landing page.
You can use the audience ID to fire Facebook Ads pixels or Google Ads events for each audience. Because the audience name is the same as the name of a corresponding action in Pega Customer Decision Hub, you may want to avoid exposing the name at the client-side. Because of that, you can use the audience ID instead of the audience name in a browser cookie to keep track of pixels and events which have already been fired for a particular individual. In the network, while creating audiences out of the pixel, get the relevant audience name for the audience ID from the Paid Media landing page and use the same.
Previous topic Configuring web-based and DMP connections to paid destinations Next topic Enabling Next-Best-Action targeting on DMP-based destinations