Lyna
SupportBlogOpen Lyna
Get startedFeaturesIntegrationsPromptingTips & TricksChangelog
Shopify

AI Tools

Every Shopify action Lyna's AI can run from chat, and how each one is gated.

When a store is connected, Lyna's AI agent manages it for you from chat by calling Shopify tools. You describe what you want ("create three candle products", "publish everything to the Online Store", "set up a 10% welcome code") and Lyna runs the matching tools against your store.

Lyna works across two surfaces:

  • Storefront (client side): the public read and cart API your shoppers' browser talks to, using the public storefront access token that is safe to embed. Available at both connection levels.
  • Admin (server side, full access only): catalog management (products, collections, discounts, orders). Every Admin call is proxied through Lyna's server, which authenticates with short-lived Admin API tokens obtained from your app's Client ID and Client secret and owns the permission gate. Your credentials never reach the browser.

Connection levels

Which tools exist depends on how the project is connected:

  • Storefront connect: storefront tools only. Lyna can read the catalog through the Storefront API, scaffold and wire the storefront, and create carts for Shopify hosted checkout. Product management stays in the Shopify admin.
  • Full access: everything above, plus the Admin tools: products, variants, collections, discounts, inventory, orders, webhooks, and raw Admin GraphQL and REST access.

A project on Storefront connect can upgrade at any time from Settings > Integrations > Shopify > Upgrade to full access.

The workflow

  1. Lyna checks the connection status first.
  2. If no store is connected, Lyna shows a setup card so you can connect your store, then waits for you.
  3. Once connected, Lyna runs read tools freely and asks for approval on write tools, based on your permissions. Tools above the project's connection level are not available until you upgrade.

Read tools need no approval. Write tools are approval-gated: with the default "Ask each time" level, Lyna explains what it is about to do and waits for your confirmation. A tool set to "Never" returns a permission-denied result, and Lyna will not retry it.


Tools reference

The tables below list every Shopify tool, grouped by area, with its read or write classification. Write tools appear in the per-tool permission matrix and are approval-gated; read tools are available to any editor and are not individually gated. Each group also notes the connection level it needs: tools marked for Storefront connect work at either level, tools marked for full access only exist on a full access connection.

Connection and setup

Available at any connection level.

ToolTypeWhat it does
Check statusReadCheck whether a store is connected to the project.
Propose setupReadShow the connect setup card when no store is connected.
Get store create URLReadOpen Shopify's store-creation page for a new store.
Get storefront credentialsReadReturn the public storefront access token and shop domain for your app.
Disconnect storeWriteDisconnect the store from the project (owner only).

Products and variants

Requires a full access connection.

ToolTypeWhat it does
List productsReadList products in the store.
Get productReadFetch a single product with its variants and images.
Create productWriteAdd a product with variants, images, and pricing.
Update productWriteEdit a product's title, description, tags, status, or media.
Delete productWritePermanently remove a product.
Add product imageWriteAdd an image from a URL, an upload, or an AI-generated image.
Add product variantWriteAdd a variant such as a size or color.
Update product variantWriteEdit a variant's price, SKU, inventory, or options.
Delete product variantWriteRemove a variant from a product.

Collections

Requires a full access connection.

ToolTypeWhat it does
List collectionsReadList collections in the store.
Create collectionWriteGroup products into a new collection.
Update collectionWriteEdit a collection's title, description, or membership.
Delete collectionWriteRemove a collection.

Discounts and pricing

Requires a full access connection.

ToolTypeWhat it does
List discount codesReadList code-based discounts.
List price rulesReadList price rules.
Create discount codeWriteCreate a code with a percentage or fixed amount, dates, and limits.
Update discount codeWriteEdit a discount code's value, schedule, or limits.
Delete discount codeWriteRemove a discount code.
Create price ruleWriteCreate a price rule that defines how a discount applies.
Update price ruleWriteEdit a price rule's conditions or value.
Delete price ruleWriteRemove a price rule.
Create automatic discountWriteCreate a discount that applies automatically at checkout.
List automatic discountsReadList discounts that apply automatically at checkout.
Update automatic discountWriteEdit an automatic discount's value or schedule.
Delete automatic discountWriteRemove an automatic discount.
Create buy X get Y discountWriteCreate a "buy X get Y" promotion, automatic or code-based.
Create free shipping discountWriteCreate a free-shipping discount, automatic or code-based.
Create gift cardWriteIssue a gift card. The code is shown once, so relay it immediately.
List gift cardsReadList issued gift cards with masked codes.

