Event data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNoUnique identifier for this event object
created_atstring (date-time)NoThe date that this event object was ingested (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoThe specific event name (eg. "Product Purchased")
typeenumNoThe unified structural category of the event Values: TRACK, PAGE, SCREEN, IDENTIFY, GROUP, ALIAS
occurred_atstring (date-time)NoWhen the event actually happened (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
profile_idstringNoThe profile this event is associated with; points to CdpProfile
identifiersCdpIdentifier[]NoThe identifiers that link this event to a profile
identifiers[].typeenumNoThe type of the identifier (eg. EMAIL, USER_ID, ANONYMOUS_ID) Values: EMAIL, USER_ID, ANONYMOUS_ID, DEVICE_ID, PHONE, CRM_ID, LOYALTY_ID, OTHER
identifiers[].valuestringYesThe identifier value that resolves to the profile
identifiers[].is_primarybooleanNoWhether this is the primary identifier for the profile
identifiers[].encodingstringNoThe encoding of the identifier value (eg. raw, sha256)
identifiers[].sourcestringNoThe source that provided this identifier
metadataCdpMetadata[]NoThe event payload/properties
metadata[].idstringNo
metadata[].slugstringNoThe attribute/trait key (eg. lifetime_value)
metadata[].valueobjectNoThe attribute/trait value
metadata[].namespacestringNoThe scope or origin of the attribute (eg. computed, event, visitor)
metadata[].formatenumNoThe data type of the attribute value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT
metadata[].extra_dataobjectNo
sourcestringNoThe source that produced this event
source_idstringNoThe cdp_source this event originated from; points to CdpSource

TypeScript

TypeScript
export type CdpEvent = {
	id?: string; // Unique identifier for this event object
	created_at?: string-time; // The date that this event object was ingested (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // The specific event name (eg. "Product Purchased")
	type?: 'TRACK' | 'PAGE' | 'SCREEN' | 'IDENTIFY' | 'GROUP' | 'ALIAS'; // The unified structural category of the event
	occurred_at?: string-time; // When the event actually happened (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	profile_id?: string; // The profile this event is associated with; points to CdpProfile
	identifiers?: []; // The identifiers that link this event to a profile
	metadata?: []; // The event payload/properties
	source?: string; // The source that produced this event
	source_id?: string; // The cdp_source this event originated from; points to CdpSource
	raw?: any; // The raw data returned by the integration for this event
} 

Zod

Zod
import { z } from 'zod';

export const ZodCdpEvent = z.object({
	id: z.string().optional().describe("Unique identifier for this event object"),
	created_at: z.string-time().optional().describe("The date that this event object was ingested (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("The specific event name (eg. "Product Purchased")"),
	type: z.enum("TRACK", "PAGE", "SCREEN", "IDENTIFY", "GROUP", "ALIAS").optional().describe("The unified structural category of the event"),
	occurred_at: z.string-time().optional().describe("When the event actually happened (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	profile_id: z.string().optional().describe("The profile this event is associated with; points to CdpProfile"),
	identifiers: z.array().optional().describe("The identifiers that link this event to a profile"),
	metadata: z.array().optional().describe("The event payload/properties"),
	source: z.string().optional().describe("The source that produced this event"),
	source_id: z.string().optional().describe("The cdp_source this event originated from; points to CdpSource"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class CdpEventType(str, Enum):
	TRACK = 'TRACK'
	PAGE = 'PAGE'
	SCREEN = 'SCREEN'
	IDENTIFY = 'IDENTIFY'
	GROUP = 'GROUP'
	ALIAS = 'ALIAS'

@dataclasses.dataclass
class CdpEvent:
	"""Unique identifier for this event object"""
	id: Optional[str]
	"""The date that this event object was ingested (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""The specific event name (eg. "Product Purchased")"""
	name: Optional[str]
	"""The unified structural category of the event"""
	type: Optional[CdpEventType]
	"""When the event actually happened (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	occurred_at: Optional[str]
	"""The profile this event is associated with; points to CdpProfile"""
	profile_id: Optional[str]
	"""The identifiers that link this event to a profile"""
	identifiers: Optional[PropertyCdpEventIdentifiers]
	"""The event payload/properties"""
	metadata: Optional[PropertyCdpEventMetadata]
	"""The source that produced this event"""
	source: Optional[str]
	"""The cdp_source this event originated from; points to CdpSource"""
	source_id: Optional[str]
Are we missing anything? Let us know
Was this page helpful?