Skip to main content

addOrderActivityLog

Add an activity log message to an order's history. Used to track order lifecycle events (e.g., status changes, shipment creation, payment capture).

Import

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

Syntax

addOrderActivityLog(
orderId: number,
message: string,
notifyCustomer: boolean,
connection: PoolClient
): Promise<OrderActivityRow>

Parameters

orderId — The order's database ID.

message — The activity log message.

notifyCustomer — Whether the customer was notified about this activity.

connection — A database connection (PoolClient) for transaction support.

Examples

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

await addOrderActivityLog(
orderId,
'Payment captured via Stripe',
false,
connection
);

See Also