Single-Product Message Templates

SPM templates are marketing templates that allow you to present a single product from your connected 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.

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 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.

  • SPM templates are only available to Cloud API.

Catalogs

To use SPM buttons, SPM Templates or Product card carousel templates, you must have an ecommerce product catalog, with inventory, connected to your WhatsApp Business Account.

Webhooks

If you send templates that use a View button, when a customer adds one or more products to their cart and submits an order, you will receive a webhook that describes the order.

Use the create template endpoint to create Product Card Carousel Template.

POST https://waba-v2.360dialog.io/v1/configs/templates

Headers

NameTypeDescription

D360-API-KEY

string

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

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

{
  "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 October 31, 2024"
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "spm",
          "text": "View"
        }
      ]
    }
  ]
}

aa

Last updated