Defines the structure of an event type in the system. This schema determines how events are interpreted, validated, and stored.
Root structure:
The schema is an object with a mandatory property fields.
fields is an object where each key represents the name of an event field.
Field definition:
Each field object defines:
type: the data type of the field. Allowed values: "string", "numeric", "boolean", "datetime".
required: a boolean indicating whether the field is mandatory in the event payload.
No additional properties are allowed within each field definition.
At least one field must be defined.
Important notes:
Any update to this schema will overwrite the existing definition in the database.
Changes may affect event processing, calculations, and integrations.
After modifying the schema, verify that all fields in your field definitions
referencing this event type (sourceEventField) still exist and are compatible
with their corresponding sourceEventType.
Carefully review and test changes before applying them in production.
Example:
{
"fields": {
"email": {
"type": "string",
"required": true
},
"age": {
"type": "numeric",
"required": false
},
"signupDate": {
"type": "datetime",
"required": true
}
}
}