Skip to main content

registerShipmentStatus

Register a new shipment status. Must be called during bootstrap.

Import

import { registerShipmentStatus } from '@evershop/evershop/oms/services';

Syntax

registerShipmentStatus(
id: string,
detail: ShipmentStatus,
psoMapping?: Record<string, string>
): void

Parameters

id — Unique status identifier (no spaces). Example: 'in_transit'.

detail — Status definition object:

  • name (string, required) — Display name
  • badge (string, required) — Visual style
  • isDefault (boolean) — Initial status for new orders
  • isCancelable (boolean) — Whether this status allows cancellation

psoMapping (optional) — Maps {paymentStatus}:{shipmentStatus}orderStatus.

Examples

import { registerShipmentStatus } from '@evershop/evershop/oms/services';

export default async () => {
registerShipmentStatus('in_transit', {
name: 'In Transit',
badge: 'attention',
isDefault: false
}, {
'paid:in_transit': 'processing'
});
};

See Also