// Accept an order with default "Processing" status
await WPP.order.accept({
msgId: 'message_id_here',
acceptNote: 'Your order has been confirmed and is being processed'
});
// Accept with "Confirmed" status
await WPP.order.accept({
msgId: 'message_id_here',
orderStatus: WPP.order.OrderStatus.Confirmed,
acceptNote: 'Your order has been confirmed'
});
// Accept without a note
await WPP.order.accept({
msgId: 'message_id_here'
});
Accept an order
This function performs TWO critical operations:
The order information is automatically retrieved from the message.