Prerequisites
Before you can trigger journeys with custom entities, you need to:- Create a journey in Hellomateo with a Custom Entity trigger node
- Set the trigger’s
event_typetocustom_entity_createdorcustom_entity_changed - Set the
custom_entity_definition_idon the trigger node to scope it to a specific entity type - Publish the journey and set it to active
Create a Custom Entity Definition
A custom entity definition describes the shape of your data. Create one via the API:key is a unique, human-readable identifier for the definition. The schema field accepts a JSON Schema that validates entity data on write.
Create a Custom Entity
Creating a custom entity triggers any journey with acustom_entity_created trigger scoped to the matching definition:
| Field | Type | Required | Description |
|---|---|---|---|
custom_entity_definition_key | string | Yes* | Key of the definition. Alternative to custom_entity_definition_id |
custom_entity_definition_id | UUID | Yes* | ID of the definition. Alternative to custom_entity_definition_key |
contact_id | UUID | Yes | The contact this entity belongs to |
external_id | string | No | Your external system’s ID for this entity (enables upsert behavior) |
data | object | Yes | The entity payload, validated against the definition’s schema |
custom_entity_definition_key or custom_entity_definition_id.
Update a Custom Entity
Updating a custom entity’sdata field triggers any journey with a custom_entity_changed trigger scoped to the matching definition. The journey is only triggered when the data field actually changes:
Discovering Custom Entity Journeys
You can query the API to find journeys that have custom entity triggers:custom_entity_definition_id so you know which entity types they respond to.
Examples
Voucher Campaigns
Sync voucher codes from your marketing platform. Usecustom_entity_created to send the voucher to the contact, and custom_entity_changed to trigger a follow-up when the voucher is redeemed.
ERP Sync
Sync contract or invoice data from your ERP. Trigger a journey when a new contract is created to kick off an onboarding flow.Form Submissions
Store structured form submission data as custom entities. Usecustom_entity_created to trigger a follow-up journey that sends a confirmation and assigns the contact to a sales rep.
Best Practices
- Use
external_idfor idempotency: Setexternal_idto your system’s unique identifier (e.g. voucher code) so you can update entities by filtering on it - Prefer
custom_entity_definition_keyover UUID: Keys are human-readable and stable across environments - Keep schemas simple: Only include fields you need in the journey. Complex nested schemas are supported but harder to work with in the expression editor
- One definition per domain object: Create separate definitions for orders, tickets, subscriptions, etc. rather than a generic one
- Test with
custom_entity_createdfirst: It’s easier to verify since it fires on every insert, whilecustom_entity_changedonly fires whendataactually changes