@wppconnect/wa-js - v3.19.3
    Preparing search index...

    Function accept

    • Accept an order

      This function performs TWO critical operations:

      1. Updates the order message's status field from INQUIRY (1) to ACCEPTED (2)
        • This hides the "Accept Order" button in the UI
      2. Sends an order status update message to the customer
        • Shows "Processing" or "Confirmed" status

      The order information is automatically retrieved from the message.

      Parameters

      • options: AcceptOrderOptions

      Returns Promise<void>

      // 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'
      });