The MeritSKU Shopify Integration establishes a hardened, bidirectional link between MeritSKU evaluation workflows and your Shopify store. Learn how our draft-only guardrails (published_at: null) protect your live storefront while syncing sales actuals for model calibration.
1. OAuth 2.0 Token Handshake
MeritSKU authenticates with Shopify via standard OAuth 2.0. The access token is exchanged via HTTPS and immediately stored in PostgreSQL with AES-256-GCM encryption.
2. Draft-Only Catalog Injection (published_at: null)
When pushing an approved SKU, MeritSKU uses the Shopify Admin GraphQL API to create the product. The mutation explicitly omits published_at and sets status: DRAFT.
mutation ProductCreate($input: ProductInput!) {
productCreate(input: $input) {
product {
id
title
status # Returns DRAFT
publishedAt # Returns null
}
userErrors {
field
message
}
}
}3. Ingested Webhooks & Actuals Sync
MeritSKU registers webhooks for orders/create, orders/cancelled, and refunds/create. When orders occur for evaluated SKUs, sales actuals, blended CAC, and return rates flow back into MeritSKU to calibrate future viability models.
Was this guide helpful?
Your feedback trains our editorial documentation standards.