SegOps AIDocs

Shopify Integration

Connect your Shopify store to SegOps in minutes with native webhook support. No SDK required on the Shopify side — just configure the webhook URL in your Shopify Admin.

Webhook URL#

All Shopify webhooks for your tenant are received at:

http
POST https://api.segops.ai/api/ingestion/shopify/<your_tenant_slug>/

Replace <your_tenant_slug> with your tenant identifier (e.g., acme). You can find your tenant slug under Settings → General.

HMAC Verification#

Shopify signs every webhook request with an HMAC-SHA256 signature in the X-Shopify-Hmac-SHA256 header. SegOps automatically verifies this signature using your Shopify webhook secret — no API key required for Shopify webhooks.

Warning
You must add your Shopify webhook secret to SegOps before webhooks will be accepted. Navigate to Settings → Integrations → Shopify and paste your secret.

Shopify Topic → SegOps Event Mapping#

Shopify TopicSegOps event_typeNotes
orders/createorder_placedFired when an order is created (may not be paid)
orders/paidorder_paidFired when payment is confirmed
orders/cancelledorder_cancelledFired when an order is cancelled
customers/createcustomer_createdNew customer record created in Shopify
checkouts/createcheckout_startedCart proceeded to checkout
checkouts/deletecheckout_abandonedCheckout abandoned (cart deleted)

Payload Mapping#

SegOps maps key Shopify fields to a standardized payload. For order_placed / order_paid:

SegOps payload fieldShopify source field
order_idid
totaltotal_price (as number)
currencycurrency
item_countline_items.length
emailemail
financial_statusfinancial_status

The user_idfor Shopify events is set to the customer's email address when available, or the Shopify customer ID as a string fallback.

Setting Up in Shopify Admin#

  1. In your Shopify Admin, go to Settings → Notifications
  2. Scroll to Webhooks at the bottom and click Create webhook
  3. Select the Event (e.g., Order creation)
  4. Set the URL to https://api.segops.ai/api/ingestion/shopify/YOUR_TENANT_SLUG/
  5. Set format to JSON
  6. Click Save webhook
  7. Copy the Your webhook signing secret value and paste it into SegOps Settings → Integrations → Shopify
  8. Repeat for each topic you want to track
Tip
Use the Send test notification button in Shopify to verify the webhook is received correctly. Check Ingestion → Recent Errors in SegOps if the test fails.

Common Segmentation Recipes#

Churned Buyers

Users who placed at least one order but have not placed an order in the last 90 days. Use conditions: event_count(order_placed) >= 1 AND recency(order_placed) > 90 days.

High-Value Customers

Users whose total spend via order_paid exceeds $500. Use: monetary(order_paid, total, sum) >= 500.

Cart Abandoners

Users who triggered checkout_abandoned in the last 7 days without a subsequentorder_placed. Use an event_sequence condition or combine recency conditions:event_count(checkout_abandoned, window=7) >= 1 AND event_count(order_placed, window=7) = 0.