<!-- Generated by `just docs` from catalog/toolkits/shopify.yaml, catalog/expansions/shopify.yaml, catalog/evals/scorecard.json. Edit the source, not this file. -->

# Shopify

Online store. Manage products, variants, and collections, work orders and fulfillments, issue refunds, and adjust inventory.

| Property | Value |
| --- | --- |
| Slug | `shopify` |
| Definition version | `0.2.1` |
| Base URL | `https://{{account.store}}.myshopify.com` |
| Auth schemes | `api_key` |
| Action tools | 39 |
| By class | 16 read, 18 write, 5 destructive |
| Triggers | 0 |
| Provider rate limit | 40 requests per 20s, per account |

## Measured routing accuracy

72 golden cases replayed through the router over the whole index: measured over corpus `ea4f12ad2948` (65 toolkits, 2283 tools indexed and 13 declared uncallable), 39 cases written by hand and 33 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

| Measure | Cases | Share |
| --- | --- | --- |
| top-1 | 37/72 | 51.4% |
| top-8 | 69/72 | 95.8% |

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. `just eval-live` measures the same cases through the live reranker.

## Authentication

Connect an entity with `ConnectionsService.InitiateConnection`, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

### `api_key`

| Property | Value |
| --- | --- |
| Placement | `header` |
| Name | `X-Shopify-Access-Token` |
| Rendered as | `{key}` |

Submit the key with `ConnectionsService` rather than putting it in a request; it is sealed at rest and never returned.

## Tools

39 action tools. The catalog-wide slug is `shopify.<tool>`, which is what `search_tools` returns and `call_tool` takes.

### `shopify.list_products`

List products in the Shopify catalog. Use when the user asks what products, items, or SKUs exist in the store, optionally filtered by status, vendor, or title. For one known product by id use get_product.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/products.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `limit` | integer | no | Maximum products to return. Default 50. |
| `status` | string, one of active, archived, draft | no | Restrict to products in this status. Omit for all statuses. |
| `title` | string | no | Restrict to products whose title exactly matches this. |
| `vendor` | string | no | Restrict to products from this vendor/brand name. |

Also retrieved by: "what products do I have in my shopify store", "show every item for sale on shopify", "what's in my shopify catalog", "find the id for a shopify product", "what SKUs does the store carry".

### `shopify.get_product`

Get one Shopify product's full detail by id: title, description, vendor, status, variants, and images. Use when the user names a specific product. For many products at once use list_products.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/products/{{params.product_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `product_id` | integer | **yes** | Shopify product id, from list_products. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `body_html` | string |  |
| `handle` | string |  |
| `id` | integer |  |
| `images` | array of object |  |
| `images[].id` | integer |  |
| `images[].src` | string |  |
| `product_type` | string |  |
| `status` | string |  |
| `tags` | string |  |
| `title` | string |  |
| `variants` | array of object |  |
| `variants[].id` | integer |  |
| `variants[].price` | string |  |
| `variants[].sku` | string |  |
| `variants[].title` | string |  |
| `vendor` | string |  |

Also retrieved by: "tell me about this shopify product", "pull up the details on this item in shopify", "what does this shopify listing say".

### `shopify.create_product`

Create a new product in the Shopify catalog. Use when the user wants to add, list, or publish a new item for sale. Requires a title; description, vendor, product type, tags, and status are optional.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/products.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `body_html` | string | no | Product description, HTML allowed. |
| `product_type` | string | no | Product category, e.g. "Snowboards". |
| `status` | string, one of active, archived, draft | no | Publish status. Default draft. |
| `tags` | string | no | Comma-separated tags. |
| `title` | string | **yes** | Product title. |
| `vendor` | string | no | Vendor or brand name. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `handle` | string |  |
| `id` | integer |  |
| `status` | string |  |
| `title` | string |  |

Also retrieved by: "add a new item for sale on shopify", "list a new product in the shopify store", "publish something new to sell on shopify".

