Question
What is the sequence of processing stages for an event in the cloud-mode data pipeline?
Product
Twilio Segment
Environment
Segment Console
Answer
- Source Capture: The event is generated by a Segment library (or API) and sent to Segment's tracking API.
- Source Insert Functions: These are applied as soon as the events enter Segment's CDN, before they are officially inserted into the source.
- Protocols (Tracking Plans & Source Transformations): Segment evaluates the incoming data against your connected Tracking Plan to validate the schema and applies any source-scoped transformations.
- Integration Filters: Segment evaluates the
integrationsobject within the event payload and any per-source schema integration filters to determine which destinations should receive the data. - Destination Filters: These are evaluated next to conditionally block specific events or properties from proceeding to the destination.
- Destination-Scoped Transformations: These are applied only after the events have successfully passed through your Destination Filters.
- Mapping Triggers (Actions Destinations): Segment evaluates if the event matches the defined triggers for your Destination Actions; the event must match a trigger to proceed further.
- Destination Insert Functions: If the event matches the mapping trigger, it is passed to your destination insert function for custom enrichment or filtering.
- Destination Functions / Mappings: The event is transformed into the specific format required by the downstream tool's API using your Action mappings or custom Destination Functions.
- Delivery: The final, transformed payload is delivered to the destination's endpoint.
Additional Information
Please note that this pipeline specifically applies to cloud-mode (server-side) destinations. Device-mode destinations send data directly from the user's device to the destination's API, meaning they bypass server-side processing features like Source Insert Functions and cloud-mode Destination Filters.