Skip to content

feat(ecommerce): add Shopify store source and product status - #1661

Merged
sung17 merged 3 commits into
mainfrom
feat/shopify-store-source
Nov 7, 2026
Merged

sung17 merged 3 commits into
mainfrom
feat/shopify-store-source

Conversation

@sung17

@sung17 sung17 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A workspace can use a connected Shopify store as its product source: products, variants, stock, discount codes and orders are mirrored and stay read-only in ChatbotX.
  • Product.isActive becomes Product.status (active / draft / unlisted), so a product that is Draft in Shopify no longer shows as Active here. Only active products are shown and orderable.
  • In Shopify mode, the products table shows a status label instead of the on/off switch.

Changes

  • Database: one migration, 20261106045341_shopify_store_source. It adds IntegrationShopify, the storeSource and productStatus enums, and the source/externalId columns, then moves isActive into status (off → draft) and drops isActive.
  • Business: packages/business/src/shopify/ covers connecting, syncing and mapping (mapShopifyProductStatus). The order, product and webshop services now read status, and Shopify products refuse edits with shopifyManaged.
  • Worker: Shopify sync and webhook handlers in apps/worker/src/integration/handlers/shopify/.
  • Builder: the Shopify settings page, webhook route app/api/shopify/, ProductStatusBadge, and order export/detail.
  • Public API: products return status plus a deprecated isActive (derived from it). products.setActive maps to active/draft and does not apply to Shopify products.
  • Other: meta-catalog now maps from status.
  • i18n: products.fields.status added to all 21 locales.
  • Docs: docs/shopify.md, docs/ecommerce.md, AGENTS.md and the CLI README.

Test plan

  • pnpm --filter <all> check-types (65/65)
  • pnpm lint parts: agent instructions, invariants, ultracite and schema drift
  • Unit tests for products public API, product/order/webshop services, Shopify mappers and meta-catalog
  • All migrations apply cleanly on a fresh DB, and the schema matches a migrated local DB
  • Manual: connect a Shopify store, Sync, and check that Draft/Unlisted products show the right label and are hidden from the shop
  • After deploy: run Sync once per Shopify workspace so Unlisted products get the right status

🤖 Generated with Claude Code

@github-actions github-actions Bot added the feature New feature or request label Nov 6, 2026
Mirror a connected Shopify store's products, variants, stock, discount
codes and orders, read-only in ChatbotX. Product.isActive becomes
Product.status (active/draft/unlisted) so Shopify's status is kept as is;
only active products are shown and orderable. The public API keeps a
deprecated isActive derived from status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sung17
sung17 force-pushed the feat/shopify-store-source branch from e3532aa to e69ad98 Compare November 6, 2026 09:11
@sung17
sung17 merged commit ed7ed80 into main Nov 7, 2026
14 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
* feat(ecommerce): add Shopify store source and product status

Mirror a connected Shopify store's products, variants, stock, discount
codes and orders, read-only in ChatbotX. Product.isActive becomes
Product.status (active/draft/unlisted) so Shopify's status is kept as is;
only active products are shown and orderable. The public API keeps a
deprecated isActive derived from status.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(database): chain shopify snapshot after workspace owner index

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* refactor(business): drop unused initial page count in order export

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Deathgiver <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant