Внутренние комментарии к заказам с указанием автора и полной историей для Medusa Admin.
Add private, attributed comments to orders in the Medusa Admin. The plugin keeps the complete comment history next to the order and highlights the latest entry.
Medusa documentation · Report an issue
Comments are internal to the Admin API. No Store API route is registered.
Medusa 2.17.2 is the minimum because this plugin uses the current layout injection zone.
Install the plugin in the Medusa application's backend directory:
Register it in :
Run the plugin migration and rebuild/start Medusa:
During development, use instead of the last two commands.
Open an order in Medusa Admin. The Order comments widget appears in the side column. On Medusa versions with layout configuration, an administrator can move the widget to another position on the order page.
Both routes use Medusa's standard admin authentication.
GET /admin/orders/{order_id}/commentsThe endpoint deliberately returns the complete history, sorted from newest to oldest.
Comments are trimmed, must not be empty, and can contain up to 5,000 characters. The author is always taken from the authenticated admin session; clients cannot impersonate another author.
Medusa doesn't expose a supported extension point for inserting custom records into the core order Activity timeline. This plugin therefore renders its own complete history in the documented widget zone. It does not patch or import private Dashboard internals.
Comments are append-only from the public plugin API. The plugin intentionally doesn't expose edit or delete routes, which keeps the order's internal audit trail understandable. Medusa's generated soft-delete support remains available to custom server-side code using the module service.
The plugin stores a snapshot of the author's name and email with every comment. This is useful for attribution, but it also means comment rows contain personal data. Include this table in your organization's retention and data-access policies.
Module integration tests require PostgreSQL and the , , , and environment variables.
To test the package in another Medusa application with Medusa's local registry:
npx medusa plugin:publishThen, in the target Medusa backend:
npm install medusa-plugin-order-comments1import { defineConfig } from "@medusajs/framework/utils"2
3module.exports = defineConfig({4 plugins: [5 {6 resolve: "medusa-plugin-order-comments",7 options: {},8 },9 ],10})1npx medusa db:migrate2npm run build3npm run start1{2 "comments": [3 {4 "id": "ordcom_...",5 "order_id": "order_...",6 "content": "Call the customer before shipping.",7 "author_id": "user_...",8 "author_email": "admin@example.com",9 "author_first_name": "Ada",10 "author_last_name": "Lovelace",11 "created_at": "2026-09-17T12:00:00.000Z",12 "updated_at": "2026-09-17T12:00:00.000Z"13 }14 ]15}1POST /admin/orders/{order_id}/comments2Content-Type: application/json3
4{5 "content": "Call the customer before shipping."6}1corepack enable2pnpm install3pnpm test:unit4pnpm test:integration:modules5pnpm lint6pnpm typecheck7pnpm build1npx medusa plugin:add medusa-plugin-order-comments2npx medusa db:migrate