We are making changes to the WhatsApp Business Platform pricing model. See Pricing Updates on the WhatsApp Business Platform.

Single-Product Message Templates

This document describes single-product message (MPM) templates, their uses, and how to create them.

SPM templates are marketing templates that allow you to present a single product from your ecommerce catalog, accompanied by a product image, product title, and product price (all pulled from your product within your catalog), along with customizable body text, optional footer text, and an interactive View button.

WhatsApp users can tap the button to see details about the product, and can add or remove the product from the WhatsApp shopping cart:

If the WhatsApp user adds the product to the carts and submits an order, you will be notified via webhook and the user will see that an order has been placed:

Users who place an order are also able to use the View details button to see information about the order:

Limitations

  • Customers must be using WhatsApp v2.22.24 or greater.
  • Message forwarding is disabled for SPM templates.

Catalogs

You must have an ecommerce product catalog, with inventory, connected to your WhatsApp Business Account. See the Cloud API Commerce guide to learn more about connecting a catalog to your account.

Webhooks

When a customer adds one or more products to their cart and submits an order, we will send you a webhook that describes the order.

Creating SPM Templates

Use the POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates endpoint to create an SPM template.

Request Syntax

POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates

Post Body

{
  "name": "<TEMPLATE_NAME>",
  "language": "<TEMPLATE_LANGUAGE>",
  "category": "marketing",
  "components": [
    {
      "type": "header",
      "format": "product"
    },
    {
      "type": "body",
      "text": "<CARD_BODY_TEXT>",
      "example": {
        "body_text": [
          [
            "<CARD_BODY_TEXT_VARIABLE_EXAMPLE>",
            "<CARD_BODY_TEXT_VARIABLE_EXAMPLE>"
          ]
        ]
      }
    },
    {
      "type": "footer",
      "text": "<CARD_FOOTER_TEXT>"
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "spm",
          "text": "View"
        }
      ]
    }
  ]
}

Post Body Parameters

PlaceholderDescriptionExample Value

<CARD_BODY_TEXT>

String

Required.

Card body text. Supports variables.

Maximum 160 characters.

Use code {{1}} to get {{2}} off our newest succulent!

<CARD_BODY_TEXT_VARIABLE_EXAMPLE>

String

Required if card body text uses variables.

Card body text example variable string(s). Number of strings must match the number of variable placeholders in the card body text string.

If card body text uses a single variable, body_text value can be a string, otherwise it must be an array containing an array of strings.

25OFF

<CARD_FOOTER_TEXT>

String

Optional.

Footer text.

September 30, 2024

<TEMPLATE_LANGUAGE>

String

Required.

Template language and locale code.

en_US

<TEMPLATE_NAME>

String

Required.

Template name.

Maximum 512 characters.

abandoned_cart_offer

Example Request

curl 'https://graph.facebook.com/v21.0/102290129340398/message_templates' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer EAAJB...' \
-d '
{
  "name": "abandoned_cart_offer",
  "language": "en_US",
  "category": "marketing",
  "components": [
    {
      "type": "header",
      "format": "product"
    },
    {
      "type": "body",
      "text": "Use code {{1}} to get {{2}} off our newest succulent!",
      "example": {
        "body_text": [
          [
            "25OFF",
            "25%"
          ]
        ]
      }
    },
    {
      "type": "footer",
      "text": "Offer ends September 30, 2024"
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "spm",
          "text": "View"
        }
      ]
    }
  ]
}'

Sending SPM Templates

Once your SPM template has been approved, you can use Cloud API to send it in a template message.