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

    Function decline

    • Decline an order

      This function performs TWO critical operations:

      1. Updates the order message's status field from INQUIRY (1) to DECLINED (3)
        • This changes the UI to show the order as declined
      2. Sends an order cancellation message to the customer
        • Shows "Canceled" status with optional note

      The order information is automatically retrieved from the message.

      Parameters

      • options: DeclineOrderOptions

      Returns Promise<void>

      // Decline an order with a note
      await WPP.order.decline({
      msgId: 'message_id_here',
      declineNote: 'Sorry, we cannot fulfill this order at this time'
      });

      // Decline without a note
      await WPP.order.decline({
      msgId: 'message_id_here'
      });