Skip to main content

Shopify

The Shopify integration connects Endless Commerce to Shopify so product, order, inventory, and fulfillment data can move between the two systems.

Setting up the integration

This tutorial explains how the Shopify and Endless connection works under the hood.

Self serve vs managed install

To connect to Shopify, you will need to install an app in your Shopify store. We recommend asking Endless Support to create and manage the Shopify app for you. If you are creating and managing your own Shopify app, you can follow this guide and complete setup without contacting Support.

What you are actually building

At a high level, configuring a Shopify integration in Endless is a two-stage process:

  • Stage 1 - Create the integration in Endless: you store enough information for Endless to identify your Shopify app and Shopify store (Client ID / Client Secret + store identifier, plus the Endless brand context).
  • Stage 2 - Install the Shopify app in the store: installing the app completes OAuth and gives Endless an access token, which Endless stores and uses for all Shopify API calls.

It is helpful to know that Endless does not talk to Shopify using the API key/secret directly. Instead, those credentials are used to complete OAuth and obtain an access token. After that, Endless uses the token for all Shopify API calls.

Stage 1: Create the shell integration in Endless

The first stage is creating an integration record in Endless that contains the identifying information needed to later complete OAuth.

Creating a Shopify app

Shopify apps are created through the Shopify Developer Dashboard. You can either ask Endless Support to create an app for you or create an app yourself.

If you are creating an app yourself, you will need the following pieces of information:

  • Redirect URL: https://api.endlesscommerce.com/shopify/callback
  • Scopes: read_assigned_fulfillment_orders,write_assigned_fulfillment_orders,read_companies,write_companies,read_customers,write_customers,read_price_rules,write_price_rules,write_draft_orders,read_draft_orders,read_fulfillments,write_fulfillments,write_inventory,read_inventory,write_locations,read_locations,read_merchant_managed_fulfillment_orders,write_merchant_managed_fulfillment_orders,write_order_edits,read_order_edits,read_orders,write_orders,read_product_listings,read_products,write_products,read_purchase_options,write_purchase_options,read_returns,write_returns,read_shipping,write_shipping,read_third_party_fulfillment_orders,write_third_party_fulfillment_orders
  • Embedded: false
  • App URL: https://api.endlesscommerce.com/shopify/install

Creating the integration in Endless

When you create the integration, the essential pieces are:

  • Brand: which Endless brand this integration belongs to.
  • Store name / store identifier: the Shopify store's identifier without myshopify.com (e.g. acme rather than acme.myshopify.com).
  • API key / Client ID: copied from the Shopify app you created.
  • API secret / Client Secret: copied from the Shopify app you created.

It is important that you enter the store name, API key, and API secret correctly into Endless. If you run into issues during setup, this is almost definitely what went wrong.

At the end of Stage 1 you should have:

  • An Endless integration exists with brand context + store identifier + Shopify app credentials.
  • It is not yet connected in the sense of having a Shopify OAuth token.

Stage 2: Install the Shopify app to complete OAuth

Once Stage 1 is complete (brand + store name + app credentials saved in Endless), you need to install the Shopify app in the target store to complete setup.

Behind the scenes, that installation runs an OAuth flow: Shopify redirects back to Endless, Endless exchanges the OAuth code for an access token, and then stores the token on the integration so it can start communicating with Shopify.

Endless supports storing the app's install link in the integration settings. This does not change how OAuth works; it is just a convenience:

  • It gives you a stable bookmark for where to install from in the future.
  • It makes it easy to hand off installation to someone else, such as a Shopify admin, without explaining the Shopify Developer Dashboard.

After you add the install link to the integration settings in Shopify, the API connection tab will show an install button if the app has not been installed.

Importing products from Shopify

If you have an integration configured with Shopify, you can run a one-time product import action. This will import all of your Shopify product data into Endless. To run this bulk import, navigate to Integrations and use the actions menu.

How the import tool works

The Shopify product import tool processes each product variant as a separate product in Endless. For each variant, the following rules apply:

  • Each variant becomes its own product in Endless
  • The product name is constructed by combining the Shopify product title with the variant title
  • Every variant must have a unique SKU assigned in Shopify to be imported
  • If a variant is missing a SKU, it will be skipped during import

Shopify product variants with the following attributes will also be skipped during import:

  • Gift cards
  • Shopify product variants that do not require shipping
  • Shopify product variants with a Draft or Archive status
  • Shopify product variants that meet the skip_by_tag or skip_by_type criteria as entered through the app

Understanding which data fields are mapped

When products are imported from Shopify into Endless, the following fields are populated:

FieldDescriptionSource
product_idUnique identifier for the productGenerated UUID
nameProduct titleShopify product title
brand_idBrand identifierFrom Shopify integration settings
skuStock keeping unitFrom Shopify variant
upcUniversal product codeFrom Shopify barcode
priceProduct priceFrom Shopify variant price
statusProduct statusSet to active
weightProduct weightConverted from Shopify's weight measurement
product_typeType of productFrom Shopify product type
descriptionProduct descriptionFrom Shopify product's HTML description
sourceSource of the productSet to SHOPIFY
source_idSource system identifierShopify variant ID
source_updated_atLast update timestampShopify variant's updated timestamp
supplierProduct supplierFrom Shopify product vendor

Product images

Product images, including the featured image, are imported from Shopify.

Additional import details

Products are imported in batches of 50 at a time. If a last import timestamp exists in the integration logs, only products created after that timestamp will be imported. The import process is idempotent: existing products with the same SKU will be skipped.

  1. Duplicate prevention: The system checks for duplicate SKUs before importing.
  2. Timestamp tracking: Updates the last import and sync timestamps in the Shopify integration settings.
  3. Warehouse management: Creates warehouses if they do not exist for Shopify locations.
  4. External data: Sets up external product data to maintain the connection with Shopify.

Importing a single product

You can also import a single product at a time. To import a single product, open the integration and use the Import Product action. You will be prompted to enter the product ID and should use the product ID that is found in the URL of your Shopify admin.

Processing Shopify orders

Endless processes orders from Shopify through a combination of real-time webhooks and scheduled reconciliation jobs. This dual approach ensures that no orders are missed while maintaining system reliability.

Real-time webhook processing

When an order is created or updated in Shopify, Endless receives webhooks for the following events:

  • ORDERS_CREATE: When a new order is created
  • ORDERS_PAID: When an order is paid
  • ORDERS_FULFILLED: When an order is fulfilled
  • ORDERS_UPDATED: When an order is updated

Each webhook is processed through the following steps:

  1. Webhook verification: The system verifies the webhook's authenticity using Shopify's HMAC signature.
  2. Order processing: Based on the webhook type, the system creates new orders, updates order status, processes payments, or handles fulfillment updates.

Scheduled reconciliation

To ensure no orders are missed, Endless runs an hourly check for new orders. This job:

  • Includes safeguards against duplicate processing
  • Handles pagination for large order volumes