Overview

WhatsApp now supports Product Messaging! Brands can now send single or multiple product messages to their WhatsApp Messenger customers. This allows the customer to view the product(s), ask questions about given products as well as submit a shopping cart all from inside WhatsApp. (Product Question and Product Order Messages arrive as Simple text messages with the associated metadata attached (examples below))

There however are a few steps a brand must do prior to being able to send product messages and this includes connecting a catalog to the LivePerson Business Id and connecting the catalog to your WhatsApp Business Account. Review the following link to see how that's done: https://www.facebook.com/business/help/1275400645914358?id=725943027795860

Structure

It's important to note that Product Messages has only one orientation option and that is of type "Vertical"

Single Product Message has the following structure

  1. Header (required only if no body & footer are present else the element is ignored)
  2. Body (optional)
  3. Footer (optional)

Examples Of WhatsApp Single Product Message:

Whatsapp Single Product Message Examples

Multiple Product Message has the following structure

  1. Header (required)
  2. Body (required)
  3. Footer (optional)

Examples Of WhatsApp Multiple Product Message:

Whatsapp Multiple Product Message Examples

JSON Template Properties

Property Name Description Type Required
type WhatsApp Product Message can only have type of "Vertical" Enum Y
tag Tag of template view, must be “generic” for Viber rich content templates. Enum Y
elements Array of elements/templates. By using elements in your structured content template, you can send basic elements, such as header, body, footer Elements/Templates Y
text The text that will appear in the assigned element. The tag property of this object is what assigns the type of section the text is assigned to. Tag options are as followed: "header", "body", and "footer" String Y

METADATA Template Properties

Metadata is required for both Single and Multiple Product messages and contains the required data so that WhatsApp displays the appropriate products in the desired formatting.

Property Name Description Type Required
type Types are either "WhatsAppSingleProduct" or "WhatsAppMultipleProduct" Enum Y
catalogId The catalog the products being sent belong to. string Y
productRetailerId The product id to send to the WhatsApp user string Y (Single Mode Only)
sections An array of section objects array Y (Multiple Mode Only)
section object
title The title of the section string Y
productIds The products ids to be shown under the section string[] (30 max length) Y

Code Examples

Single Product Message

{
  "type": "vertical",
  "tag": "generic", 
  "elements": [
    {
      "type": "text",
      "text": "Check out this amazing shoe!",
      "tag": "body"
    },
    {
      "type": "text",
      "text": "Cool Shoes",
      "tag": "footer"
    }
  ]
}

Single Product Message Metadata

[
   {
      "type":"WhatsAppSingleProduct",
      "catalogId":"7091398035386734",
      "productRetailerId":"kjhjh435"  
   }
]

Multiple Product Message

{
  "type": "vertical",
  "tag": "generic", 
  "elements": [
    {
      "type": "text",
      "text": "Check out all these products!",
      "tag": "header"
    },
    {
      "type": "text",
      "text": "Take a peek at all these wonderous shoes that we have on sale!!",
      "tag": "body"
    },
    {
      "type": "text",
      "text": "Joshss Amazing Shoes",
      "tag": "footer"
    }
  ]
}

Multiple Product Message Metadata

[
  {
    "type": "WhatsAppMultipleProduct",
    "catalogId": "7091398035386712",
    "sections": [
      {
        "title": "Shoes",
        "productIds": [
          "retg4gg",
          "dfgfdg87df"
        ]
      },
      {
        "title": "Cheaper Shoes",
        "productIds": [
          "lkdfjgljdsfg",
          "fgfdgdfgfdsg"
        ]
      }
    ]
  }
]

Product Question Message Metadata

[
  {
    "type": "MessageReplyContext",
    "whatsappExternalId": "342334",
    "whatsappReplyToExternalId": "34524234",
    "whatsappReplyToMessageId": "343242",
    "whatsAppProductQuestion": {
      "catalogId": "catalogId",
      "productRetailerId": "productRetailerId"
    }
  }
]

Product Order Message Metadata

[
  {
    "type": "WhatsAppOrder",
    "catalogId": "catalogId",
    "products": [
      {
        "productRetailerId": "productId",
        "quantity": 1,
        "price": "1.99",
        "currencyType": "USD"
      }
    ]
  }
]