> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Shopify

**Authentication:** OAuth or private app credentials. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* List orders placed in the last 24 hours over \$500, by customer.
* Find products with inventory below reorder point and email the buyer.
* Pull total revenue by SKU for Q1.

## Available Tools

#### list\_customers

List customers with pagination and search. Use page\_info cursor for next page

#### get\_customer

Get a customer by ID. Use list\_customers to find valid customer IDs

#### create\_customer

Create a customer. At least one of email, phone, first\_name, or last\_name required. Use list\_customers to check for duplicates

#### update\_customer

Update a customer by ID. Use get\_customer to verify the customer exists first

#### delete\_customer

Delete a customer. This action is irreversible. Use list\_customers to find valid IDs

#### update\_customer\_email\_marketing\_consent

Update email marketing consent for a customer. Use get\_customer to find the customer ID first

#### list\_inventory\_levels

List inventory levels across locations. Use list\_locations to find valid location IDs. Use page\_info cursor for next page

#### adjust\_inventory\_quantities

Adjust inventory quantities at specific locations. Use list\_inventory\_levels to find inventory item IDs and list\_locations for location IDs

#### list\_orders

List and filter orders by status, dates, financial/fulfillment status. Use page\_info cursor for next page

#### get\_order

Get an order by ID. Use list\_orders to find valid order IDs

#### create\_order

Create a new order. Use list\_products to find valid variant IDs for line items

#### update\_order

Update an order. Only email, note, tags, and shippingAddress can be updated. Use get\_order to check state

#### cancel\_order

Cancel an order with reason and refund/restock options. Use get\_order to check order state first

#### mark\_order\_paid

Mark an order as paid. Order must have pending/authorized/partially\_paid status. Use get\_order to verify

#### debug\_order\_fulfillment

Debug order fulfillment status and fulfillment orders. Use get\_order first to check basic order info

#### list\_products

List products with pagination and filtering. Use page\_info.endCursor for next page

#### get\_product

Get a product by ID. Use list\_products to find valid product IDs

#### create\_product

Create a new product. Title is required, status defaults to draft

#### update\_product

Update an existing product. Use get\_product to verify the product exists first

#### delete\_product

Delete a product. Use list\_products to find valid product IDs. This action is irreversible

#### set\_product\_bulk

Create multiple products in bulk. Each product must include a title. Use list\_products to verify results

#### create\_product\_variants\_bulk

Create multiple variants for a product. Use get\_product to check existing variants first

#### update\_product\_variants\_bulk

Update multiple product variants. Use get\_product to find variant IDs. Handles price, SKU, and inventory

#### update\_product\_variant

Update a single product variant by ID. Use get\_product to find variant IDs

#### get\_shop\_info

Get shop information including name, email, domain, currency, timezone, and plan details

#### list\_locations

List all locations for the shop. Use page\_info.endCursor for next page

#### edit\_order\_line\_items

Modify order line items using Shopify's 3-step edit flow. Set quantity to 0 to remove an item. Use get\_order to find line\_item\_id values first.