Create Message

Create a message for your webhook.

Create a New Campaign

Create a campaign to deliver your Webhook. To create a new campaign

  1. From the CleverTap dashboard, select Campaigns.
  2. Click + Campaign.
  3. From the Messaging Channels list, select Webhooks.
28262826

The campaign page displays.

27602760

Define all the sections to publish the campaign.

Start Campaign Setup

The Start here section displays the setup information.

This section has the following parts:

  • Qualification criteria: Deliver the notification based on Past Behavior/Custom List or Live Behavior.
  • Webhook: Select from the available Webhooks. Alternatively, you may create a new webhook.
  • Set a goal: You can track your campaign conversion by setting up a goal. Setting a goal allows you to measure your campaign effectively against what you want to achieve with the campaign. This selection is optional. Define the conversion period by selecting the Conversion Time. You can define your conversion goal further by filtering an event by event properties. For more information on event properties, refer to Events.
919919

Define the Audience

You need to indicate the target audience for your Webhook campaign. You can target your Webhook campaign to a new user segment by clicking on the Target segment section. Here, you can create a new ad-hoc segment or use a previously saved user segment from the segment list.

26722672

You can create the target on the basis of past user behavior and/or user properties, or live (ongoing) user behavior (the latter is useful to send out real-time, triggered Webhook campaigns).

For instance, you can create a live Inaction within time campaign that targets users as soon as they add a product to their cart but do not finish transacting within 10 minutes, the golden window within which most users transact on online platforms

Deliver Action Based Webhook Notifications

You can trigger a Webhook notification based on an action. Users receive Webhook notifications when they perform a certain action. This makes notifications more contextual and increases conversion. The instant Webhook message is not triggered for campaigns with delays or when the app inbox is coupled with a Webhook message.

Filter Webhook Notifications based on Past Behavior

You can also target users basis their past behavior. For past behavior campaigns, you also have an option to calculate estimated reach to view:

  • Number of users that qualify for the campaign criteria.
  • Number of users that are reachable via Webhook.

Filter by User Properties

Using the With user properties filter in the Who section, you can segment your campaign to only reach users who meet specific criteria.

For example, you can send webhook notifications only for female users who live in the United States. The image below represents a sample target segment that is filtered using specific user properties to target the required audience.

22022202

Control Group

You can define the control group to compare and measure the results of your campaign. For more information on control groups, see Control Groups.

677677

Targeting Cap

Sometimes, you want to send a message to only a subset of the qualifying audience (Target Reach) for a campaign or avoid sending it if the number of qualified users exceeds the specified number.

A relevant use case is a limited offer where you want to send a fixed number of coupon codes you want to distribute. If the total reach for your campaign exceeds the number of coupon codes you can distribute, you can limit the number of users who will receive the message to exactly the number of coupons you want to distribute.

📘

Campaign Limit

Ensure that you set up a limit of 100 or more, regardless of the qualified user segment size. If the limit specified is less than 100, an error occurs.

📘

Note

The maximum reach for the target segment may be less than the limit specified in Targeting Cap.

406406

Define the Webhook Content

Now, you can set up the What which is the Webhook campaign content. Click Go To Editor to create your message.

10481048

Response Formats

The following are the two types of response formats sent by CleverTap when creating a webhook campaign:

Broadcast Message:

A message is termed as Broadcast when the following four conditions are met:

  • User selects JSON from the Webhook content format dropdown
  • User selects Profile variables& custom key value pairs as the message body
  • Webhook URL does not include any personalization component
  • Key-value pairs do not include any liquid tags. However, the message still qualifies as a broadcast message if the key-value pairs use @Personalization.

For broadcast messages, the payload includes an array of profile variables. The following is a sample webhook payload containing all possible fields for profile variables. The targetId corresponds to the webhook campaign ID for which you receive the payload.

{
    "targetId": 1472124953,
    "key_values": {
        "PromoCode": "MT50",
        "PowerUser": "true"
    },
    "profiles": [
        {
            "Email": "[email protected]",
            "Identity": "foo",
            "ObjectId": "-g55b74fb1030740e4a4931910a8abb862",
            "ProfileData": {
                "Last Score": 308,
                "High Score": 308,
                "Replayed": true
            },
            "Event_properties": {
                "Score": 1200,
                "Game Mode": "Practice",
                "Rating": 1
            },
            "Push_token": "19403aa5d3bb376769a8101c9cbf22159cb1836117659cc684a71243589982ea"
        },
        {
            "Email": "[email protected]",
            "Identity": "bar",
            "ObjectId": "__g09c9bf3b0d374a259c86f5b855ec9b19",
            "ProfileData": {
                "Last Score": 309,
                "High Score": 309,
                "Replayed": true
            },
            "Event_properties": {
                "Score": 500,
                "Game Mode": "Tournament",
                "Rating": 2
            },
            "Push_token": "fiCjRO_opjw:APA91bH0yzS_eBj1Xx8TcakMzz4yTc3id29A79GOjnaaMtIQLrjztNfzzRz7slqWmNzndECx_hHh7qiL0LZJOkGwzr9Zp_g1mC9B6BVuEbsjrMFoxXX830zMRuvxtU_AhFTC0JPHejZh"
        }
    ]
}

Non-broadcast Message

The messages other than broadcast messages are termed Non-broadcast messages. The following is a sample webhook payload containing all possible fields for profile variables. The targetId corresponds to the webhook campaign ID for which you are receiving the payload.

{
    "targetId": 1472124953,
    "key_values": {
        "PromoCode": "MT50",
        "PowerUser": "true"
    },
    "profiles":
        {
            "Email": "[email protected]",
            "Identity": "foo",
            "ObjectId": "-g55b74fb1030740e4a4931910a8abb862",
            "ProfileData": {
                "Last Score": 308,
                "High Score": 308,
                "Replayed": true
            },
            "Event_properties": {
                "Score": 1200,
                "Game Mode": "Practice",
                "Rating": 1
            },
            "Push_token": "19403aa5d3bb376769a8101c9cbf22159cb1836117659cc684a71243589982ea"
        }

Webhook Editor

From the Webhook Editor:

  1. Add query parameters in the URL key-value pairs section.
  2. Select the content type (JSON or plain text).
  3. Add the webhook content to send or receive the data.
11521152

You can either use Profile Variables & custom key value pairs or Custom Body. You have the option to send/receive an email, identity, objectId (CleverTap ID), profileData (custom profile variables), event properties (applicable only for Live behavior), and push_token for each user.

16501650

You can also choose a custom payload.

16721672

The preview for your payload is displayed on the right side of the pane.

28322832

Define the Campaign Schedule

Each webhook campaign needs to be scheduled for a specific timeline. To define the schedule for your webhook campaign, you need to specify the Start date and time and End date and time. You also have the option to start a campaign immediately by selecting Now.

Besides, you can also define a delay (by seconds, minutes, hours, or days) once a user qualifies for the target segment. Once you define the schedule and click Done; the campaign will be triggered and terminated as per the defined timings.

18861886

Delivery preferences


Checkmark the Do Not Disturb (DND) checkbox to delay or avoid sending messages to users for a specified period of time.

For fine-tuning the campaign, you can also choose to deliver the campaign to users each time they qualify or choose to deliver multiple campaigns at specified intervals (in minutes, hours, or days).

To control the maximum number of messages users receive for a given channel of communication, tick mark the Global campaign limits checkbox

16961696

Publish Campaign

After previewing the appearance of your overall campaign, finalize your campaign by clicking Publish Campaign.

11931193