Shopify

What it is

Shopify is an e-commerce platform. The integration connects the bot to your store's Admin API. The bot exports the catalog with prices and stock, checks whether a variant is available and sends an order placed in the chat to Shopify. It also reports the order status and shows the customer their order history. An order from the bot appears in the Shopify admin like any other — with line items, the customer and the shipping address — and stock is decremented.

Requirements

  • A Shopify store and access as the owner or a staff member allowed to create apps.
  • An app in the Shopify Dev Dashboard, created in the same organization as the store and installed in the store. It needs these access scopes:
    • read_products — catalog and products;
    • read_inventory — stock levels;
    • write_orders — creating and reading orders;
    • read_customers — finding the customer for their order history.
  • The store domain as your-store.myshopify.com. The store's custom domain doesn't work with the API.

How to connect

  1. Open the Shopify Dev Dashboard and create an app.
  2. In the app version settings grant the read_products, read_inventory, write_orders, read_customers scopes, release the version and install the app in your store.
  3. Copy the app's Client ID and Client Secret.
  4. In the constructor, open Integrations → find the Shopify card → Connect.
  5. Enter the store domain, Client ID and Client Secret. If the store already has a legacy app created in the admin, you can paste its Admin API token (shpat_…) instead of the Client ID and Secret.
  6. Save the connection and click Check connection. The reply shows the store name and currency.

Available operations

Operation What it does
Export catalog A page of products (up to 250): ID, title, lowest price, currency, image, link, availability, stock, first variant ID. Supports Shopify search and paging through next_cursor
Product and its variants The product description and all its variants: ID, title, SKU, price, availability, stock
Check availability By variant ID or SKU and the quantity needed, returns available = 1/0 with the stock and price
Create order Sends the order to Shopify: line items as variant_ID:quantity, email/phone, name, shipping address, note, tags, payment status. Returns the order number (#1001) and the status page link
Order details By number #1001 or ID shows the payment and fulfillment status, items, total and tracking number
Customer's orders Finds the customer by email or phone and returns their latest orders, newest first

Limitations

  • The store and the app must be in the same Shopify organization. The app token lasts 24 hours; Botconsole renews it automatically.
  • Apps can no longer be created directly in the Shopify admin (with a shpat_… token). Existing ones keep working, so the token field is still available.
  • Customer email, phone and address are Shopify protected customer data. If the app isn't approved for that data, operations that read customer data return a Shopify error.
  • write_orders without read_all_orders only sees orders from the last 60 days. Request read_all_orders for older history.
  • On development and trial stores Shopify allows at most 5 new orders per minute.
  • Shopify rate-limits API requests. Don't export the catalog in a loop without need — store the result in variables.

Notes

A typical sales flow: «Export catalog» → the customer picks a product → «Check availability» → «Create order» → the bot sends the customer the order number and the status_url link.

The order decrements stock according to the store's rules. If stock is short and overselling is off, Shopify refuses the order and the reply carries the error text.

By default the order is created as «Pending» payment with the botconsole tag, so orders from the bot are easy to find in the admin. Use «Paid» only when the payment has already happened in the bot.

The customer-facing order number is the name field (#1001). You can pass it to «Order details» as well.