Table of Contents

Understanding the PaidAudiencesContainer REST service

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 - Customer identifier
  • DestinationKey - Destination key of the paid media destination. For multiple destinations, comma separated lists of paid media destination keys are allowed.
  • Refresh - (Optional) This parameter is available starting in Pega Customer Decision Hub 8.5. 

    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:

 { "ResponseData":{ "DKa93e1234":{ "PaidAudiences":[ {"AudienceId":"IPhone[6e43cf87]"},{"AudienceId":"SamsungGalaxy[f7fb59b1]"},{"AudienceId":"MiNote7[d9d172bb]"}], "pxSubscript":" DKa93e1234"}}, "CustomerID":"101" }

The audience data in the responses includes the audience name, followed by the audience ID in brackets. You can use the audience name 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 Marketing, 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.

Suggest Edit

100% found this useful

Have a question? Get answers now.

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