Response Message Webhook

When user completes the flow, a message is sent to WhatsApp chat. You will receive that message through a webhook which you normally use to process chat messages from the user. Below is the structure of flow response message webhook payload:

{
  "messages": [{
    "context": {
      "from": "16315558151",
      "id": "gBGGEiRVVgBPAgm7FUgc73noXjo"
    },
    "from": "<USER_ACCOUNT_NUMBER>",
    "id": "<MESSAGE_ID>",
    "type": "interactive",
    "interactive": {
      "type": "nfm_reply",
      "nfm_reply": {
        "name": "flow",
        "body": "Sent",
        "response_json": "{\"flow_token\": \"<FLOW_TOKEN>\", \"optional_param1\": \"<value1>\", \"optional_param2\": \"<value2>\"}"
      }
    },
    "timestamp": "<MESSAGE_SEND_TIMESTAMP>"
  }]
}
Parameter Description

context

object

Context of the message that the user replied to. Context object contains message_id of flows request message and sender number.

context.from

string

User's WhatsApp account number

context.id

string

Message ID

context.type

string

Always interactive

interactive.type

string

Always nfm_reply

interactive.nfm_reply.name

string

flow

interactive.nfm_reply.body

string

Always Sent

interactive.nfm_reply.response_json

string

Flow-specific data. The structure is either defined in flow JSON (see Complete action) or, if flow is using an endpoint, controlled by endpoint (see Final Response Payload in Data Exchange Request)

timestamp

string

Time of flow response message