Skip to content

fix(platform): count every Shopify order in count_orders - #5444

Merged
yannickmonney merged 1 commit into
trainfrom
fix/shopify-count-orders-all-statuses
Nov 14, 2026
Merged

yannickmonney merged 1 commit into
trainfrom
fix/shopify-count-orders-all-statuses

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

count_orders called Shopify's orders/count.json with no status. Shopify defaults that parameter to open, so closed and cancelled orders were left out of the count, although the action's description promises the total number of orders in the store.

  • count_orders now requests orders/count.json?status=any.
  • list_orders' status input description now says that leaving it out lists only open orders, which is the behaviour the request already had.

Why

The count was wrong for any store with closed or cancelled orders, and an agent would report that wrong number as the store's total. The fix is the request change the description already implies. Per the issue, the optional status input for count_orders is left out unless a maintainer asks for it.

How it was tested

  • New test in services/platform/lib/shared/schemas/shipped-connectors.test.ts (shopify: count_orders asks for every order status) runs the live body through inProcessLiveRunner with a fake ctx.http, and pins the requested URL to …/orders/count.json?status=any. Confirmed failing before the change (requested URL had no query), passing after.
  • shipped-connectors.test.ts, lib/mocks/contract/connectors.test.ts and lib/connectors/action-titles.test.ts: 153 passed.
  • backend/core/connector_credentials/catalog_docs.test.ts and lib/connectors/dispatcher.test.ts: 269 passed.
  • packages/shared/src/schemas/connectors.test.ts: 34 passed.
  • bun run --filter @tale/platform lint: exit 0. tsc --noEmit for services/platform: exit 0. oxfmt --check on both changed files: clean.

Vitest was run under Node 24 (the workspace's Node 22 here has no TypeScript support, and Bun's runtime fails to load zod/v4).

Locales: the status input description is a JSON Schema description for the agent, not a localized form field, so no locale files change. Docs: no page documents count_orders or the status input.

Fixes #5344

count_orders asked Shopify for its order count with no status. Shopify defaults that to open, so closed and cancelled orders were left out although the action promises every order. The request now carries status=any, and list_orders' status description says that leaving it out lists only open orders.

A test runs the live body against a fake HTTP context and pins the request URL.
@yannickmonney
yannickmonney force-pushed the fix/shopify-count-orders-all-statuses branch from 5a07f99 to ed9a570 Compare November 14, 2026 21:27
@yannickmonney
yannickmonney changed the base branch from main to train November 14, 2026 21:27
@yannickmonney
yannickmonney merged commit cb91a11 into train Nov 14, 2026
10 of 17 checks passed
@yannickmonney
yannickmonney deleted the fix/shopify-count-orders-all-statuses branch November 14, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(platform): count every Shopify order in count_orders

1 participant