Twilio Segment
Saleor version required: 3.14Repository: GitHub
This app integrates Twilio Segment with Saleor. The app will send events to Segment as a source.
Features
- Send order-related events to Segment
- Send custom event names matching built-in Saleor events
Assumptions & limitations
- The app requires a write key to work.
- The app is not validating if the write key is correct due to missing API on the Segment side. If the write key is incorrect, the app will not inform you about it.
Permissions
The app requires MANAGE_ORDERS
permission to listen to order events.
To save app configuration, staff users must have MANAGE_APPS
permission.
Application flow
The app uses the following events and maps them to Segment tracking events:
Saleor Event | Segment event type |
---|---|
ORDER_CREATED | "Saleor Order Created" |
ORDER_FULLY_PAID | "Saleor Order Completed" |
ORDER_REFUNDED | "Saleor Order Refunded" |
ORDER_UPDATED | "Saleor Order Updated" |
ORDER_CANCELLED | "Saleor Order Cancelled" |
The event will contain properties mapped from the following GraphQL fragment:
fragment OrderBase on Order {
id
user {
id
email
}
channel {
id
slug
name
}
userEmail
shippingMethodName
total {
gross {
amount
currency
}
net {
currency
amount
}
}
lines {
id
productVariantId
productSku
variantName
}
number
}
Expand ▼
Prerequisites
- Create a Segment account
- Create a new connection source and set it to
Node.js
. - Name the source, e.g., "Saleor Orders."
- Copy visible Write Key and paste it into the app configuration.
Configuration
The app requires configuring only one field - a Segment Write Key.
Testing
The easiest way to test if the app is configured correctly is to perform the following steps:
- Configure the app with a valid Segment Write Key generated with a connection source.
- Create a test order in Saleor.
- Open Segment -> Connections -> Sources -> Your source -> Debugger.
- Check if the order event is visible in the debugger.
Troubleshooting
Events are not showing in Segment Debugger
Ensure the Segment write key is correct.