Major

Shopify AI Agents: API Guide and Governed Automations

A practical guide to Shopify AI agents, native Sidekick capabilities, eight GraphQL operations, and governed commerce workflows on Major.

Ritvij GautamUpdated
Major x Shopify lockup for a Shopify automation agent guide

Shopify AI agents use store context to assess exceptions, recommend actions, and coordinate commerce work. On Major, deterministic apps hold the evidence and review queue, agents handle judgment, and workflows manage triggers and approvals.

This guide covers Shopify's built-in AI, its connection to Major, eight documented API operations, and practical order, finance, and shipping automations.

What Shopify is and who relies on it

Shopify manages commerce records including products, customers, orders, inventory, and fulfillment. Its API documentation separates merchant administration from storefront experiences, an important distinction when designing internal operations software.

For an ecommerce operations manager, the daily job is resolving exceptions without losing the order's history. Warehouse teams need fulfillment status and location context. Support teams need the purchase record behind a customer complaint, while finance needs line items, discounts, and payment status for reconciliation.

Those teams often work on the same order in different systems. A warehouse delay can become a support ticket and then a finance adjustment. Copying a summary between systems does not preserve who approved the next action or whether the underlying order changed.

Major adds a durable control surface for that shared work. An agent can build an app that stores mappings, evidence versions, and review outcomes, then run that software for repeatable checks. The agent remains responsible for interpreting ambiguous evidence, rather than repeating routine joins and validations on every run.

Shopify AI agents and Shopify's built-in AI

Shopify's current Sidekick documentation describes a commerce assistant that plans multi-step tasks, continues longer work in the background, and presents changes for review. Sidekick can generate content and custom apps, build Flow workflows, calculate with code, remember instructions, and search public web sources.

The older Shopify Magic documentation URL now describes the broader collection of built-in AI tools. These include product-category suggestions, image editing, theme generation, and Inbox assistance. Availability varies by feature, plan, device, and language.

These are substantial native capabilities. Do not choose Major on the assumption that Shopify only writes product descriptions or cannot execute multi-step work.

Choose Major when the operating process spans systems and needs a shared application with its own managed state. For example, Shopify supplies order evidence, NetSuite supplies item mappings, and Gorgias supplies support context. A Major agent interprets mismatches, while its app preserves the evidence and the workflow enforces the appropriate approval. The comparison is about the operating boundary and control surface, not a claim that Shopify lacks intelligence.

How Shopify connects to Major

Shopify connects through Major's Pipedream connector (app "p_shopify"). There is no native Shopify connector. The connector catalog also identifies Shopify with its Shopify Pipedream slug; these catalog labels describe the connection route, not a promise that every API operation is exposed as a ready-made action.

IT sets up the connector once, authorizes the intended store, and restricts access to the data and operations the process needs. Credentials stay centrally stored in the connector vault, never in application code or agent prompts. SSO, role-based access control, and audit logs cover the apps, agents, and workflows that use the connection.

Start with read-only evidence collection. Verify that the installed connector supports the required operation and API version before designing a write path. Shopify's token documentation distinguishes background access from staff-session access; do not assume a user's session token suits a scheduled workflow.

Major orchestrates Shopify; it never replaces it. Shopify remains the commerce system of record. The Major app stores operational state, including cross-system IDs, approvals, and execution receipts, rather than creating a competing order ledger.

Shopify API guide for apps, agents, and workflows

Authentication, access, and API versions

The GraphQL Admin API uses POST requests to the store's versioned endpoint, with the X-Shopify-Access-Token header. The examples below use /admin/api/2026-10/graphql.json. These are eight operations on one HTTP endpoint, not eight separate REST routes.

Shopify's access-token guide documents offline tokens for background work, online tokens tied to staff sessions, and authorization flows including authorization code, token exchange, and eligible client-credentials access. Token expiration and renewal depend on the flow; offline does not automatically mean non-expiring.

Request only the relevant access scopes: read_orders, read_customers, read_products, and read_inventory. Order tagging needs appropriate write access, such as write_orders. Reading older orders requires read_all_orders alongside order access and the applicable approval. Protected customer data has separate requirements.

Shopify releases versions quarterly and supports each stable version for at least 12 months. Monitor the X-Shopify-API-Version response header and test upgrades, because an inaccessible version falls forward to an accessible version.

Pagination, capacity, events, and testing

GraphQL pagination uses first and after for forward traversal, with pageInfo.hasNextPage and pageInfo.endCursor. Connections return up to 250 resources per page. Partition large reads because pagination is capped at 25,000 objects.

GraphQL rate limits use calculated cost per app and store: Standard restores 100 points per second, Advanced 200, Plus 1,000, and enterprise 2,000. A single query cannot exceed 1,000 points. Watch extensions.cost and its throttleStatus values in the response body, not an invented remaining-requests header. Shopify-GraphQL-Cost-Debug is the documented diagnostic request header.

