# Back in stock alert WhatsApp template

> Notify customers who asked to be alerted when a sold-out product returns. Back in stock WhatsApp template with a buy link.

- Category: Marketing
- Industry: E-commerce
- Use case: Back in stock
- Language: en_US
- Approval rate: 80%
- Page: https://template-builder.dev/whatsapp-template/ecommerce-back-in-stock-alert
- JSON: https://template-builder.dev/whatsapp-template/ecommerce-back-in-stock-alert.json
- Open in the playground: https://template-builder.dev/playground#t=eyJuYW1lIjoiZWNvbW1lcmNlX2JhY2tfaW5fc3RvY2tfYWxlcnQiLCJsYW5ndWFnZSI6ImVuX1VTIiwiY2F0ZWdvcnkiOiJNQVJLRVRJTkciLCJib2R5Ijp7InRleHQiOiJHb29kIG5ld3MsIHt7Zmlyc3RfbmFtZX19ISAqe3twcm9kdWN0X25hbWV9fSogaW4gc2l6ZSB7e3NpemV9fSBpcyBiYWNrIGluIHN0b2NrLiBRdWFudGl0aWVzIGFyZSBsaW1pdGVkLCBzbyBncmFiIHlvdXJzIHdoaWxlIGl0IGxhc3RzLiJ9LCJmb290ZXIiOnsidGV4dCI6IlJlcGx5IFNUT1AgdG8gb3B0IG91dCJ9LCJidXR0b25zIjpbeyJ0eXBlIjoiVVJMIiwidGV4dCI6IlNob3Agbm93IiwidXJsIjoiaHR0cHM6Ly9hY21lLmNvbS9wcm9kdWN0cy97e29yZGVyX2lkfX0ifV0sInZhcmlhYmxlcyI6eyJmaXJzdF9uYW1lIjp7ImV4YW1wbGUiOiJNYXJpYSJ9LCJwcm9kdWN0X25hbWUiOnsiZXhhbXBsZSI6IkxpbmVuIFNoaXJ0In0sInNpemUiOnsiZXhhbXBsZSI6Ik0ifSwib3JkZXJfaWQiOnsiZXhhbXBsZSI6IjQ1MTIifX19

## How to get it approved

Only send to people who explicitly subscribed to that product alert and say so in the text. Stock sells out fast, so send immediately.

## Message text

Good news, {{first_name}}! *{{product_name}}* in size {{size}} is back in stock. Quantities are limited, so grab yours while it lasts.
Reply STOP to opt out

## Variables

- `{{first_name}}`: Maria
- `{{product_name}}`: Linen Shirt
- `{{size}}`: M
- `{{order_id}}`: 4512

## Template JSON

```json
{
  "name": "ecommerce_back_in_stock_alert",
  "language": "en_US",
  "category": "MARKETING",
  "body": {
    "text": "Good news, {{first_name}}! *{{product_name}}* in size {{size}} is back in stock. Quantities are limited, so grab yours while it lasts."
  },
  "footer": {
    "text": "Reply STOP to opt out"
  },
  "buttons": [
    {
      "type": "URL",
      "text": "Shop now",
      "url": "https://acme.com/products/{{order_id}}"
    }
  ],
  "variables": {
    "first_name": {
      "example": "Maria"
    },
    "product_name": {
      "example": "Linen Shirt"
    },
    "size": {
      "example": "M"
    },
    "order_id": {
      "example": "4512"
    }
  }
}
```

## Create it with the Meta Cloud API

```sh
curl -X POST "https://graph.facebook.com/v26.0/$WABA_ID/message_templates" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "ecommerce_back_in_stock_alert",
  "language": "en_US",
  "category": "MARKETING",
  "parameter_format": "NAMED",
  "components": [
    {
      "type": "BODY",
      "text": "Good news, {{first_name}}! *{{product_name}}* in size {{size}} is back in stock. Quantities are limited, so grab yours while it lasts.",
      "example": {
        "body_text_named_params": [
          {
            "param_name": "first_name",
            "example": "Maria"
          },
          {
            "param_name": "product_name",
            "example": "Linen Shirt"
          },
          {
            "param_name": "size",
            "example": "M"
          }
        ]
      }
    },
    {
      "type": "FOOTER",
      "text": "Reply STOP to opt out"
    },
    {
      "type": "BUTTONS",
      "buttons": [
        {
          "type": "URL",
          "text": "Shop now",
          "url": "https://acme.com/products/{{1}}",
          "example": [
            "https://acme.com/products/4512"
          ]
        }
      ]
    }
  ]
}'
```