Catalog automation

Requires a full access connection.

ToolTypeWhat it does
Create smart collectionWriteCreate a rule-based collection that auto-includes matching products.
Duplicate productWriteCopy an existing product as a starting point.
Bulk update pricesWriteUpdate prices for up to 250 variants in one call.
Set SEOWriteSet the SEO title, description, and handle for a product or collection.
Add product mediaWriteAttach an image, video, 3D model, or external video to a product.
Generate product imagesWriteGenerate images with AI and attach them to a product in one step.
Create product bundleWriteCreate a fixed bundle from several products.

Inventory and content

Requires a full access connection.

ToolTypeWhat it does
List locationsReadList the store's inventory locations.
Get shopReadRead store name, currency, and plan.
List metaobjectsReadList entries of a custom content type.
Set inventoryWriteSet available inventory for a variant at a location (absolute quantity).
Adjust inventoryWriteChange inventory by a delta (positive or negative) across locations.
Set metafieldWriteCreate or update a metafield on a product, collection, or other resource.
Create metaobject definitionWriteDefine a custom content type for structured content.
Create metaobjectWriteAdd an entry of a custom content type.
Upload fileWriteUpload an image or file to the store's content library.
Create pageWriteCreate an Online Store page.
Update pageWriteEdit an Online Store page.
List pagesReadList Online Store pages.
Create blog articleWritePublish a blog article (the blog is created if needed).
List blog articlesReadList blog articles.
Set menuWriteCreate or update a navigation menu by handle.
List menusReadList navigation menus.

Orders and customers

Requires a full access connection.

ToolTypeWhat it does
List ordersReadList recent orders.
Get orderReadRead a single order.
List fulfillmentsReadList an order's shipments and tracking.
List customersReadList customers.
Get customerReadRead a single customer.
Create draft orderWriteDraft an order for a customer before it is finalized.
Complete draft orderWriteTurn a draft order into a real order.
Refund orderWriteRefund an order. Lyna derives safe amounts from Shopify's suggested refund.
Cancel orderWriteCancel an order with a reason.
List fulfillment ordersReadList an order's fulfillment orders and any holds.
Create fulfillmentWriteFulfill an order, optionally with tracking.
Update trackingWriteUpdate the tracking info on a fulfillment.
Set fulfillment holdWritePlace or release a hold on a fulfillment order.
List abandoned checkoutsReadList abandoned checkouts for recovery.
Create customerWriteCreate a customer record.
Update customerWriteEdit a customer. Tags replace the existing set, so read and merge first.
Set customer marketing consentWriteSet a customer's email or SMS marketing consent.

Reading customer and order data goes through your own app, and Shopify may require protected customer data approval on that app before those reads work on a production store. Development stores are exempt. If a read reports missing access, request the protected customer data permissions in your app's settings on Shopify, and make sure the related scopes are in the app version you released.

Sales channels

Requires a full access connection.

ToolTypeWhat it does
List publicationsReadList the store's sales-channel publications.
Publish productWritePublish a product to a sales channel so it appears on your storefront.
Publish all productsWritePublish every product to a sales channel in one step.

Payments

ToolTypeWhat it doesRequires
Get payment settingsReadRead the store's currency and supported wallet configuration.Full access
Create checkoutWriteMint a cart and return a hosted checkout URL to start a purchase.Storefront connect

Webhooks

Requires a full access connection.

ToolTypeWhat it does
List webhooksReadList the webhook subscriptions registered for the store.
Create webhookWriteSubscribe an endpoint to a webhook topic.
Delete webhookWriteRemove a webhook subscription.

Markets

Requires a full access connection.

ToolTypeWhat it does
List marketsReadList the store's international selling regions and base currency.
Create marketWriteAdd an international market (region and currency).
Update marketWriteEdit a market's regions or settings.
Delete marketWriteRemove a market.
List selling plan groupsReadList subscription plans (display and purchase existing plans only).

Storefront reads

These typed reads work on any connection, including a Storefront-only connect, so the AI can browse the catalog without Admin access.