The webhook reference includes order creation, payment, and update events. For HTTPS delivery, verify X-Shopify-Hmac-SHA256 against the raw body using the app's client secret. Respond within five seconds after durable receipt. Shopify retries failures eight times over four hours and can delete Admin API subscriptions after consecutive failures.

Use a dev store and test orders before production. Dev stores cannot process real transactions. Test duplicate deliveries, missing permissions, and approval expiry, not just successful reads.

Orders list: POST /admin/api/2026-10/graphql.json

The orders query retrieves filtered order lists with customer, line-item, and status context.

  • App: Populate an exception queue with stable Shopify IDs.
  • Agent: Prioritize orders whose commercial context needs review.
  • Workflow: Reconcile recently changed orders against the last successful checkpoint.

Order detail: POST /admin/api/2026-10/graphql.json

The order query retrieves one order by ID; Shopify documents a default 60-day order-access window.

  • App: Display the evidence snapshot behind a review.
  • Agent: Explain inconsistencies between line items, status, and support notes.
  • Workflow: Refresh the order immediately before executing an approved action.

Customer context: POST /admin/api/2026-10/graphql.json

The customer query retrieves a customer by ID, including permitted purchase-history context.

  • App: Associate cases with the correct customer record.
  • Agent: Interpret repeat-purchase context without treating loyalty as proof of safety.
  • Workflow: Fetch only fields necessary for the review and authorized by policy.

Product catalog: POST /admin/api/2026-10/graphql.json

The products query returns catalog data, including variants and product metadata.

  • App: Maintain a reviewable Shopify-to-ERP item mapping.
  • Agent: Recommend a match when catalog names differ across systems.
  • Workflow: Refresh changed catalog records before an order-sync batch.

Inventory items: POST /admin/api/2026-10/graphql.json

The inventoryItems query lists inventory items and supports filters including SKU.

  • App: Store inventory-item IDs alongside product mappings.
  • Agent: Explain why an apparent SKU match may be ambiguous.
  • Workflow: Retrieve permitted inventory context for an exception investigation.

Fulfillment orders: POST /admin/api/2026-10/graphql.json

The fulfillmentOrders query lists fulfillment orders visible under the app's fulfillment-order scopes.

  • App: Track the fulfillment work associated with an order.
  • Agent: Distinguish a location handoff from a likely shipping exception.
  • Workflow: Poll open fulfillment work and route overdue cases to support.

Access is location-sensitive. For merchant-managed work, the query reference names read_merchant_managed_fulfillment_orders; other fulfillment arrangements require their corresponding scopes.

Add tags: POST /admin/api/2026-10/graphql.json

The tagsAdd mutation adds tags to supported resources, including orders.

  • App: Show approved tags and the receipt of each change.
  • Agent: Recommend a policy-approved classification with supporting rationale.
  • Workflow: Apply an allowed tag only after its required approval and validation.

Subscribe to events: POST /admin/api/2026-10/graphql.json

The webhookSubscriptionCreate mutation creates shop-specific subscriptions with filtering and payload controls.

  • App: Record subscription IDs and their operational owners.
  • Agent: Summarize delivery incidents for the owner, without changing subscriptions itself.
  • Workflow: Provision approved subscriptions and monitor delivery health.

Subscription administration belongs to an authorized setup process. An order-review agent does not need permission to create arbitrary event destinations.

Shopify automation use cases on Major

Fraud-risk evidence review with Shopify and Gorgias

  • App: Hold the order evidence, recommendation, assigned reviewer, and final decision.
  • Agent: Weigh Shopify's risk result against permitted customer history and support context, then recommend further review or a proposed next step.
  • Workflow: Wait for risk evidence, assemble the case, and route ambiguous cases to Gorgias. Require human approval for consequential fulfillment or payment changes.

Use the documented orders, order, and customer queries above. The OrderRiskSummary object exposes assessments and a recommendation through the order's risk field.

Order-to-cash exceptions with Shopify and NetSuite

  • App: Preserve the Shopify order-to-NetSuite sales-order mapping and unresolved differences.
  • Agent: Interpret unmatched items, unusual discounts, and conflicting descriptions.
  • Workflow: Detect paid orders, validate deterministic mappings, and send uncertain mappings to finance before creating a financial record.

Use the orders, order, and products queries. InventoryItems can supply additional identity context. Keep accounting validation in code; reserve the agent for interpreting exceptions that an exact mapping cannot resolve.

Delay alerts with Shopify, ShipStation, and Gorgias

  • App: Track the order timeline, shipment reference, promised window, and previous notifications.
  • Agent: Assess whether combined fulfillment and shipment evidence warrants a proactive message, then draft it.
  • Workflow: Compare updated order and fulfillment records with ShipStation evidence, and route the draft to support for approval.

