Skip to main content
Skip table of contents

Campaign event example: Braze

Campaign event: email send

Starting with an example of email send event type (users.messages.email.Send) records that are provided from Braze, we will use those to map to the Campaign Event feed layout. This will be the primary event that all of the other email event types will link to.

There are a few different things you need to consider when mapping source data:

  • Required fields

  • Campaign, creative, and segmentation information

  • Personally identifiable information (PII)

Sample send events

Below are a couple of examples of send events from Braze.

Send Event Example 1:

JSON
{
  "events": [
    {
      "event_type": "users.messages.email.Send",
      "id": "96a9bfb8-e889-4748-ba27-db165be911a1",
      "time": 1697831846,
      "user": {
        "user_id": "6532cf534764af00014d1c66",
        "external_user_id": "11034"
      },
      "properties": {
        "campaign_id": "785b9efb-19c2-4868-b6bf-a09b6262fb57",
        "message_variation_id": "dac0d9d9-3d54-480a-b8d1-03179f85e9a2",
        "dispatch_id": "6532db9ed37634647bf3902b7fbbb1b5",
        "campaign_name": "RPI_Campaign_04",
        "message_variation_name": "Variant 1",
        "email_address": "braze-026c3e+1000@inbox.mailtrap.io",
        "ip_pool": null,
        "message_extras": "{\"chid\":\"82348235\"}"
      }
    }
  ]
}

Send Event Example 2:

JSON
{
  "events": [
    {
      "event_type": "users.messages.email.Send",
      "id": "a53ec45f-7e9e-41ec-9dcd-ffbfb264c610",
      "time": 1697831849,
      "user": {
        "user_id": "6532cf534764af00014d1c8e",
        "external_user_id": "11035"
      },
      "properties": {
        "campaign_id": "785b9efb-19c2-4868-b6bf-a09b6262fb57",
        "message_variation_id": "dac0d9d9-3d54-480a-b8d1-03179f85e9a2",
        "dispatch_id": "6532db9ed37634647bf3902b7fbbb1b5",
        "campaign_name": "RPI_Campaign_04",
        "message_variation_name": "Variant 1",
        "email_address": "braze-026c3e+1001@inbox.mailtrap.io",
        "ip_pool": null,
        "message_extras": "{\"chid\":\"82348235\"}"
      }
    }
  ]
}

Mapping send events to campaign event NonRPI feed layout

Below is a streamlined version of the Campaign Event NonRPI feed layout details (with a reduced number of columns found in the data ingestion details section of the documentation). We will use this table and the sample send events above to outline the mapping of the events to the feed layout. There are two additional columns: one for the Braze source field or static data value, and a second for notes related to the mapping.

The PII fields at the bottom of the feed layout that are in italics indicate the PII target fields that are not provided in the source event examples above.

Streamlined version of the campaign event feed layout:

Business name

Field name

Description

Field data type/length

Braze source

Notes

System of Record Name

sor_name

(Required) Name of the system that is the authoritative data source for a record. 

char(100)

 BRAZE

Static value that should be hard coded when generating the feed layout.

Client Campaign Event Id

client_campaign_event_id

(Required) Uniquely identifies marketing campaign event for this data source (defined in the API config).

char(150)

id

Campaign Event Datetime

campaign_event_datetime

(Required) Run Date: The day and time your advertisement appears in the publication; also known as insertion date:

YYYY-MM-DD HH:mm:ss 

datetime

Time
(needs to be converted from an epoch to a timestamp)

Business Unit Code

business_unit_code

Business Unit identifies the structure of brands within an organizational entity. It is the way in which the brands within a company’s portfolio are related to, and differentiated from, one another. 

Values are defined as part of on-boarding, in BUSINESS_UNIT_LOOKUP; NULL values will default to enterprise. Refer to Business unit for details.

char(50)

 Not Available By Default

Creative Text

creative_text

The content of the creative.

char(1000)

 Not Available

Campaign Code

campaign_code

(Required) Uniquely identifies the marketing campaign; a specific series of strategies, tactics, and activities designed to get desired marketing or other messages to intended target markets.

char(50)

 campaign_id

Campaign Name

campaign_name

Marketing campaign's name.

char(500)

 campaign_name

Campaign Description

