Синхронизация опубликованных товаров Medusa с Greta и безопасное получение черновиков товаров.
connects a Medusa v2 store to Greta's CMS connector API. It syncs published products as discoverable content and can import Greta work as unpublished Medusa product drafts. It never publishes or updates an existing product.
Add this entry to the array in your existing :
Set these environment variables in both the server and worker deployment (scheduled jobs run in the worker):
The plugin runs its published-product sync hourly. The connection must already be enabled in Greta. No products, credentials, or draft content are read until and a valid connector key are set.
The plugin queries Medusa products using and sends only the product ID, title, handle, subtitle, description, and update timestamp. It does not send prices, inventory, customer/order data, images, or unpublished products. The default canonical URL is ; set to the public storefront origin.
Draft import is opt-in. Enable only when you want Greta content delivered to Medusa as catalog drafts. Products are created with , a deterministic handle, and an idempotency marker. A repeated delivery reuses the matching draft rather than creating another product. The connector never changes status to published. Draft delivery also requires the Greta key to have and scopes.
Build before publishing:
The connection, content-sync, and draft-delivery endpoints are provided by Greta's CMS connector service.
npm install @questlabs/greta-medusa-plugin1{2 resolve: "@questlabs/greta-medusa-plugin",3 options: {},4}1GRETA_CMS_ENABLED=true2GRETA_CMS_API_KEY=grc_sk_... # generated once by Greta for this Medusa store3GRETA_CMS_API_URL=https://app.greta.sh/api/greta/cms4GRETA_CMS_SITE_URL=https://www.example.com5GRETA_MEDUSA_IMPORT_DRAFTS=false1npm run build2npm test3npm publish --access public