Skip to main content
Skip table of contents

Response event sample: click

Below you will find the details about creating a response event record from a Click event.

Click event

Below is the click event we will use in this sample. The id field in this event will be associated to the client_response_event_id, and we will get the client_campaign_event_id from the send event record, which is covered below.

The following fields come in the Open Event record, but are not being passed into the CDP for this example. These fields can be added to the Response Event Extension if you want to capture this data.

  • esp

  • from_domain

  • user_agent

  • link_alias

  • link_id

Click event JSON

CODE
{
  "events": [
    {
      "event_type": "users.messages.email.Click",
      "id": "08684697-8857-4d51-8a4a-daed11963fe0",
      "time": 1700515693,
      "user": {
        "user_id": "6532cf534764af00014d1c66",
        "external_user_id": "11034"
      },
      "properties": {
        "campaign_id": "f7428cc5-2fc6-424c-9a2c-61e91a30d0ac",
        "message_variation_id": "6cda6825-879c-469c-87a0-50cdf6a31d6d",
        "dispatch_id": "655bcea34c4185eadd8ab7b07dbc5a9e",
        "campaign_name": "RP_CAMPAIGN_20231120_SEND01",
        "message_variation_name": "Variant 2",
        "email_address": "braze-026c3e+1002@inbox.mailtrap.io",
        "url": "http://www.redpointglobal.com",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
        "ip_pool": "partner_us03_ip_pool",
        "esp": "SparkPost",
        "from_domain": "e.partnerus03.us.abmarketing01.com",
        "is_amp": null,
        "link_id": null,
        "link_alias": null
      }
    }
  ]
}

Send event

As we have mentioned in the previous page, we will need an associated Send Event to tie the response event back to. We need the following three fields to link the response record to the event record and assign the client_campaign_event_id.

Required fields:

  • id (client campaign event id)

  • campaign_id (Campaign Code)

  • email_address

Campaign_id and email_address will be used to join the response record to the campaign record and the id (client_campaign_event_id) will be associated to the record.

CODE
{
  "events": [
    {
      "event_type": "users.messages.email.Send",
      "id": "80500abb-b102-4334-94f5-5e9587b69423",
      "time": 1700515504,
      "user": {
        "user_id": "6532cf544764af00014d1c96",
        "external_user_id": "11036"
      },
      "properties": {
        "campaign_id": "f7428cc5-2fc6-424c-9a2c-61e91a30d0ac",
        "message_variation_id": "6cda6825-879c-469c-87a0-50cdf6a31d6d",
        "dispatch_id": "655bcea34c4185eadd8ab7b07dbc5a9e",
        "campaign_name": "RP_CAMPAIGN_20231120_SEND01",
        "message_variation_name": "Variant 2",
        "email_address": "braze-026c3e+1002@inbox.mailtrap.io",
        "ip_pool": "partner_us03_ip_pool",
        "message_extras": null
      }
    }
  ]
}

Sample CSV Record

This is the converted record that can be found in the attached CSV file.

Redpoint CDP data ingestion does not require that all fields are populated for a given field layout. In this sample, only the fields that are populated based on the JSON input are represented in the CSV file.

Attached file name: Braze_Response_Event_Clicked_Converted.csv

sor_name

client_campaign_event_id

client_response_event_id

response_event_datetime

channel_code

event_disposition_code

destination_url_address

Braze Sample

80500abb-b102-4334-94f5-5e9587b69423

08684697-8857-4d51-8a4a-daed11963fe0

11/20/2023 21:28

email

clicked

http://www.redpointglobal.com

Attached file:

Braze_Response_Event_Clicked_Converted.csv

RPDM project to convert JSON to CSV

This is the Redpoint Data Management (RPDM) project used to convert the Braze JSON to the Response Event Feed Layout CSV file.

Sample_Clicked_Event_Source_To_FL_Conversion.dlp

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.