campaign_desc

Marketing campaign's description.

char(1000)

 Not Available By Default

Campaign Start Date

campaign_start_date

Date when marketing campaign starts: YYYY-MM-DD.

date

 Not Available By Default

Campaign End Date

campaign_end_date

Date when marketing campaign ends: YYYY-MM-DD.

date

 Not Available By Default

Cell Code

cell_code

Uniquely identifies the cell, which is a 'definable' segment - a mass of people who can be identified and targeted with reasonable effort, cost, and time.

char(50)

 message_variation_id

Cell Name

cell_name

A name of the cell, which is a 'definable' segment - a mass of people who can be identified and targeted with reasonable effort, cost, and time.

char(500)

 message_variation_name

Offer Code

offer_code

Identifies a coupon, discount, etc. developed for use in marketing (direct or other types) that is available to be sent to the parties within one or more campaigns.

char(100)

  Not Available By Default

Offer Code Value

offer_code_value

Coupon's value.

char(500)

 Not Available By Default

Drop Date

drop_date

Marketing drop date:
YYYY-MM-DD.

date

 Not Applicable

Not applicable, as this is used for Direct Mail.

Control Group Indicator

control_group_ind

When y indicates control group record.

  • y = yes

  • n = no

char(1)

 

Control groups are not identified for extract in Braze, so leaving it blank or just setting all record to n is a valid approach.

Channel Code

channel_code

Uniquely identifies a communication channel such as direct mail, email, phone, social media, web, mobile, call center, display media, etc.

Values are defined as part of on-boarding, in CHANNEL_LOOKUP. Refer to Channel for details.

char(50)

 email

Audience Id

audience_id

Audiences can be defined by either email address, Facebook UIDs, phone numbers, names, date of birth, gender, locations, app user IDs, Apple's Advertising Identifier (IDFA), Android's advertising ID or by a combination of rules used to identify users who took specific actions on your website.

char(300)

 email_address or external_id or user_id

You could use one or all of these (concatenating them with underscores), although we expect that user_id and email_address will definitely be populated, although external_id may not be.

Example of the concatenated version:

<user_id>_<email_address>_<external_id>

Source Party Profile Id

source_party_profile_id

Customer id - Uniquely identifies the customer's record in the client's system.   

char(320)

<sor_name> + '_' + <user_id>

We will not populate this field unless we will be ingesting Party profile data from Braze. In that case, we would use whatever was determined to be the source party profile for Braze data in this field. An option would be <sor_name> + '_' + <user_id>

Address 1

address_1

Address Line 1.

char(128)

 

Address 2

address_2

Address Line 2.

char(128)

 

Address 3

address_3

Address Line 3.

char(128)

 

Address 4

address_4

Address Line 4.

char(128)

 

City

city

City Name.

char(64)

 

State Province

state_province

State Code.

char(64)

 

Postal Code 1

postal_code_1

Postal Code.

char(16)

 

Country Code

country_code

Country Code.

char(2)

 

Home Phone Country Code

home_phone_country_code

ISO standard 2 char code Country Code of home phone.  

char(2)

 

Home Phone Number

home_phone_num

Customer's home phone number including area code. 

char(32)

 

Mobile Phone Country Code

mobile_phone_country_code

ISO standard 2 char code Country Code of mobile phone.  

char(2)

 

Mobile Phone Number

mobile_phone_num

Customer's cell phone number including area code. 

char(32)

 

Work Phone Country Code

work_phone_country_code

ISO standard 2 char code Country Code of work phone. 

char(2)

 

Work Phone Number

work_phone_num

Customer's work  phone number including area code. 

char(32)

 

Other Phone Country Code

other_phone_country_code

ISO standard 2 char code Country Code of other phone . 

char(2)

 

Other Phone Number

other_phone_num

Customer's other phone number including area code. 

char(32)

 

Other Phone Type Code

other_phone_type_code

The type of the phone such as billing, shipping, home, work, primary, mobile, other as defined in the reference data worksheet.

Values are defined as part of on-boarding, in PHONE_TYPE. Refer to Phone type for details.

char(50)

 

Email Address

email_address

Customer's email address.

char(320)

email_address

JavaScript errors detected

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

If this problem persists, please contact our support.