Use orders, order, and fulfillmentOrders. A Shopify fulfillment record alone does not establish the carrier's latest position. The application should display evidence timestamps so a reviewer can distinguish stale data from an actual delay.

Build the Shopify architecture on Major

Shopify and Gorgias evidence flows through a Major workflow and agent into an approval decision and stateful review app

Figure 1: Cross-system evidence, agent judgment, and a durable review queue

Build the app around a case record rather than a conversation. Each case needs the store and order ID, source timestamps, evidence version, recommendation, reviewer, approval state, and execution outcome. The managed database preserves that record across runs.

Use the following division of work:

  1. The trigger receives a verified event or a scheduled reconciliation result.
  2. Scoped connectors retrieve the permitted Shopify and support evidence.
  3. The workflow deduplicates the event and calls the app's validation code.
  4. The agent interprets ambiguity and produces a recommendation with its evidence references.
  5. A policy gate sends consequential proposals to an authorized person.
  6. The app records the outcome; the workflow performs only the permitted next step.

An agent can build reusable software for evidence assembly, identifier matching, and approval-state checks. Those steps then run as code instead of fresh reasoning. Keep the uncertainty assessment with the agent, including the option to abstain when evidence is incomplete.

A worked example with illustrative numbers

For example, suppose an ecommerce team reviews 300 flagged orders each week. Manually opening Shopify, checking permitted customer history, reading support context, and recording a recommendation takes eight minutes per order. That is 300 × 8 = 2,400 minutes, or 40 hours weekly.

Assume the proposed Major process assembles the evidence and draft recommendation automatically, but every flagged order still receives human review. If review takes three minutes per order, that is 300 × 3 = 900 minutes, or 15 hours. Allow another five hours for missing evidence, failed lookups, and operational monitoring: total human effort is 20 hours.

Under those assumptions, the difference is 40 minus 20 = 20 hours weekly. These are illustrative inputs, not a customer result, performance guarantee, or measured savings claim.

Validate the assumptions in an advisory-only pilot. Measure evidence completeness, review time, reviewer overrides, and cases that needed rework. A shorter queue is not a success if the process hides uncertainty or encourages approval without inspection. Expand permissions only after the operational owner accepts the measured behavior.

Governance, approvals, and failure handling

Shopify evidence reaches a Major agent, with internal summaries recorded directly and consequential changes routed through human approval

Figure 2: Advisory work proceeds while money and fulfillment changes require approval

An agent must not independently cancel, release, refund, or capture payment for a high-risk order in this design. Require a named approver, a specific proposed action, and a fresh state check. This is a governance choice, not a claim that Shopify technically prevents automation.

Shopify's verification guide identifies X-Shopify-Webhook-Id for duplicate-delivery detection and X-Shopify-Event-Id for correlating deliveries from the same merchant action. Persist delivery receipts, then use a separate action key for each intended business operation. Deduplicating only by order ID would incorrectly suppress later legitimate reviews.

Persist work before acknowledging receipt. If a downstream write times out, inspect the destination before retrying; a timeout does not prove the write failed. Back off with jitter when capacity is exhausted, using Shopify's query-cost response data to schedule the next attempt.

Log the evidence version, agent recommendation, reviewer identity, policy version, and execution receipt. Permission failures should stop the affected path, not prompt the agent to request broader credentials or improvise another route.

Where Flow fits and when fraud review should start

Shopify Flow supports triggers, conditions, and actions within a store and across apps. It is inaccurate to say it cannot use outside data. Use fixed rules for known conditions, and an agent when the remaining work requires interpreting conflicting or incomplete evidence.

Flow is free on Basic, Grow, Advanced, and Plus. Its Send HTTP Request action requires Grow, Advanced, or Plus; tasks created by custom partner apps require Plus. Check the current plan before designing an external handoff.

For Shopify fraud analysis, Order risk analyzed fires after Shopify's assessment completes, not immediately when the order is created. It does not cover third-party risk assessments. A scheduled reconciliation can recover cases whose evidence arrived later or whose event processing failed.

Reduce the fraud-review bottleneck by centralizing evidence, identifying missing information, and assigning one accountable reviewer. Do not solve it by silently auto-releasing uncertain orders. Native automation and a Major review process can coexist, provided ownership is explicit and two workflows cannot issue conflicting actions.

Shopify AI Apps, Agents and Workflow Automations

Every published Major use case that works with Shopify, newest first. Each one names the Shopify API objects involved and shows the app, agent and workflow split.

  • Automate Shopify-ShipStation Delay Alerts with AI: A Shopify-ShipStation connection moves orders and tracking. Add a governed workflow that spots shipments falling behind and lets support review proactive customer updates before complaints arrive.

