Segment Overview
Commerce API version required: 3.21
This application integrates with Twilio Segment. It tracks events occurring in BoxNCase and sends them to Twilio Segment.
Features
- Send information about order-related events to Segment.
- Events send to Segment have identity set to user ID or email.
Assumptions & limitations
- Currently, only order-related events are supported. Events sent to Segment are in format defined by V2 E-commerce Events Segment specification.
- Order webhooks are asynchronous, meaning events may not be sent to Segment immediately.
- The app uses the
trackAPI. - The app attempts to retrieve user information using the user ID or email. If that fails, it will send an anonymous ID.
- The app has its webhooks initially disabled; configuring the app will activate the webhooks.
Permissions
MANAGE_ORDERS
Application flow
The application subscribes to the following webhooks and sends coresponding event to Segment:
| BoxNCase webhook event | Segment event |
|---|---|
ORDER_CONFIRMED | Order Completed |
ORDER_CANCELLED | Order Cancelled |
ORDER_REFUNDED | Order Refunded |
ORDER_UPDATED | Order Updated |
Each event sent to Segment will have properties defined in Segment E-commerce Event spec:
App will also add channel_id field with BoxNCase channel id for given order.
The integration adds a prefix to the event name. Check the received event field in your Segment source debugger before configuring downstream destinations or filters.
Example of successful handling of ORDER_UPDATED webhook: