A Custom Integration sends order data to Privy. To display on-site campaigns (popups, bars, flyouts) and track visitor behavior, also install your Privy code on your site — see Manual install.
Features of the integration
- Send orders to Privy: report placed orders to Privy with the
POST /v1/orders/placedendpoint. Each call is an idempotent upsert keyed on yourorder_id, so re-sending the same order updates it. - Trigger automated flows: a new order can start an Order Placed flow, and marking an order delivered can start an Order Received flow (see Flows below).
- Segment by order activity: orders update each contact’s order history so you can build segments from it (see Segments below).
- Attribute orders to a store: every Custom Integration has its own integration token, so orders are tied to the store they came from.
Setting up the integration
Add a Custom Integration
In Privy, go to Settings → Integrations Hub and add a Custom Integration. Enter a Store Name and Store URL, then connect. Privy generates an integration token for the store — copy it when it’s shown. You can return to the integration later and use Reveal to retrieve it again.
Create an API access token
Go to Settings → API and create an access token with the Write orders (
orders_write) scope. You’ll send this as your API bearer token.Send your orders
From your platform, call
POST /v1/orders/placed with your access token as Authorization: Bearer <token> and your store’s integration token as the optional X-Privy-Integration-Token header. See the Order placed API reference for the full request and field list.Segments currently available
Privy tracks order activity for each contact created or updated from your Custom Integration orders, so you can segment by:- Number of orders — e.g. first-time vs. returning customers.
- First and most recent order date — e.g. win-back segments for customers who haven’t ordered recently.
Coming in future releases: lifetime spend (total spent) and product/collection-based segments aren’t available for Custom Integrations yet. We’ll continue adding to this list.
Flows currently available
You can start a flow from either of these order triggers:- Order Placed — starts when you send a new order to Privy. Supported trigger conditions: Order Value, Order Count, Purchased Product, and Purchased Variant.
- Order Received — starts when an order is marked delivered (via the order’s shipment status on the Orders API).
line_items — the same IDs you own in your own system.
Coming in future releases: the Purchased from Collection condition isn’t available for Custom Integrations yet (orders don’t carry product-collection data). We’ll continue adding more triggers and conditions.