ToolTypeWhat it does
Storefront productsReadList products from the public Storefront API.
Storefront productReadRead one product by handle or id, with variants.
Storefront collectionsReadList collections from the public Storefront API.
Storefront searchReadSearch the catalog from the public Storefront API.
Storefront recommendationsReadGet related or complementary product recommendations.

Bulk operations

Requires a full access connection. One bulk operation runs per store at a time.

ToolTypeWhat it does
Run bulk queryWriteExport large datasets with a background bulk query.
Run bulk mutationWriteApply large batches of writes with a background bulk mutation.
Get bulk operationReadCheck the status of the running or last bulk operation.
Cancel bulk operationWriteCancel the running bulk operation.

Storefront and functions

ToolTypeWhat it doesRequires
Set storefront variablesWriteWrite the Storefront API environment variables into your app.Storefront connect
Scaffold storefrontWriteAdd the Storefront client plus starter product and cart routes.Storefront connect
Scaffold Shopify FunctionWriteGenerate a Shopify Function extension for discounts, validation, or checkout logic.Full access
Enable shopping assistantWriteTurn on the AI shopping assistant and wire it into the storefront (bills your wallet per shopper message).Storefront connect
Disable shopping assistantWriteTurn the assistant off and remove its keys.Storefront connect

The storefront scaffold is modular. Beyond the product and cart routes, you can ask Lyna to add optional modules (each is additive and never overwrites your files): a search page, customer accounts and orders, product reviews, international markets and currency, a wishlist, related-product recommendations, subscription (selling plan) options, and the shopping assistant widget. Structured-data SEO helpers are always included.

Raw API access

ToolTypeWhat it doesRequires
Admin GraphQL queryReadRun any read query against the Admin GraphQL API.Full access
Admin REST readReadSend a GET request to the Admin REST API.Full access
Storefront GraphQLReadRun a query against the public Storefront API.Storefront connect
Admin GraphQL mutationWriteRun any write operation against the Admin GraphQL API.Full access
Admin REST writeWriteSend POST, PUT, PATCH, or DELETE to the Admin REST API.Full access

Shopping assistant

The scaffolded storefront ships a floating shopping-assistant widget. Out of the box it does instant product search against the public Storefront API, at no cost and with no server. You can upgrade it to a conversational AI assistant that answers open questions like "what is a good gift under $50?" and returns matching products.

Turn it on from chat: ask Lyna to enable the shopping assistant (and approve the request). It is approval gated because each shopper message is billed to your Lyna wallet, up to a daily cap you choose. On approval Lyna mints a public assistant key, writes VITE_LYNA_ASSISTANT_URL and VITE_LYNA_ASSISTANT_KEY into your project's .env, and restarts the dev server, so the widget goes live with no manual step. Keep the project preview open so Lyna can write the env file. Ask Lyna to disable it to revoke the key and remove those variables; the widget then falls back to local search.

The assistant is storefront only: it can search the catalog, answer product and policy questions, add items to the cart, and hand off to Shopify hosted checkout. It never touches admin data or customer orders, and the key it uses is public (safe to ship in your site), not a secret. Each shopper message is billed to the store owner's Lyna account, up to the daily cap.


Example prompts

Storefront prompts (scaffolding, displaying products, cart, test checkout) work at either connection level. Catalog prompts (creating products, collections, discounts, inventory) need a full access connection.

  • "Create three candle products with prices, descriptions, and images, then publish them to the Online Store."
  • "Add Small, Medium, and Large variants to the t-shirt, each at $24.99."
  • "Make a Summer Sale collection with the floral dresses."
  • "Create a discount code SUMMER15 for 15% off, valid through August."
  • "Set up an automatic 10% discount for orders over $100."
  • "Set inventory for the blue mug to 40 at my main location."
  • "Scaffold the storefront in my app with product listing and cart routes, then wire it to the connected store."
  • "Display the products from my store on the home page in a grid."
  • "Build a wishlist feature backed by the Storefront API."
  • "Add the AI shopping assistant to my storefront with a $2 daily budget."
  • "Create a test checkout so I can verify the purchase flow."

The storefront Lyna generates targets your project's stack (a React app with TypeScript). Cart and checkout use the Storefront cart mutations and redirect shoppers to Shopify's hosted checkout, so there is never a custom payment form holding card data.