> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify integration

[Back to list of enterprise systems](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems.md)

Use the Shopify integration to manage products, customers, orders, inventory, fulfillments, transactions, and files through Action Tools. It also provides triggers for checkout, order, customer, and product events.

| Authentication | Actions | Triggers |
| - | - | - |
| OAuth 2.0, OAuth 2.0 Client Credentials, or API Key | ([28](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems/shopify#supported-actions)) | ([6](https://koreai.mintlify.site/agent-platform/integrations/enterprise-systems/shopify#triggers)) |

## Supported actions

| Action | Use it to |
| - | - |
| [Adjust Inventory Level](#adjust-inventory-level) | Adjust an item's inventory at a location. |
| [Cancel Order](#cancel-order) | Cancel an order. |
| [Close Order](#close-order) | Close an order. |
| [Create Collect](#create-collect) | Add a product to a collection. |
| [Create Customer](#create-customer) | Create a customer. |
| [Create Draft Order](#create-draft-order) | Create a draft order. |
| [Create Fulfillment Event](#create-fulfillment-event) | Create an event for a fulfillment. |
| [Create Order](#create-order) | Create an order. |
| [Create Product](#create-product) | Create a product. |
| [Create Transaction](#create-transaction) | Create a transaction for an order. |
| [Get Asset](#get-asset) | Retrieve a theme asset. |
| [Get Customer](#get-customer) | Retrieve a customer. |
| [Get Customers](#get-customers) | Retrieve customers. |
| [Get Customer Orders](#get-customer-orders) | Retrieve a customer's orders. |
| [Get Fulfillment](#get-fulfillment) | Retrieve a fulfillment. |
| [Get Fulfillments](#get-fulfillments) | Retrieve an order's fulfillments. |
| [Get Locations](#get-locations) | Retrieve store locations. |
| [Get Product](#get-product) | Retrieve a product. |
| [Get Product Variant](#get-product-variant) | Retrieve a product variant. |
| [Get Transaction](#get-transaction) | Retrieve a transaction. |
| [Get Order Transactions](#get-order-transactions) | Retrieve an order's transactions. |
| [Update Customer](#update-customer) | Update a customer. |
| [Update Order](#update-order) | Update an order. |
| [Update Product](#update-product) | Update a product. |
| [Upload Product Image](#upload-product-image) | Upload an image to a product. |
| [Custom API Call](#custom-api-call) | Call a Shopify API endpoint. |
| [Get Products](#get-products) | Retrieve products with optional filters and a result limit. |
| [Custom GraphQL Query](#custom-graphql-query) | Run a custom GraphQL query with generated variable inputs. |

## Triggers

| Trigger | Fires when |
| - | - |
| New Abandoned Checkout | A checkout is abandoned. |
| New Cancelled Order | An order is cancelled. |
| New Customer | A customer is created. |
| New Order | An order is created. |
| Updated Product | A product is updated. |
| New Paid Order | A paid order is created. |

## Prerequisites

* A Shopify store and a user with permission to install or authorize an app and access the resources your tools need.
* A Shopify app configured for the chosen authentication method, with API access scopes appropriate for the actions and triggers you plan to use.
* The store's Shopify subdomain. Studio asks for the subdomain used in `<subdomain>.myshopify.com`.

## Set up the integration

**1. Create a Shopify auth profile**

In **Tools**, select **New Tool** > **Action** > **Shopify** > **Continue**, then select **Manage profiles**. In **Project Auth Profiles**, select **New Profile** > **Integration Profile** > **Shopify** > **Continue**. Choose **OAuth 2.0**, **OAuth 2.0 Client Credentials**, or **API Key**. Enter the Shopify store subdomain and the credentials for that method. For OAuth 2.0, add the callback URL shown in Studio to the Shopify app and authorize the profile. For Client Credentials, choose **Client Secret** or **JWT assertion** and provide the matching settings. For API Key, use the Shopify Admin API access token.

**2. Create the action tool**

In **Tools**, select **New Tool** > **Action** > **Shopify** > **Continue**. Select the **Action** and **Auth Profile**, configure the inputs, and select **Create Tool**. Then [assign the tool to an agent](https://koreai.mintlify.site/agent-platform/tools/actions.md#assign-an-action-to-an-agent).

## Action reference

The parameters below are the required inputs listed for each action in the connector catalog. Studio may also show optional settings for the selected action; configure those in the tool builder as needed.

> [accordion] Adjust Inventory Level
>
> | Required parameter | Description |
> | - | - |
> | `id` | Inventory item ID. |
> | `locationId` | Location ID for the inventory adjustment. |
> | `adjustment` | Quantity adjustment. |

> [accordion] Cancel Order
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order to cancel. |

> [accordion] Close Order
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order to close. |

> [accordion] Create Collect
>
> | Required parameter | Description |
> | - | - |
> | `id` | Product ID. |
> | `collectionId` | Collection ID. |

> [accordion] Create Customer
>
> No required parameters are listed in the connector catalog. Configure the customer fields shown in Studio.

> [accordion] Create Draft Order
>
> No required parameters are listed in the connector catalog. Configure the draft order fields shown in Studio.

> [accordion] Create Fulfillment Event
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order. |
> | `fulfillmentId` | ID of the fulfillment. |
> | `status` | Fulfillment event status. |

> [accordion] Create Order
>
> No required parameters are listed in the connector catalog. Configure the order fields shown in Studio.

> [accordion] Create Product
>
> | Required parameter | Description |
> | - | - |
> | `title` | Product title. |
> | `status` | Product status. |

> [accordion] Create Transaction
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order. |
> | `kind` | Transaction kind. |

> [accordion] Get Asset
>
> | Required parameter | Description |
> | - | - |
> | `key` | Theme asset key. |
> | `themeId` | ID of the theme. |

> [accordion] Get Customer
>
> | Required parameter | Description |
> | - | - |
> | `customerId` | ID of the customer. |

> [accordion] Get Customers
>
> No required parameters are listed in the connector catalog. Configure any available filters in Studio.

> [accordion] Get Customer Orders
>
> | Required parameter | Description |
> | - | - |
> | `customerId` | ID of the customer. |

> [accordion] Get Fulfillment
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order. |
> | `fulfillmentId` | ID of the fulfillment. |

> [accordion] Get Fulfillments
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order. |

> [accordion] Get Locations
>
> No required parameters are listed in the connector catalog.

> [accordion] Get Product
>
> | Required parameter | Description |
> | - | - |
> | `id` | ID of the product. |

> [accordion] Get Product Variant
>
> | Required parameter | Description |
> | - | - |
> | `id` | ID of the product variant. |

> [accordion] Get Transaction
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order. |
> | `transactionId` | ID of the transaction. |

> [accordion] Get Order Transactions
>
> | Required parameter | Description |
> | - | - |
> | `orderId` | ID of the order. |

> [accordion] Update Customer
>
> | Required parameter | Description |
> | - | - |
> | `customerId` | ID of the customer to update. |

> [accordion] Update Order
>
> | Required parameter | Description |
> | - | - |
> | `id` | ID of the order to update. |

> [accordion] Update Product
>
> | Required parameter | Description |
> | - | - |
> | `id` | ID of the product to update. |
> | `status` | Product status. |

> [accordion] Upload Product Image
>
> | Required parameter | Description |
> | - | - |
> | `id` | ID of the product. |
> | `image` | Image to upload. |

> [accordion] Custom API Call
>
> | Required parameter | Description |
> | - | - |
> | `url` | Shopify API endpoint URL. |
> | `method` | HTTP method for the request. |
> | `headers` | Request headers. |
> | `queryParams` | Query string parameters. |

> [accordion] Get Products
>
> No required parameters are listed in the connector catalog. Optional filters in Studio are `limit` (defaults to 50; maximum 250), `title` (contains, case-insensitive), `vendor`, `product_type`, and `status` (**Active**, **Archived**, or **Draft**).

> [accordion] Custom GraphQL Query
>
> | Required parameter | Description |
> | - | - |
> | `query` | GraphQL query to execute. Studio provides a default product query. |
>
> Studio generates inputs under `variableFields` from the query's declared variables. Optional `variables` lets you provide additional variables as JSON.

## Trigger reference

> [accordion] New Abandoned Checkout
>
> No input parameters. Fires when a checkout is abandoned.

> [accordion] New Cancelled Order
>
> No input parameters. Fires when an order is cancelled.

> [accordion] New Customer
>
> No input parameters. Fires when a customer is created.

> [accordion] New Order
>
> No input parameters. Fires when an order is created.

> [accordion] Updated Product
>
> No input parameters. Fires when a product is updated.

> [accordion] New Paid Order
>
> No input parameters. Fires when a paid order is created.

## Troubleshoot common issues

| Issue | Resolution |
| - | - |
| Authentication fails | Check the store subdomain and credentials. Confirm the Shopify app has the required API scopes and that the auth profile uses the matching OAuth 2.0, Client Credentials, or API Key method. |
| An action can't find or update a resource | Verify the Shopify resource ID and confirm the app or token has access to that resource and operation. |
| A product query returns no results | Check the title, vendor, product type, and status filters. Increase the result limit if needed; the maximum is 250. |
| A GraphQL query fails | Check the query syntax and declare each variable in the GraphQL operation. Use the generated variable inputs or provide additional values in `variables`. |
| A trigger doesn't return events | Confirm the selected auth profile belongs to the expected store and that the app has access to the relevant event data. |

## Related articles

* [Auth profiles](https://koreai.mintlify.site/agent-platform/administration/integrations-settings.md#auth-profiles)
* [Action Tools](https://koreai.mintlify.site/agent-platform/tools/actions.md)
* [Shopify developer documentation](https://shopify.dev/docs)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.