# Shopify

Shopify plugin is able to seamlessly perform inbound and outbound synchronization operations for your Shopify store, ensuring your products, orders, and customer data are always up-to-date across all platforms. Simplify your e-commerce management with real-time data syncing and reduce manual tasks.

In this page, you'll find:

* [Creating a connection](#authentication-methods)
* [Shopify's data structures](https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/apps/shopify/data-structure)

{% hint style="info" %}
The Omnata plugin supports the GraphQL Admin API 2025-04 version.
{% endhint %}

## Authentication methods

### API Access Token

This authentication method requires **4** parameters:

1. [Your shop name](#obtain-your-shop-name)
2. [An API Access Token](#generate-your-api-access-token)
3. [User Tier](#obtain-your-user-tier)

#### Obtain your shop name

1. Visit your store page.
2. Click on **Settings** on the bottom left of your main store page.
3. Copy down your shop name as shown in the screenshot below.\
   \&#xNAN;*Note: Each domain will end with myshopify.com, including custom domains.*

<figure><img src="https://2119005510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedNbhp7XNeTdK7we4Ka5%2Fuploads%2Fgit-blob-2429b471d059bf8b3058d2a8413d0462e708bd21%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

#### Generate your API Access Token

1. Visit your store page.
2. Click on **Settings** on the bottom left of your main store page.
3. In Settings, click on **Apps and sales channels**.
4. Click on **Develop apps**.

<figure><img src="https://2119005510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedNbhp7XNeTdK7we4Ka5%2Fuploads%2Fgit-blob-0b7a89a6a70bd2f673aba57b174801d82cd25939%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Click on **Allow Custom App Development** for both this page and the next.

<figure><img src="https://2119005510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedNbhp7XNeTdK7we4Ka5%2Fuploads%2Fgit-blob-23c1fbafe2c60cd7edf2f3f5300075ffecd9899f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

6. After activating custom app development, click on **Create an app**.

<figure><img src="https://2119005510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedNbhp7XNeTdK7we4Ka5%2Fuploads%2Fgit-blob-2b1e26e5a609ced953d189eb0e0a787ef1f81909%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

7. In the popup window, fill in the App name to your desired name to identify this app and click **Create App**.
8. Select the **Configuration** tab.
9. Under **Admin API Integration**, select **Configure**.
10. For ease of configuration, we recommend enabling read and write access for all Shopify objects.\
    However, if you prefer to enable minimum scopes only, the below shows scope requirements down to the field level. A missing scope for a field will cause the whole stream to fail inside a sync.

<details>

<summary>Scopes for inbound syncs</summary>

`customers`\\

* read\_customers (mandatory)

`products`\\

* read\_products (mandatory)
* read\_publications (for `availablePublicationsCount` field)

`orders`\\

* read\_orders (mandatory)
* read\_customer (for `customer` field)
* read\_products (for `line_items -> variant` field)
* read\_payment\_terms (for `paymentTerms` field)

`returns (dep. orders)`\\

* all scopes from `orders`
* read\_returns (mandatory)

`fulfillments (dep. orders)`\\

* all scopes from `orders`
* read\_fulfillments (mandatory)
* read\_locations (for `location` field)

`shippingLine (dep. orders)`\\

* all scopes from orders

`product_variants`\\

* read\_products (mandatory)
* read\_inventory (for `duplicateSkuCount` field)
* read\_shipping (for `duplicateSkuCount` field)

`locations`\\

* read\_locations (mandatory)

`shopifyPaymentsAccount`\\

* read\_shopify\_payments\_accounts (mandatory)

`balanceTransactions`\\

* read\_shopify\_payments\_accounts (mandatory)

`payouts`\\

* read\_shopify\_payments\_accounts (mandatory)

`shop`\\

* read\_products (for `allProductCategoriesList` field)
* read\_locations (for `location` field)
* read\_markets (for `marketWebPresence` field)
* read\_legal\_policies (for `shopPolicies` field)
* read\_locales (for `alternateLocales` field)

`inventory_items`\\

* read\_inventory (mandatory)

`inventory_levels (dep. inventory_items)`\\

* read\_inventory (mandatory)
* read\_locations (for `locations` field)

</details>

<details>

<summary>Scopes for outbound syncs</summary>

* Customers
  * write\_customers
* Products
  * write\_products
* Orders
  * write\_orders
* Fulfillment
  * write\_fulfilments

</details>

7. Click **Save**.
8. On the top right of the page, click **Install app** and proceed with the installation.
9. This should generate an API Access Token. Copy it down as you will need it later.\
   \&#xNAN;*Note: this token is only viewable once.*

{% hint style="info" %}
You may come across an **API key** and **API secret key** field under **API Credentials**. This is ***not*** your API Access Token that will be used to create a connection. The API Access Token is no longer viewable after it is first generated, so be sure to save it somewhere where you can refer to it later if you ever need to reset the connection.
{% endhint %}

***

#### Obtain your User Tier

1. Visit your store page
2. Click on **Settings** on the bottom left of your main store page.
3. In Settings, click on **Plan**.
4. In this page, you may view what plan you are using.
   1. For **Basic** and **Shopify** plans, you are to select **Standard** when creating the connection between Omnata and Shopify.
   2. For **Advanced** plans, you are to select **Advanced** when creating the connection between Omnata and Shopify.
   3. For **Plus** plans, you are to select **Shopify Plus** when creating the connection between Omnata and Shopify.
   4. For **Enterprise** plans, you are to select **Enterprise** when creating the connection between Omnata and Shopify.

***

## Inbound Syncs

The following streams for these objects are supported:

* [customers](https://shopify.dev/docs/api/admin-rest/2024-07/resources/customer)
* [products](https://shopify.dev/docs/api/admin-rest/2024-07/resources/product)
* [product variants](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/ProductVariant)
* [orders](https://shopify.dev/docs/api/admin-rest/2024-07/resources/order#resource-object)
  * [fulfillments](https://shopify.dev/docs/api/admin-rest/2024-07/resources/fulfillment#resource-object)
  * [returns](https://shopify.dev/docs/api/admin-graphql/latest/objects/Refund)
  * [shipping line](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine)
* [inventory items](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventoryitem)
  * [inventory levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel)
* [locations](https://shopify.dev/docs/api/admin-graphql/latest/objects/location)
* [shop](https://shopify.dev/docs/api/admin-graphql/latest/queries/shop) (full refresh only)
* [shopify payments account](https://shopify.dev/docs/api/admin-graphql/latest/queries/shopifypaymentsaccount) (full refresh only)
* [payouts](https://shopify.dev/docs/api/admin-graphql/latest/connections/ShopifyPaymentsPayoutConnection) (full refresh only)
* [balance transactions](https://shopify.dev/docs/api/admin-graphql/latest/connections/ShopifyPaymentsBalanceTransactionConnection) (full refresh only)

***

## Outbound Syncs <a href="#outbound-syncs" id="outbound-syncs"></a>

Supported Outbound sync strategies: Create, Update, Upsert, Delete.

You should structure your source data as described in [Outbound sync data structures](https://docs.omnata.com/omnata-product-documentation/omnata-sync-for-snowflake/apps/shopify/data-structure).

The following streams for these objects are supported:

* [customer](https://shopify.dev/docs/api/admin-rest/2024-07/resources/customer)
  * Create - Creates a new customer.
  * Update - Updates an existing customer's information.
  * Upsert - Creates a new customer or updates an existing customer's information.
  * Delete - Deletes an existing customer.

{% hint style="info" %}
Existing customers cannot be deleted if they have a pending order.
{% endhint %}

* [products](https://shopify.dev/docs/api/admin-rest/2024-07/resources/product)
  * Create - Creates a new product.
  * Update - Updates an existing product's information.
  * Upsert - Creates a new product or updates an existing product's information.
  * Delete - Deletes an existing product.
* [orders](https://shopify.dev/docs/api/admin-rest/2024-07/resources/order#resource-object)
  * Create - Creates an order.
  * Update - Updates an existing order's information.
  * Upsert - Creates an order or updates an existing order's information.
  * Delete - Deletes an existing order.
* [fulfillments](https://shopify.dev/docs/api/admin-rest/2024-07/resources/fulfillment#resource-object)
  * Create - Fulfills an existing unfulfilled order.
  * Update - Updates an existing fulfillment's information.
  * Upsert - Fulfills an existing unfulfilled order or updates an existing fulfillment's information.
  * Delete - Cancels an already fulfilled order.
* [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel)
  * Create - Creates a product variant from on a product.
  * Update - Updates the product variant information.
  * Upsert - Creates a product variant if it does not exist or updates an existing's product variant's information.
  * Delete - Deletes a product variant from a product.
* [inventory item levels](https://shopify.dev/docs/api/admin-graphql/latest/objects/inventorylevel)
  * Create - Creates an inventory level at a specified location with the location id.
  * Update - Updates the inventory level stock amount.
  * Upsert - Creates an inventory level at a specified location with the location id or update the inventory level stock amount if the inventory level does not exist.
  * Delete - Deletes the entire inventory level.

{% hint style="info" %}
Inventory levels cannot be deleted if this is the last remaining inventory level of the product variant.
{% endhint %}
