The Node.js SDK re-exports the WAJS namespace for TypeScript. This reference describes types from WA-JS 4.8.5-rc.0. For operations available on a connected Node.js client, see Whatsapp. For functions running inside WhatsApp Web, see the WA-JS browser API.
// 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.