Skip to content

Shopify

BUILDING Source · built and tested, not yet verified against production accounts. Contact us before relying on it.

PortPilot reads your store with Shopify’s GraphQL Admin API bulk operations: Shopify exports each object type to a file in the background, and PortPilot downloads and loads it. This is Shopify’s recommended way to read large datasets and doesn’t use your app’s per-request query budget. After the first sync, only records updated since the last sync are exported.

FeatureSupportedNotes
Incremental sync Yes Records updated since the last sync, via bulk export.
Captures deletes No Records deleted in the source stay in the destination.
Custom fields No Metafields aren't synced yet.
Table selection Yes Choose which tables to sync.
New columns added automatically Yes Columns that appear in the source are added to the destination table.
Re-sync Yes A full refresh re-reads every selected table.
  1. Create a custom app for your store (Shopify admin → Settings → Apps and sales channels → Develop apps) and give it these Admin API scopes:
    • read_orders
    • read_customers
    • read_products
    • read_inventory
    • read_all_orders if you need orders older than 60 days (see gotchas)
  2. Install the app and copy its Admin API access token (shpat_…). Shopify shows it once.

In the app, go to Connectors → New connector → Shopify and click Test connection after filling in:

Field Required Default Description
shop Yes — Your store’s domain, e.g. mystore.myshopify.com.
access_token Yes — Admin API access token. Stored write-only in the data plane’s secret store.
start_date No all history YYYY-MM-DD. The first sync reads only records updated on or after this date.
bulk_timeout_seconds No 21600 Cancel and fail an export that hasn’t finished after this many seconds (6 hours).

How the tables relate. Each arrow points from a column to the table it references. Only key, reference and cursor columns are shown; the data dictionary below has the rest.

