Skip to content

Event object

This article explains the different components of an event object, how you can use this object, and examples to draw from.

What is an event object?

An event object is an object that gets passed through the API when a specific event occurs. Events objects are housed in an events array. Each event object in the events array represents a single occurrence of a custom event by a particular user at the designated time value. The event object has many different fields that allow you to customize by setting and using event properties in messages, data collection, and personalization.

For steps on how to set up custom events for a specific platform, refer to the Platform Integration Guide in the Developer Guide. Refer to the relevant article based on your platform:

Object body

Update existing profiles only

To update only existing user profiles in Braze, you should pass the _update_existing_only key with a value of true within the body of your request. If this value is omitted, Braze will create a new user profile if the external_id does not already exist.

Event properties object

Custom events and purchases may have event properties. The “properties” values should be an object where the keys are the property names and the values are the property values. Property names must be non-empty strings less than or equal to 255 characters, with no leading dollar signs ($).

Property values can be any of the following data types:

Data Type Description
Numbers As either integers or floats
Booleans true or false
Datetimes Must be formatted as strings in the ISO 8601 format or in any of the following formats:
- yyyy-MM-ddTHH:mm:ss:SSSZ
- yyyy-MM-ddTHH:mm:ss
- yyyy-MM-dd HH:mm:ss
- yyyy-MM-dd
- MM/dd/yyyy
- ddd MM dd HH:mm:ss.TZD YYYY

Not supported within arrays.

Note that “T” is a time designator, not a placeholder, and should not be changed or removed.

Time attributes without a time zone will default to midnight UTC (and will be formatted on the dashboard as the equivalent of midnight UTC in the company’s time zone).

Events with timestamps in the future will default to the current time.
Strings 255 characters or fewer.
Arrays Arrays cannot include datetimes.
Objects Objects will be ingested as strings.

Event property objects that contain array or object values can have an event property payload of up to 100 KB.

Event property persistence

Event properties are designed for filtering of, and Liquid personalization in, messages triggered by their parent events. By default, they are not persisted on the Braze user profile. To use event property values in segmentation, refer to custom events, which details the various approaches to storing event property values long-term.

Event example request

Event objects

Using the example provided, we can see that someone watched a trailer recently, and then rented a movie. While we cannot go into a campaign and segment the users based on these properties, we can use these properties strategically by using them in the form of a receipt, to send a custom message through a channel using Liquid. For example, “Hello Beth, Thanks for renting The Sad Egg by Dan Alexander, here are some recommended movies based on your rental…”

HOW HELPFUL WAS THIS PAGE?
New Stuff!