Skip to main content
Commerce IntegrationsProduction Invariant

Shopify Integration: OAuth, Webhooks & Draft-Only Push

Secure Shopify App bridge with draft-only product creation, automated inventory sync, and webhook ingestion.

DDarryl (Platform Lead)
Published:
Updated:
6 min read

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.

Cited Claim IDs:PUB-CLM-002

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.

GRAPHQLproductCreate.graphql
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.