SHOPLINE: connect an International store over OAuth
SHOPLINE (the International platform at myshopline.com) connects over the registered OAuth app: enter the store handle, approve the scopes on SHOPLINE, done. Agents then read store info, products and orders, compute an exact server-side sales summary, watch daily orders/revenue for anomalies, and — when write scopes are granted — change products, prices and inventory through approval-gated writes, the irreversible ones always decided by a person. Access tokens live about 10 hours and refresh automatically.
Which SHOPLINE this is (and isn't)
Two different platforms share the SHOPLINE name. This integration covers the INTERNATIONAL platform — stores whose admin lives at your-store.myshopline.com (developer.shopline.com APIs).
Stores on *.shoplineapp.com (SHOPLINE Taiwan/Hong Kong) run a completely different API and cannot connect here.
Connect a store
On /integrations, open the SHOPLINE card, enter the store handle (my-store or my-store.myshopline.com) and click Authorize via SHOPLINE. You'll approve the app's scopes on SHOPLINE and land back on the integrations page.
Or install Agent Planners from the SHOPLINE App Store: SHOPLINE asks you to approve the app's access on a full page, then you sign in to Agent Planners (or create a free account), choose Connect store for the workspace you are in, and land back on the app inside your SHOPLINE admin, which then shows the workspaces that use the store. Opening the app from the admin later (Apps → Agent Planners) can connect the store to another workspace too.
The sign-in always opens on a full page, never inside the SHOPLINE admin: Google's sign-in refuses to be shown in a frame and browsers block the cookies a sign-in needs there. The app's page in your admin also has Report a problem with AI output — and so does Agent Planners' Help menu (the ? button).
The consent screen lists exactly the scopes this deployment requests (by default read scopes for store information, products, orders, customers and inventory, plus write scopes for products, orders and inventory); the store's row shows what SHOPLINE actually granted, and Sync scopes re-reads it. Granting write scopes does NOT make the agent autonomous — every store change still goes through the approval step before it runs (only a task or schedule you put on auto-approve, or an API key minted for autonomous writes, skips it, and never for a change a person must decide), and each typed write checks the grant for its scope first.
Generate a private-app Admin token (no OAuth app needed)
The fastest path when you manage the store yourself: create a private app in the store admin and paste its token. You need store-admin access.
- 1In the SHOPLINE store admin, go to Apps → Develop Apps and click Create app (name it e.g. “Agent Planners”).
- 2Open the app's permission settings and grant the Admin API permissions you want the agent to have — read store information/products/orders/customers/inventory, plus locations and discounts for the inventory and discount-code tools, and write permissions (products, inventory, discounts, marketing events) if you want approval-gated store changes.
- 3Switch to API credentials and click Install App to bind the app to the store.
- 4Under Admin API access token, click to view the token — SHOPLINE emails a verification code to your login address; enter it, then copy the token.
- 5In Agent Planners, open Integrations → SHOPLINE → Connect store, choose “+ Admin token”, enter the store handle (my-store or my-store.myshopline.com) and paste the token, then click “Validate + connect”.
What the agent can do
| Capability | Tool | Notes |
|---|---|---|
| Store health / report header | get_shop_info | Name, currency, timezone. |
| Products | get_products | Status, vendor, price range, inventory (limit 50 per page). |
| Orders | get_orders | Totals, financial/fulfillment status, line items (limit 100). |
| Sales numbers | sales_summary | Exact server-side aggregation: revenue, AOV, by-day series, top products. |
| Monitoring | detect_anomalies | Daily orders + revenue vs a weekday-aware baseline. |
| Anything else (read) | admin_get | Any documented Admin REST GET path — customers, fulfillment orders… |
| Store changes | admin_mutate | POST/PUT/DELETE + path + payload. Approval-gated, single-attempt, response verified; every DELETE, and a write to a money, inventory-level or storefront-code path, waits for a person. |
| Customers (masked) | get_customers | customers/v2/search.json — counts, state, tags and spend; names, email and phone only when a person's own request in an interactive task asks for identified customers (never over MCP, in an autonomous run, on a schedule or on a dashboard), and SHOPLINE masks email and phone even then. |
| Locations and inventory | list_locations / get_inventory_levels | The location ids and the available quantity per item and location an inventory change needs. |
| Discount codes | list_discount_codes | Title, status, dates, usage, codes and value (the 0–1 percentage shown as a percent too). |
| Landing URL | get_landing_url | A UTM-tagged storefront URL — existing parameters kept, values encoded once, nothing written. |
| Typed store changes | create / update / set status / delete discount codes, update_inventory, set_inventory, update_product, update_variant_prices, create_marketing_event | Each approval-gated. Inventory is read for every pair before anything is set; deleting a code, an absolute set, repricing, deactivating a code (or ending / postponing it by date), a discount of 50 % off or more and a product status flip wait for a person. |