×

This is a new type of incoming message for the WhatsApp Flows Message.Upon flow completion, a response message will be sent to the WhatsApp chat. You will receive it in the same way as you receive all other messages from the user - via message webhook. This response field will contain flow-specific data provided by the end-users after submitting the filled flow form.

Receive messages webhook can be passed in the status_callback parameter in send message/template message APIs to receive replies on messages from the business. To receive any message from an end user that is not a reply to a business message, a default callback value needs to be configured. The Exotel team will help you configure the default URL while onboarding.

  • If you pass receive messages webhook in send message/template message APIs, reply messages from users will be triggered to the respective URL 
  • If you do not pass any receive messages webhook in send message/template message APIs, reply messages from users will be triggered to the default URL, if any.
  • All user-initiated conversations and messages that are not a reply to business messages will be triggered to the default URL

*NOTE: Any messages from a user can be received only in one webhook at any time

Webhook Parameter

Parameter

Type

Mandatory

Value

whatsapp

Message ICM Object

Mandatory

Incoming message callback for Whatsapp

Message ICM Object

Parameter

Type

Mandatory

Value

messages

[]Whatsapp Message ICM Object

Mandatory

Information relating to the incoming messages from the end-users

Whatsapp Message ICM Object

Parameter

Type

Mandatory

Value

callback_type

String

Mandatory

Type of the callback. Possible values: dlr/icm

from

String

Mandatory

Number of the end user who has sent the incoming message to the business

to

String

Mandatory

Business number to whom the message was sent

profile_name

String

Mandatory

Profile Name of the user who has sent the incoming message

timestamp

String

Mandatory

Timestamp at which incoming message was sent

content

Content Object

Mandatory

Content related to the incoming message

Content Object

Parameter

Type

Mandatory

Value

type

String

Mandatory

Type of the message - interactive for Flow messages

sid

String

Mandatory

The unique message ID for this incoming message

interactive - type

String

Mandatory

For flow type of messages, this will be nfm_reply

interactive.nfm_reply.name

String

Mandatory

flow- Cloud API
galaxy_message - On-Premise API

interactive.nfm_reply.response_json

String

Mandatory

Flow-specific data. The structure is either defined in flow JSON or if the flow is using an endpoint, controlled by the endpoint 

error

MessageICMErrorObject

Optional

Check the below object for any error

 

{
    "whatsapp": {
        "messages": [
            {
                "callback_type": "incoming_message",
                "sid": "4743da5XXXXXXXXXX",
                "from": "+9188XXXXXXXX",
                "to": "+9122XXXXXXXX",
                "timestamp": "2023-10-21T12:35:00+05:30",
                "profile_name": "John",
                "content": {
                    "type": "interactive",
                    "context": {
                        "sid": "f317c72XXXXXXXXXXXXXXX"
                    },
                    "interactive": {
                        "type": "nfm_reply",
                        "nfm_reply": {
                            "body": "Sent",
                            "name": "galaxy_message",
                            "response_json": "{\"terms_and_conditions\":true,\"flow_token\":\"flows-builder-97XXXX\",\"vehicle_number\":\"74XXXX\",\"name\":\"John Shaw\",\"phone_number\":\"9180XXXXXXXX\",\"email\":\"emXXX@gmail.com\",\"cover_type\":\"0\"}"
                        }
                    }
                }
            }
        ]
    }
}

Message ICM Error Object

Parameter

Type

Mandatory

Value

exo_status_code

Integer

Mandatory

Exo Status Code for the error

exo_detailed_status

String

Mandatory

Detailed Status of the Exo Status Code

description

String

Mandatory

Description of the Exo Status code

 

{
   "whatsapp": {
     "messages": [
       {
         "callback_type": "incoming_message",
         "from": "1234",
         "profile_name": "John",
         "to": "5698",
         "timestamp": "1235654654",
         "content": {
type”: unsupported”,
           "error": {
             "exo_status_code": 24501,
             "exo_detailed_status": "EX_UNSUPPORTED_MEDIA_TYPE",
             "description": "The media type is currently not supported"
           }
         }
       }
     ]
   }
 }