This article describes how to configure an advanced webhook to send custom request actions using template variables for Pega API.

In this article:

Prerequisites

How it Works

The Pega outgoing webhook enables integrations with Pega's Customer Decision Hub, Next-Best-Actions designer, and Customer Profile designer. Using Tealium and Pega together can help you comply with security regulations, leverage real-time data collection to be more responsive, and identify and target individual customers with Next-Best-experience messages. Integrating with Pega allows Tealium data to trigger custom customer interactions, such as a newsletter promotion or promotional code offering through Pega, helping personalize the customer’s journey. To get started, submit an HTTP request to send first-party personalized data to Pega.

Vendor Requirements

Request URL

You can create a custom request URL in Pega using Pega's Designer Studio. Your request URL is based on your specific Pega implementation and the service packages in your Pega account. When you create your request URL, you will need to include specific path parameters. To set up your REST service, including specifying the variables and path parameters for your custom URL, see Creating a Service REST rule in the Pega documentation. After creating your Service REST rule, complete your REST rule configuration by configuring the resources and processing details for your rule.

For more information about all of Pega's APIs, API best practices, and information about creating REST integrations, see Pega APIs and services in the Pega documentation.

Method Field

For more information about available methods to use in your service REST rule, see Service REST methods in the Pega documentation.

Webhook Example

The request body is a JSON message with a customizable body template. Pega accepts either nested or flat JSON. The structure of the JSON request will depend on your Pega implementation and data points specified in the Designer Studio.

For more information about configuring a webhook connector, see the Webhook Template Variables Guide.

In this example, the webhook sends a PageView request with parameters to identify the user.

  • Method: POST
  • URL: https://<host>:<port>/prweb/PRRestService/<servicepackage>/<serviceclass>/<servicemethod>
  • Body Content Type: application/json
  • Body Data: Map {{data}} To Body
  • Template Variables:
    • Map "PageView" To Intent
    • Map customer_id to ID
    • Map tealium_firstparty_visitor_id To Cookieidvalue
    • Map Last event timestamp To time
  • Templates:
    • Name: data
    • Template:
      {
        "Cookieidvalue": "{{Cookieidvalue}}",
        "ID": "{{ID}}",
        "Intent": "{{Intent}}",
        "Lastviewedproduct": "{{time}}"
      }

 

 

Public