{ 
  "app": "DemoApp", 
  "timestamp": 1580227766370,   
  "version": 2, 
  "type": "message",    
  "payload": {  
    "id": "ABEGkYaYVSEEAhAL3SLAWwHKeKrt6s3FKB0c",   
    "source": "918x98xx21x4",   
    "type": "text", 
    "payload": {    
      "text": "Hi"  
    },  
    "sender": { 
      "phone": "918x98xx21x4",  
      "name": "Andy",   
      "country_code": "91", 
      "dial_code": "8x98xx21x4" 
    }   
  } 
}

User replies to your message

Users can respond to a specific message on WhatsApp. To understand the context of a message reply, we include the context object. The context object provides the Gupshup message-id(property: gsId) of the message the user has replied to and the WhatsApp message-id(property: id) of the original message.

The following payload is an example of an inbound message when a user replies to a business message.

{
  "app": "DemoApp",
  "timestamp": 1590854464792,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkYaYVSEEAgo-sMx1DoUoQJRW",
    "source": "918x98xx21x4",
    "type": "text",
    "payload": {
      "text": "hi"
    },
    "sender": {
      "phone": "918x98xx21x4",
      "name": "Jacob",
      "country_code": "91",
      "dial_code": "8x98xx21x4"
    },
    "context": {
      "id": "gBEGkYaYVSEEAgnPFrOLcjkFjL8",
      "gsId": "9b71295f-f7af-4c1f-b2b4-31b4a4867bad"
    }
  }
}

User clicks the button on a quick reply template message

When your customer clicks on a quick reply button, a response goes to your Webhook URL. Below is an example of the callback format.

To understand the context of a message reply, we include the context object. The context object provides the Gupshup message-id(property: gsId) of the message the user has replied to and the WhatsApp message-id(property: id) of the original message. In addition to this payload, the object provides the button text that the user clicked.

{
  "app": "DemoApp",
  "timestamp": 1590854464792,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkYaYVSEEAgo-sMx1DoUoQJRW",
    "source": "918x98xx21x4",
    "type": "quick_reply",
    "payload": {
      "text": "View Account Balance",
      "type": "button"
    },
    "sender": {
      "phone": "918x98xx21x4",
      "name": "Gerald",
      "country_code": "91",
      "dial_code": "8x98xx21x4"
    },
    "context": {
      "id": "gBEGkYaYVSEEAgnPFrOLcjkFjL8",
      "gsId": "9b71295f-f7af-4c1f-b2b4-31b4a4867bad"
    }
  }
}

What’s Next

In the next chapter of this guide, you'll learn about inbound message type: Media