# Single-Product Message Templates

Single-Product Message (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.

<figure><img src="/files/dhAyEe4SSTzHhmfPvDUQ" alt="" width="563"><figcaption></figcaption></figure>

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

<div><figure><img src="/files/3MCL35omugFtqaaIpHqX" alt="" width="274"><figcaption></figcaption></figure> <figure><img src="/files/udKZjiiiWc0nyeGBtpOX" alt="" width="272"><figcaption></figcaption></figure></div>

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:

<figure><img src="/files/UR2nJpPVpJsvjV3SkQGL" alt="" width="259"><figcaption></figcaption></figure>

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

<figure><img src="/files/F4MtBkKM4Xee2G1CICVJ" alt="" width="274"><figcaption></figcaption></figure>

Limitation: Message forwarding is disabled for SPM templates.

## Catalogs <a href="#catalogs" id="catalogs"></a>

To use SPM buttons,  SPM Templates or Product card carousel templates, the business must have an ecommerce[ product catalog](/docs/messaging/catalogs.md), with inventory, connected to the WhatsApp Business Account.&#x20;

## Webhooks <a href="#webhooks" id="webhooks"></a>

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.

## Creating Single Product Message Templates <a href="#creating-product-card-carousel-templates" id="creating-product-card-carousel-templates"></a>

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

<mark style="color:green;">`POST`</mark> `https://waba-v2.360dialog.io/v1/configs/templates`&#x20;

#### **Headers**

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| D360-API-KEY | string |             |

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

#### Post Body <a href="#post-body" id="post-body"></a>

```json
{
  "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 <a href="#post-body-parameters" id="post-body-parameters"></a>

<table><thead><tr><th width="285">Placeholder</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td><p><code>&#x3C;CARD_BODY_TEXT></code></p><p><em>String</em></p></td><td><p><strong>Required.</strong></p><p></p><p>Card body text. Supports variables.<br></p><p>Maximum 160 characters.</p></td><td><code>Use code {{1}} to get {{2}} off our newest succulent!</code></td></tr><tr><td><p><code>&#x3C;CARD_BODY_TEXT_VARIABLE_EXAMPLE></code></p><p><em>String</em></p></td><td><p><strong>Required if card body text uses variables.</strong></p><p></p><p>Card body text example variable string(s). Number of strings must match the number of variable placeholders in the card body text string.</p><p></p><p>If card body text uses a single variable, <code>body_text</code> value can be a string, otherwise it must be an array containing an array of strings.</p></td><td><code>25OFF</code></td></tr><tr><td><p><code>&#x3C;CARD_FOOTER_TEXT></code></p><p><em>String</em></p></td><td><p><strong>Optional.</strong></p><p></p><p>Footer text.</p></td><td><code>September 30, 2024</code></td></tr><tr><td><p><code>&#x3C;TEMPLATE_LANGUAGE></code></p><p><em>String</em></p></td><td><p><strong>Required.</strong></p><p></p><p>Template language and locale code.</p></td><td><code>en_US</code></td></tr><tr><td><p><code>&#x3C;TEMPLATE_NAME></code></p><p><em>String</em></p></td><td><p><strong>Required.</strong></p><p></p><p>Template name.</p><p>Maximum 512 characters.</p></td><td><code>abandoned_cart_offer</code></td></tr></tbody></table>

#### Example Request <a href="#example-request" id="example-request"></a>

```json
{
  "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"
        }
      ]
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.360dialog.com/docs/resources/templates/single-product-message-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
