Inbound Chat Apps message

Inbound Messages are messages sent to you by users, on one of the channels you linked with your 8x8 account. Once this happens, 8x8 sends you this message to your webhook.

Requirements

To use 8x8 inbound Chat Apps capabilities, you need:

  • An account configured to use Chat Apps product.
  • A webhook to indicate to us which URL 8x8 platform should forward the inbound messages addressed to you.

📘

You can configure your callback using Webhook Configuration API

Inbound message flow example

  1. A user sends a message to your WhatsApp number
  2. 8x8 Platform receives the message on your behalf
  3. 8x8 Platform programmatically transmits the message to the callback URL configured for your webhook including all the information linked to the message.

Retry logic

In case of connection error/timeout or HTTP response code 4XX or 5XX, there will be multiple retry attempts with progressive intervals: 1, 10, 30, 90 sec.

Webhook format

Request body description

Parameter nameParameter typeDescription
namespacestringA generic namespace for incoming webhook.
Equal to Chat Apps for inbound Chat Apps message.
eventTypestringWebhook type.
Equals to inbound_message_received for inbound Chat Apps message.
descriptionstringHuman-readable description of the incoming event
payloadobjectInbound message information, see below.

Payload object description

Parameter nameParameter typeDescription
umiduuidUnique message ID for the inbound message
subAccountIdstringId of the sub-account which owns the virtual number.
timestampstringUTC date and time when the message was received expressed in ISO 8601 format.
userobjectInformation about the user the message is associated with.
recipientobjectRecipient information, see below
typestringInbound message type. Possible values:
- none
- text
- audio
- video
- image
- location
- file
- carousel
- list
- buttons
- template
contentobjectMessage content
replyToUmiduuidOptional context data, if this inbound message is referring to a previous inbound message (ex, quoted messages on WhatsApp).

User information object description

Parameter nameParameter typeDescription
msisdnstringPhone number expressed in E.164 international format.
channelUserIdstringId of the user in the channel
namestringUser's name in the channel

Recipient information object description

Parameter nameParameter TypeDescription
channelstringChannel type, please see List of supported Chat Apps channels for details.
channelIdstringChannel user identifier.
phonestringRecipient phone number expressed in E.164 international format.
countrystring2 letters country code (ISO 3166-1 alpha-2)

Content information object description

Parameter nameParameter typeDescription
textstringMessage text (for payload with type = text)
urlstringThe URL of the media attachment (rich content) if any
payloadstringContent payload (for interactive messages)
locationobjectLocation object (for payload with type = location)

Location information object description

Parameter nameParameter typeDescription
latitudedecimalLatitude
longitudedecimalLongitude

❗️

If the request you receive has a different structure from described in this document, please contact our support to activate the latest format for your account.

Sample Chat Apps inbound message

{
  "namespace": "ChatApps",
  "eventType": "inbound_message_received",
  "description": "ChatApps inbound message",
  "payload": {
    "umid": "9e09ac86-bd74-5465-851d-1eb5a5fdbb9a",
    "subAccountId": "SubAccount-1",
    "timestamp": "2016-01-01T14:34:56.017Z",
    "user": {
      "msisdn": "+12025550023",
      "channelUserId": "12025550023"
    },
    "recipient": {
      "channel": "whatsapp",
      "channelId": "269a57f4-3522-eb11-8278-00155d9f27ac"
    },
    "type": "Text",
    "content": {
      "text": "Test message"
    },
    "replyToUmid": "777a57f4-bd74-eb11-851d-00155d9fer55"
  }
}