erDiagram
    customers ||--o{ orders : "customer (`customer.id` inside the JSON object)"
    orders ||--o{ transactions : "orderId"
    orders {
        string id PK
        string updatedAt "cursor"
        object customer FK
    }
    customers {
        string id PK
        string updatedAt "cursor"
    }
    products {
        string id PK
        string updatedAt "cursor"
    }
    collections {
        string id PK
        string updatedAt "cursor"
    }
    inventory_items {
        string id PK
        string updatedAt "cursor"
    }
    transactions {
        string id PK
        string orderId FK
        string orderUpdatedAt "cursor"
    }

orders

One row per order, in every status.

Primary key
id
Replication
Incremental, on updatedAt
ColumnTypeDescription
idPKstringShopify global ID, e.g. gid://shopify/Order/123.
namestringOrder name shown in the admin, e.g. #1001.
emailstringCustomer email on the order.
createdAtstring (datetime)When the record was created.
updatedAtcursorstring (datetime)When the record last changed.
processedAtstring (datetime)When the order was processed.
cancelledAtstring (datetime)When the order was cancelled, if it was.
closedAtstring (datetime)When the order was closed, if it was.
testbooleanTrue for test orders.
tagsarrayTags on the record.
displayFinancialStatusstringPayment status, e.g. PAID, REFUNDED.
displayFulfillmentStatusstringFulfillment status, e.g. FULFILLED.
currencyCodestringThe shop's currency for the order.
totalPriceSetobjectOrder total: {shopMoney: {amount, currencyCode}} in the shop's currency; amount is a string.
subtotalPriceSetobjectSubtotal before shipping and taxes: {shopMoney: {amount, currencyCode}} in the shop's currency; amount is a string.
totalTaxSetobjectTotal tax: {shopMoney: {amount, currencyCode}} in the shop's currency; amount is a string.
customer→ customers.idobjectThe ordering customer as {id}.

customers

One row per customer.

Primary key
id
Replication
Incremental, on updatedAt
ColumnTypeDescription
idPKstringShopify global ID, e.g. gid://shopify/Order/123.
firstNamestringFirst name.
lastNamestringLast name.
createdAtstring (datetime)When the record was created.
updatedAtcursorstring (datetime)When the record last changed.
statestringAccount state, e.g. ENABLED, DISABLED, INVITED.
tagsarrayTags on the record.
verifiedEmailbooleanWhether the email address is verified.
taxExemptbooleanWhether the customer is exempt from taxes.
numberOfOrdersstringNumber of orders placed (a string, as Shopify sends it).
amountSpentobjectTotal spent: {amount, currencyCode}.
defaultEmailAddressobjectPrimary email as {emailAddress}.

products

One row per product.

Primary key
id
Replication
Incremental, on updatedAt
ColumnTypeDescription
idPKstringShopify global ID, e.g. gid://shopify/Order/123.
titlestringProduct title.
handlestringURL handle.
statusstringACTIVE, ARCHIVED or DRAFT.
vendorstringVendor name.
productTypestringProduct type.
createdAtstring (datetime)When the record was created.
updatedAtcursorstring (datetime)When the record last changed.
publishedAtstring (datetime)When it was published to the online store.
tagsarrayTags on the record.

collections

One row per collection.

Primary key
id
Replication
Incremental, on updatedAt
ColumnTypeDescription
idPKstringShopify global ID, e.g. gid://shopify/Order/123.
titlestringCollection title.
handlestringURL handle.
updatedAtcursorstring (datetime)When the record last changed.
sortOrderstringHow products in the collection are sorted.
templateSuffixstringTheme template suffix, if any.

inventory_items

One row per inventory item (the stocked unit of a variant).

Primary key
id
Replication
Incremental, on updatedAt
ColumnTypeDescription
idPKstringShopify global ID, e.g. gid://shopify/Order/123.
skustringStock keeping unit.
trackedbooleanWhether inventory is tracked.
requiresShippingbooleanWhether the item needs shipping.
createdAtstring (datetime)When the record was created.
updatedAtcursorstring (datetime)When the record last changed.
countryCodeOfOriginstringTwo-letter country of origin.
unitCostobjectUnit cost: {amount, currencyCode}.

transactions

One row per payment transaction on an order.

Primary key
id
Replication
Incremental, on orderUpdatedAt
ColumnTypeDescription
idPKstringShopify global ID, e.g. gid://shopify/Order/123.
kindstringe.g. SALE, AUTHORIZATION, CAPTURE, REFUND.
statusstringe.g. SUCCESS, FAILURE, PENDING.
gatewaystringPayment gateway used.
testbooleanTrue for test transactions.
processedAtstring (datetime)When the transaction was processed.
createdAtstring (datetime)When the record was created.
amountSetobjectTransaction amount: {shopMoney: {amount, currencyCode}} in the shop's currency; amount is a string.
orderId→ orders.idstringID of the order the transaction belongs to.
orderUpdatedAtcursorstring (datetime)When that order last changed (the sync cursor).
  • IDs are Shopify global IDs, e.g. gid://shopify/Order/123. The numeric ID is the last segment.
  • Column names are camelCase, as in Shopify’s GraphQL API.
  • Money amounts are strings inside their JSON objects. Cast them in your warehouse.
  • First sync: every record of each type (from start_date, if set).
  • Later syncs: records whose updatedAt is at or after the newest value from the previous sync, upserted on id. Transactions are re-read when their order is updated.
  • Streams are exported one after another.
  • Only 60 days of orders without read_all_orders. Shopify limits apps to recent orders unless the app has this scope. Request it in the app’s configuration before the first sync, or older orders won’t be replicated.
  • A missing scope fails the stream. The export ends with ACCESS_DENIED and the run fails with that code. Add the scope, reinstall the app and update the token.
  • Not synced yet: product variants, order line items and fulfillments.
  • Deletes aren’t replicated. Deleted products, customers and orders stay in the destination.
  • One export at a time. Shopify limits how many bulk operations an app can run on a store at once. If another tool uses bulk operations with the same app, syncs can be throttled. Use a dedicated app for PortPilot.