Skip to main content

Segment Overview

Saleor version required: 3.20Repository: GitHub

This application integrates with Twilio Segment. It tracks events occurring in Saleor 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 track API.
  • 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:

Saleor webhook eventSegment event
ORDER_CONFIRMEDOrder Completed
ORDER_CANCELLEDOrder Cancelled
ORDER_REFUNDEDOrder Refunded
ORDER_UPDATEDOrder Updated

Each event sent to Segment will have properties defined in Segment E-commerce Event spec:

App will also add channel_id field with Saleor channel id for given order.

Events sent to Segment will have Saleor suffix set in event field e.g Order Completed will be tracked as Saleor Order Completed.

Example of successful handling of ORDER_UPDATED webhook: