Event Pipeline Design
Best practices for designing your event pipeline: naming conventions, attribute schemas, contact field strategies, and batching patterns.
Event Naming
Use a consistent {domain}_{action} pattern in snake_case:
Good Names
Avoid
Naming Guidelines
- Domain first --
order_,claim_,payment_,subscription_ - Past tense actions --
_completed,_submitted,_failed,_activated - Specific over generic --
claim_submittednotclaim_updated - Consistent vocabulary -- Pick one word and stick with it (e.g., always
completednot sometimesfinished)
Event names are the contract between your backend and Synapse flows. Treat them like API endpoints -- stable, documented, and versioned if changed.
Attribute Design
Include What Templates Need
Before designing your event attributes, list the email templates that will use the event. Include every field those templates reference.
Attribute Best Practices
| Practice | Example |
|---|---|
| Use snake_case keys | reference_number, not ReferenceNumber |
| Include human-readable values | "worker_name": "John Doe", not just "worker_id": "w_123" |
| Include URLs for CTAs | "claim_status_url": "https://..." |
| Use ISO 8601 for dates | "incident_date": "2026-03-15T14:30:00+08:00" |
| Include currency with amounts | "amount": 149.99, "currency": "USD" |
| Avoid PII you do not need | Do not send SSN, full bank account, etc. |
Nested Attributes
Synapse supports nested objects and arrays:
NLT can access these as:
{the Order ID from the trigger event}{for item in the Items from the trigger event}...{item.Name}...{end for}{the Shipping.Method from the trigger event}
Contact Field Strategies
Strategy 1: Always Send Contact Data (Recommended for New Integrations)
Send contact data with every event. This ensures contacts are always up to date:
Strategy 2: Separate Contact Management
Manage contacts via POST /v1/contacts (upsert) or PATCH /v1/contacts/{external_id} and only send events with external_id:
Strategy 1 is simpler and more resilient -- even if a contact was not pre-created, the event creates it. Strategy 2 gives you more control over when contact data changes and supports tag operators ($add_tags, $remove_tags).
Strategy 3: Contact Data Only on Signup
Send full contact data on the first event (signup_completed) and only external_id on subsequent events:
Batching and Throughput
Single Event Ingestion
For real-time events (user actions, transactions), send events individually:
Batch Import (Historical Events)
For migrating historical data or bulk imports, use the contacts bulk endpoint for contacts and send events in parallel:
Respect rate limits when batching. The default rate limit is 100 requests per minute per API key. Use exponential backoff when you receive 429 responses.