### `shopify.update_product`

Edit an existing Shopify product's title, description, vendor, tags, or status. Use when the user wants to rename, retitle, republish, or unpublish a product already in the catalog.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PUT /admin/api/2024-10/products/{{params.product_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `body_html` | string | no | New product description, HTML allowed. |
| `product_id` | integer | **yes** | Shopify product id to edit, from list_products. |
| `status` | string, one of active, archived, draft | no | New publish status. |
| `tags` | string | no | New comma-separated tags, replacing the existing set. |
| `title` | string | no | New product title. |
| `vendor` | string | no | New vendor or brand name. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `status` | string |  |
| `title` | string |  |

Also retrieved by: "rename this shopify product", "change the description on this shopify listing", "edit a product's own details in shopify".

### `shopify.delete_product`

Permanently delete a product from the Shopify catalog, variants and images included. Use when the user wants to remove a product for good, not just unpublish it. Irreversible; prefer update_product with status "archived" when the user might want it back.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `DELETE /admin/api/2024-10/products/{{params.product_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `product_id` | integer | **yes** | Shopify product id to delete, from list_products. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `deleted` | boolean |  |

Also retrieved by: "permanently remove this item from the shopify store", "get rid of a shopify product for good", "wipe a listing off shopify entirely".

### `shopify.list_product_variants`

List the variants (size, color, or other option combinations) of one Shopify product, each with its own price and SKU. Use when the user asks what sizes, colors, or options a product comes in.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/products/{{params.product_id}}/variants.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `product_id` | integer | **yes** | Shopify product id, from list_products. |

Also retrieved by: "what sizes does this shopify product come in", "show the color options for this item on shopify", "what variants exist for this shopify listing".

### `shopify.update_variant`

Change one Shopify product variant's price, compare-at price, or SKU. Use when the user wants to reprice, discount, or relabel a specific size or color of a product. For stock counts use adjust_inventory_level instead.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PUT /admin/api/2024-10/variants/{{params.variant_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `compare_at_price` | string | no | New "was" price shown struck through. Empty string clears it. |
| `price` | string | no | New price, e.g. "24.99". |
| `sku` | string | no | New SKU. |
| `variant_id` | integer | **yes** | Shopify variant id, from list_product_variants. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `price` | string |  |
| `sku` | string |  |

Also retrieved by: "reprice this size or color on shopify", "change the sku for this shopify variant", "discount one option of this product on shopify".

### `shopify.list_collections`

List the manually curated collections (product groupings) in the Shopify store, e.g. "Summer Sale" or "New Arrivals". Use when the user asks what collections, categories, or groupings of products exist.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/custom_collections.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `limit` | integer | no | Maximum collections to return. Default 50. |
| `title` | string | no | Restrict to collections whose title exactly matches this. |

Also retrieved by: "what collections exist in my shopify store", "show the product groupings on shopify", "find the id for a shopify collection".

### `shopify.get_collection`

Get one Shopify collection's detail by id: title, description, and whether it's published. Use when the user names a specific collection. For every collection use list_collections.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/custom_collections/{{params.collection_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `collection_id` | integer | **yes** | Shopify collection id, from list_collections. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `body_html` | string |  |
| `handle` | string |  |
| `id` | integer |  |
| `published_at` | string |  |
| `title` | string |  |

Also retrieved by: "tell me about this shopify collection", "what's in this product grouping on shopify", "is this shopify collection published".

### `shopify.create_collection`

Create a new manually curated collection in the Shopify store. Use when the user wants to start, set up, or group products into a new collection or category. Add products to it with add_product_to_collection.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/custom_collections.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `body_html` | string | no | Optional collection description, HTML allowed. |
| `published` | boolean | no | Whether the collection is visible in the storefront. Default true. |
| `title` | string | **yes** | Collection title, e.g. "Summer Sale". |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `handle` | string |  |
| `id` | integer |  |
| `title` | string |  |

Also retrieved by: "start a new collection in shopify", "set up a fresh product category on shopify", "group products into a new collection on shopify".

### `shopify.add_product_to_collection`

Add a Shopify product to a collection. Use when the user wants to group, file, or feature a product under a collection or category that already exists. To create the collection first use create_collection.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/collects.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `collection_id` | integer | **yes** | Collection id to add it to, from list_collections. |
| `product_id` | integer | **yes** | Shopify product id to add, from list_products. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `collection_id` | integer |  |
| `id` | integer |  |
| `product_id` | integer |  |

Also retrieved by: "feature this item in a shopify collection", "file this product under a category on shopify", "put this item into an existing shopify grouping".

### `shopify.remove_product_from_collection`

Remove a Shopify product from a collection without deleting the product or the collection itself. Use when the user wants to un-feature, drop, or take a product out of a collection.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `DELETE /admin/api/2024-10/collects/{{params.collect_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `collect_id` | integer | **yes** | Id of the product-collection link to remove, returned by add_product_to_collection. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `removed` | boolean |  |

Also retrieved by: "take this item out of the shopify collection", "un-feature a product from a shopify grouping", "drop this product from a category on shopify".

### `shopify.list_orders`

List Shopify orders, optionally filtered by financial or fulfillment status. Use when the user asks what orders, sales, or purchases came in, e.g. unfulfilled or unpaid orders. For one known order use get_order.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/orders.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `financial_status` | string, one of pending, paid, refunded, partially_refunded, voided, any | no | Restrict to orders with this payment status. |
| `fulfillment_status` | string, one of shipped, partial, unshipped, any | no | Restrict to orders with this shipping status. |
| `limit` | integer | no | Maximum orders to return. Default 50. |
| `status` | string, one of open, closed, cancelled, any | no | Order open/closed status. Default open. |

Also retrieved by: "what orders came in on shopify", "show me unfulfilled sales on the store", "what purchases are sitting unpaid on shopify", "pull up recent shopify orders".

### `shopify.get_order`

Get one Shopify order's full detail by id: customer, line items, payment and fulfillment status, and totals. Use when the user names a specific order number or asks what's in an order.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/orders/{{params.order_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `order_id` | integer | **yes** | Shopify order id, from list_orders. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `created_at` | string |  |
| `currency` | string |  |
| `customer` | object |  |
| `customer.email` | string |  |
| `customer.first_name` | string |  |
| `customer.id` | integer |  |
| `customer.last_name` | string |  |
| `email` | string |  |
| `financial_status` | string |  |
| `fulfillment_status` | string |  |
| `id` | integer |  |
| `line_items` | array of object |  |
| `line_items[].id` | integer |  |
| `line_items[].price` | string |  |
| `line_items[].quantity` | integer |  |
| `line_items[].title` | string |  |
| `name` | string |  |
| `note` | string |  |
| `tags` | string |  |
| `total_price` | string |  |

Also retrieved by: "what's in this shopify order", "pull up order details from the store", "show me what this customer bought on shopify".

### `shopify.update_order`

Edit an existing Shopify order's internal note, tags, or contact email. Use when the user wants to annotate, tag, or correct an order's own details. Not for changing what was ordered or its status.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PUT /admin/api/2024-10/orders/{{params.order_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `email` | string | no | New contact email on the order. |
| `note` | string | no | New internal order note. |
| `order_id` | integer | **yes** | Shopify order id to edit, from list_orders. |
| `tags` | string | no | New comma-separated tags, replacing the existing set. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `note` | string |  |
| `tags` | string |  |

Also retrieved by: "add a note to this shopify order", "tag this order in the store", "change the contact email on a shopify order".

### `shopify.cancel_order`

Cancel a Shopify order that has not shipped. Use when the user wants to cancel, void, or call off a whole order, e.g. a customer changed their mind or it can't be fulfilled. Optionally restocks inventory and refunds the payment. Reverse the status alone with reopen_order, but a cancellation's refund and restock are not undone by it.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/orders/{{params.order_id}}/cancel.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `email` | boolean | no | Send the customer a cancellation email. Default true. |
| `order_id` | integer | **yes** | Shopify order id to cancel, from list_orders. |
| `reason` | string, one of customer, fraud, inventory, declined, other | no | Cancellation reason. Default other. |
| `restock` | boolean | no | Return cancelled line items to available inventory. Default true. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `cancel_reason` | string |  |
| `cancelled_at` | string |  |
| `id` | integer |  |

Also retrieved by: "call off this shopify order", "void a sale on the store, the customer changed their mind", "stop this order before it ships on shopify".

### `shopify.close_order`

Mark a Shopify order as closed (archived), removing it from the default open-orders view without cancelling or refunding it. Use when the user wants to archive or file away an order that's fully handled. Reverse with reopen_order.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/orders/{{params.order_id}}/close.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `order_id` | integer | **yes** | Shopify order id to close, from list_orders. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `closed_at` | string |  |
| `id` | integer |  |

Also retrieved by: "archive this shopify order", "file away an order that's fully handled on shopify", "hide this completed order from the open list".

### `shopify.reopen_order`

Reopen a Shopify order that was previously closed (archived). Use when the user wants to unarchive or bring an order back into the open orders view. Does not un-cancel a cancelled order.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/orders/{{params.order_id}}/open.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `order_id` | integer | **yes** | Shopify order id to reopen, from list_orders. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `closed_at` | string |  |
| `id` | integer |  |

Also retrieved by: "bring back a shopify order I closed", "unarchive this order in the store", "restore an order to the open list on shopify".

### `shopify.list_order_transactions`

List the payment transactions (charges, refunds, voids) recorded against a Shopify order. Use when the user asks how an order was paid, whether it was refunded, or wants a transaction id for create_refund.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/orders/{{params.order_id}}/transactions.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `order_id` | integer | **yes** | Shopify order id, from list_orders. |

Also retrieved by: "how was this shopify order paid", "was this order refunded on shopify", "show the charges recorded against this sale".

### `shopify.create_refund`

Refund money to the customer on a Shopify order, in full or for specific line items. Use when the user wants to refund, reimburse, or give money back on an order. Moves real money and is irreversible; requires a transaction id from list_order_transactions to refund against.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/orders/{{params.order_id}}/refunds.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `amount` | string | **yes** | Amount to refund, e.g. "19.99". |
| `note` | string | no | Optional internal note explaining the refund. |
| `notify` | boolean | no | Send the customer a refund notification email. Default true. |
| `order_id` | integer | **yes** | Shopify order id to refund, from list_orders. |
| `transaction_id` | integer | **yes** | Original charge transaction id, from list_order_transactions. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `created_at` | string |  |
| `id` | integer |  |
| `note` | string |  |

Also retrieved by: "give the customer their money back on shopify", "reimburse this shopify order", "process a refund for this sale".

### `shopify.list_fulfillment_orders`

List the fulfillment orders (shippable groupings of line items) for a Shopify order. Use to find the fulfillment_order_id create_fulfillment needs, or to check what still needs to ship on an order.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/orders/{{params.order_id}}/fulfillment_orders.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `order_id` | integer | **yes** | Shopify order id, from list_orders. |

Also retrieved by: "what still needs to ship on this shopify order", "show the shippable parts of this order", "find the fulfillment id for this shopify sale".

### `shopify.create_fulfillment`

Mark a Shopify order's items as shipped, with an optional tracking number. Use when the user wants to fulfill, ship, or dispatch an order. Requires a fulfillment_order_id from list_fulfillment_orders.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/fulfillments.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `fulfillment_order_id` | integer | **yes** | Fulfillment order id, from list_fulfillment_orders. |
| `notify_customer` | boolean | no | Send the customer a shipping notification email. Default true. |
| `tracking_company` | string | no | Carrier name, e.g. "UPS". Optional. |
| `tracking_number` | string | no | Carrier tracking number. Optional. |
| `tracking_url` | string | no | Tracking page URL. Optional. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `status` | string |  |
| `tracking_number` | string |  |

Also retrieved by: "mark this shopify order as shipped", "dispatch this order with a tracking number", "fulfill a sale on the store".

### `shopify.update_fulfillment_tracking`

Change the tracking number, carrier, or tracking URL on a Shopify fulfillment that's already been created. Use when the user wants to correct or add tracking info after marking an order shipped.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/fulfillments/{{params.fulfillment_id}}/update_tracking.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `fulfillment_id` | integer | **yes** | Fulfillment id to update, from create_fulfillment. |
| `notify_customer` | boolean | no | Send the customer an updated tracking email. Default true. |
| `tracking_company` | string | no | New carrier name. |
| `tracking_number` | string | no | New carrier tracking number. |
| `tracking_url` | string | no | New tracking page URL. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `tracking_number` | string |  |

Also retrieved by: "fix the tracking number on this shopify shipment", "add a carrier to this fulfillment", "correct the tracking url for an order I already shipped".

### `shopify.cancel_fulfillment`

Cancel a Shopify fulfillment that hasn't been picked up by the carrier yet, reopening its line items for a fresh fulfillment. Use when the user wants to stop, undo, or cancel a shipment that was marked shipped by mistake. Fails once the carrier has the package.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/fulfillments/{{params.fulfillment_id}}/cancel.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `fulfillment_id` | integer | **yes** | Fulfillment id to cancel, from create_fulfillment. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `status` | string |  |

Also retrieved by: "undo marking this shopify order shipped", "stop a shipment that hasn't left the warehouse yet", "cancel a fulfillment made by mistake on shopify".

### `shopify.list_customers`

List customers in the Shopify store. Use when the user asks who's bought from the store or wants to browse the customer list. For a specific person by name or email use search_customers.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/customers.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `limit` | integer | no | Maximum customers to return. Default 50. |

Also retrieved by: "who's bought from my shopify store", "show the customer list on shopify", "browse everyone who's ordered from the store".

### `shopify.get_customer`

Get one Shopify customer's full profile by id: name, contact info, order count, and lifetime spend. Use when the user names a specific customer by id. To find them by name or email use search_customers.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/customers/{{params.customer_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `customer_id` | integer | **yes** | Shopify customer id, from list_customers or search_customers. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `email` | string |  |
| `first_name` | string |  |
| `id` | integer |  |
| `last_name` | string |  |
| `orders_count` | integer |  |
| `phone` | string |  |
| `tags` | string |  |
| `total_spent` | string |  |

Also retrieved by: "pull up this shopify customer's profile", "how much has this person spent on the store", "show me this customer's order history summary".

### `shopify.search_customers`

Search Shopify customers by name, email, phone, or tag. Use when the user names a person rather than a customer id and wants the matching shopper found. For browsing everyone use list_customers.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/customers/search.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `limit` | integer | no | Maximum matches to return. Default 50. |
| `query` | string | **yes** | Search text, e.g. "email:sara@acme.com" or a plain name. |

Also retrieved by: "find a shopify customer by their email address", "look up someone by name in the store's customers", "match an email to a real shopify customer".

### `shopify.create_customer`

Add a new customer to the Shopify store. Use when the user wants to create, register, or file a new customer record, e.g. from a phone or in-person order. Requires at least a name or contact detail.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/customers.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `email` | string | no | Customer email address. |
| `first_name` | string | no | Customer first name. |
| `last_name` | string | no | Customer last name. |
| `phone` | string | no | Customer phone number. |
| `tags` | string | no | Comma-separated tags. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `email` | string |  |
| `id` | integer |  |

Also retrieved by: "add a new customer to the shopify store", "register a customer from a phone order", "file a new customer record on shopify".

### `shopify.update_customer`

Edit an existing Shopify customer's name, contact info, or tags. Use when the user wants to update, correct, or re-tag a customer record that already exists.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `PUT /admin/api/2024-10/customers/{{params.customer_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `customer_id` | integer | **yes** | Shopify customer id to edit, from list_customers or search_customers. |
| `email` | string | no | New email address. |
| `first_name` | string | no | New first name. |
| `last_name` | string | no | New last name. |
| `phone` | string | no | New phone number. |
| `tags` | string | no | New comma-separated tags, replacing the existing set. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `email` | string |  |
| `id` | integer |  |

Also retrieved by: "fix this shopify customer's email", "re-tag a customer record on the store", "correct a customer's phone number on shopify".

### `shopify.delete_customer`

Permanently delete a customer record from the Shopify store. Use when the user wants to erase or remove a customer entirely, e.g. a data deletion request. Irreversible; fails if the customer has existing orders, which must be handled first.

Class `destructive` (held by the mutation gate until the call's own arguments carry `"confirm": true`). No scopes beyond the connection's defaults. Calls `DELETE /admin/api/2024-10/customers/{{params.customer_id}}.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `customer_id` | integer | **yes** | Shopify customer id to delete, from list_customers or search_customers. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `deleted` | boolean |  |

Also retrieved by: "erase this customer from shopify entirely", "remove a customer record for a data deletion request", "permanently delete someone's shopify customer profile".

### `shopify.create_draft_order`

Create a Shopify draft order: a quote or invoice for line items that isn't a real order until paid. Use when the user wants to draft, quote, or invoice a custom or phone order before it's finalized. Finalize it with complete_draft_order.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/draft_orders.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `customer_id` | integer | no | Existing customer to bill, from list_customers. Optional. |
| `email` | string | no | Contact email for a customer not on file. Optional. |
| `line_items` | array of object | **yes** | Items on the draft, e.g. [{"variant_id": 123, "quantity": 2}]. |
| `line_items[].quantity` | integer | no |  |
| `line_items[].variant_id` | integer | no |  |
| `note` | string | no | Optional internal note on the draft. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `invoice_url` | string |  |
| `name` | string |  |
| `total_price` | string |  |

Also retrieved by: "draft a custom order for this customer on shopify", "quote a phone order before it's finalized", "invoice someone for a custom shopify purchase".

### `shopify.list_draft_orders`

List Shopify draft orders (quotes and invoices not yet completed). Use when the user asks what drafts, quotes, or pending invoices exist. For real, finalized orders use list_orders.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/draft_orders.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `limit` | integer | no | Maximum drafts to return. Default 50. |
| `status` | string, one of open, invoice_sent, completed | no | Restrict to drafts in this status. Default open. |

Also retrieved by: "what quotes are pending on shopify", "show unfinished invoices in the store", "what draft orders haven't been sent yet".

### `shopify.complete_draft_order`

Finalize a Shopify draft order into a real, payable order. Use when the user wants to complete, send, or turn a quote or invoice into an actual order. Optionally leave payment marked pending rather than collected immediately.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/draft_orders/{{params.draft_order_id}}/complete.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `draft_order_id` | integer | **yes** | Draft order id to complete, from list_draft_orders. |
| `payment_pending` | boolean | no | Mark payment as pending instead of collected now. Default false. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `order_id` | integer |  |
| `status` | string |  |

Also retrieved by: "turn this shopify quote into a real order", "finalize the draft and send it", "complete an invoice on the store".

### `shopify.get_inventory_level`

Get the available stock count for inventory items at one or more Shopify store locations. Use when the user asks how much stock, how many units, or what's left in inventory for a variant.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/inventory_levels.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `inventory_item_ids` | string | **yes** | Comma-separated inventory item ids, from list_product_variants' inventory_item_id. |
| `location_ids` | string | no | Comma-separated location ids to restrict to, from list_locations. |

Also retrieved by: "how much stock is left of this shopify variant", "what's the available count at this location", "check inventory for an item on shopify".

### `shopify.adjust_inventory_level`

Change the available stock count for one inventory item at one Shopify location, by a positive or negative delta. Use when the user wants to add, remove, or correct stock, restock a variant, or count inventory. Not for setting an absolute total; pass the difference.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/inventory_levels/adjust.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `available_adjustment` | integer | **yes** | Amount to add (positive) or remove (negative) from available stock, e.g. 10 or -3. |
| `inventory_item_id` | integer | **yes** | Inventory item id, from list_product_variants' inventory_item_id. |
| `location_id` | integer | **yes** | Store location id, from list_locations. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `available` | integer |  |
| `inventory_item_id` | integer |  |
| `location_id` | integer |  |

Also retrieved by: "restock this shopify variant by 10 units", "correct the stock count at a location", "add or remove inventory for an item on shopify".

### `shopify.list_locations`

List the physical or virtual locations (warehouses, stores) inventory is tracked at in Shopify. Use when the user asks what locations exist or wants a location id for get_inventory_level or adjust_inventory_level.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/locations.json`.

Takes no arguments.

Also retrieved by: "what warehouses does my shopify store have", "show the locations inventory is tracked at", "find a location id for a shopify stock check".

### `shopify.create_price_rule`

Create a Shopify price rule: the discount logic (percentage or fixed amount off, storewide or per-product) that a discount code attaches to. Use when the user wants to set up a sale or promotion's terms. Attach an actual code to it with create_discount_code.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/price_rules.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `customer_selection` | string, one of all, prerequisite | **yes** | Whether every customer qualifies or only specific ones. |
| `ends_at` | string (date-time) | no | When the rule expires, ISO 8601. Omit for no expiry. |
| `starts_at` | string (date-time) | **yes** | When the rule becomes active, ISO 8601. |
| `target_type` | string, one of line_item, shipping_line | **yes** | What the discount applies to. |
| `title` | string | **yes** | Internal name for the rule, e.g. "Summer 20 Off". |
| `value` | string | **yes** | Discount size, negative, e.g. "-20.0" for 20% or $20 off. |
| `value_type` | string, one of fixed_amount, percentage | **yes** | Whether value is a flat amount or a percentage. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `id` | integer |  |
| `title` | string |  |
| `value` | string |  |

Also retrieved by: "set up a sale on shopify", "define a discount for a promotion on the store", "configure percentage off for a shopify sale".

### `shopify.create_discount_code`

Attach a redeemable discount code to an existing Shopify price rule. Use when the user wants to create, generate, or issue a coupon or promo code customers can enter at checkout. Create the price rule first with create_price_rule.

Class `write` (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls `POST /admin/api/2024-10/price_rules/{{params.price_rule_id}}/discount_codes.json`.

Arguments:

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `code` | string | **yes** | The code customers type in, e.g. "SUMMER20". |
| `price_rule_id` | integer | **yes** | Price rule id the code belongs to, from create_price_rule. |

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `code` | string |  |
| `id` | integer |  |
| `usage_count` | integer |  |

Also retrieved by: "generate a coupon code for shopify checkout", "issue a promo code customers can use", "create a redeemable discount for the store".

### `shopify.get_shop`

Get the connected Shopify store's own details: name, domain, currency, and plan. Use when the user asks what store, shop, or account this is, or wants its default currency.

Class `read` (reads only). No scopes beyond the connection's defaults. Calls `GET /admin/api/2024-10/shop.json`.

Takes no arguments.

Result fields (the payload is trimmed to these before it reaches the model):

| Field | Type | Notes |
| --- | --- | --- |
| `currency` | string |  |
| `domain` | string |  |
| `email` | string |  |
| `id` | integer |  |
| `name` | string |  |
| `plan_name` | string |  |

Also retrieved by: "what shopify store is this", "what's the default currency for this account", "show the connected store's own details".