Frequently asked questions

Is Shopify Flow available on all Shopify plans?

Flow is free on Basic, Grow, Advanced, and Plus. Send HTTP Request requires Grow or above, while tasks created by custom partner apps require Plus. Confirm your store's plan against the current Flow documentation before choosing the handoff.

What kinds of decisions need more than rule-based Shopify automation?

Conflicting support evidence, ambiguous ERP item matches, and uncertain delivery explanations can require judgment. Rules can still retrieve outside data and apply defined conditions. On Major, the agent interprets ambiguity while the app stores evidence and the workflow enforces approval.

What is the difference between native Shopify automation and agent-based automation?

Native Shopify tools include rule-driven Flow and the more capable Sidekick assistant. A Major process adds a cross-system application with managed state, scoped access, agent judgment, and explicit approval routing. Choose based on the process boundary, not a blanket claim that native tools cannot reason.

When should a Shopify fraud workflow start?

For Shopify risk assessments, start after Order risk analyzed, not merely Order created. Shopify documents that analysis takes time and that this trigger excludes third-party assessments. Reconcile periodically to catch delayed evidence and failed processing.

Can AI automatically cancel, release, or capture payment for high-risk orders?

Shopify supports consequential automation, but this design does not authorize the agent to execute those actions alone. Require a named reviewer, fresh order evidence, and an action-specific approval. Keep advisory recommendations separate from execution permissions.

What Shopify data does an order-review app need?

Start with order details, available risk assessments, and relevant customer history. Use only necessary fields. Orders normally have a 60-day access window; older history requires additional order access and applicable approval. Protected customer fields have separate access requirements.

How do you prevent duplicate actions on a Shopify order?

Persist webhook delivery IDs and track action-specific execution keys in the app. Recheck destination state after an uncertain write. Do not permanently suppress an order after its first event, because later updates may legitimately require another review.

Does Major have a native Shopify connector?

No. Shopify connects through Major's Pipedream connector. IT authorizes and scopes the connection once, with credentials stored centrally. Confirm the installed connector's operation coverage before enabling writes or promising a particular API action.

Sources

The official pages below support this guide's API and product claims. Shopify's reference labels the current stable API version as 2026-10. Check versioned operation behavior and installed connector coverage before deploying; documentation for an API does not establish that every connector action implements it.

Start building on Major

Build a Shopify evidence queue, an exception-review agent, and an approval workflow that your operations team can inspect. Start with advisory access, then add narrowly scoped actions after testing.

About the author

Ritvij Gautam is Head of Growth at Major.

Last reviewed November 19, 2026 by Ritvij Gautam.

Frequently asked questions

Is Shopify Flow available on all Shopify plans?
Flow is free on Basic, Grow, Advanced, and Plus. Send HTTP Request requires Grow or above, while tasks created by custom partner apps require Plus. Confirm your store's plan against the current Flow documentation before choosing the handoff.
What kinds of decisions need more than rule-based Shopify automation?
Conflicting support evidence, ambiguous ERP item matches, and uncertain delivery explanations can require judgment. Rules can still retrieve outside data and apply defined conditions. On Major, the agent interprets ambiguity while the app stores evidence and the workflow enforces approval.
What is the difference between native Shopify automation and agent-based automation?
Native Shopify tools include rule-driven Flow and the more capable Sidekick assistant. A Major process adds a cross-system application with managed state, scoped access, agent judgment, and explicit approval routing. Choose based on the process boundary, not a blanket claim that native tools cannot reason.
When should a Shopify fraud workflow start?
For Shopify risk assessments, start after Order risk analyzed, not merely Order created. Shopify documents that analysis takes time and that this trigger excludes third-party assessments. Reconcile periodically to catch delayed evidence and failed processing.
Can AI automatically cancel, release, or capture payment for high-risk orders?
Shopify supports consequential automation, but this design does not authorize the agent to execute those actions alone. Require a named reviewer, fresh order evidence, and an action-specific approval. Keep advisory recommendations separate from execution permissions.
What Shopify data does an order-review app need?
Start with order details, available risk assessments, and relevant customer history. Use only necessary fields. Orders normally have a 60-day access window; older history requires additional order access and applicable approval. Protected customer fields have separate access requirements.
How do you prevent duplicate actions on a Shopify order?
Persist webhook delivery IDs and track action-specific execution keys in the app. Recheck destination state after an uncertain write. Do not permanently suppress an order after its first event, because later updates may legitimately require another review.
Does Major have a native Shopify connector?
No. Shopify connects through Major's Pipedream connector. IT authorizes and scopes the connection once, with credentials stored centrally. Confirm the installed connector's operation coverage before enabling writes or promising a particular API action.