Skip to content

Outgoing product message#

This section describes the messageData object incoming webhook format for an outgoing catalog product message. For a description of the general format of incoming webhooks, refer to the Outgoing messages section.

To get incoming webhooks of this type, two conditions must be true:

typeWebhook = outgoingMessageReceived || outgoingAPIMessageReceived

messageData.typeMessage = productMessage

Configuring an instance

To receive notifications about outgoing product messages, you need to enable the settings using one of the following options:

  1. Through the console enable the settings Receive notifications about messages sent from the phone and Receive notifications about messages sent via API, as well as the catalog notifications setting

  2. Through the SetSettings method enable the settings outgoingMessageWebhook, outgoingAPIMessageWebhook, and catalogWebhook

Webhook#

Webhook parameters#

messageData object parameters

Parameter Type Description
typeMessage string Sent message type. For messages of this type, the field takes the value: productMessage
productMessage object Product data object

productMessage object parameters

Parameter Type Description
productId string Unique product identifier in WhatsApp
title string Product name
description string Product description
currencyCode string Currency code in ISO 4217 format (e.g., RUB)
price string Product price
url string Product page URL
productImageCount integer Number of product images
fileMessageData object Product image data object

fileMessageData object parameters

Parameter Type Description
downloadUrl string Download link for the product image
jpegThumbnail string Image preview in base64
isAnimated boolean Whether the image is animated
mimeType string File type according to the Media Types classification
caption string Caption under the image
forwardingScore integer Number of message forwards
isForwarded boolean Whether the message is forwarded, takes the values true/false

Webhook body example#

{
  "typeWebhook": "outgoingAPIMessageReceived",
  "instanceData": {
    "idInstance": 1101111111,
    "wid": "79876543210@c.us",
    "typeInstance": "whatsapp"
  },
  "timestamp": 1784017443,
  "idMessage": "3EB0AB5229B7284B80281E",
  "senderData": {
    "chatId": "79001234567@c.us",
    "chatName": "Ivan",
    "sender": "79876543210@c.us",
    "senderName": "Seller",
    "senderContactName": "Seller"
  },
  "messageData": {
    "typeMessage": "productMessage",
    "productMessage": {
      "productId": "37389763923955288",
      "title": "Ceramic Mug",
      "description": "Hand-painted, 350 ml",
      "currencyCode": "RUB",
      "price": "999.00",
      "url": "https://example.com/",
      "productImageCount": 1,
      "fileMessageData": {
        "downloadUrl": "https://media.whatsapp.net/v/t45.5328-4/709782393_1036145568744364_7226933118843139210_n.jpg",
        "jpegThumbnail": "/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB",
        "isAnimated": false,
        "mimeType": "image/jpeg",
        "caption": "",
        "forwardingScore": 0,
        "isForwarded": false
      }
    }
  }
}