# WhatsApp Template Message Builder for the Cloud API

> Source: https://netray.co/tools/whatsapp-template-message-builder
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Generates the JSON to create a WhatsApp message template and the JSON to send it, with header, body variables, footer and a quick reply button.

## Category

developer

## Audience

- Integration developer
- ERP admin
- IT manager

## Tool

**Kind:** template

**Output:** code

**Language:** json

**Fields:**

#### WhatsApp Business Account ID

**Key:** waba_id

**Type:** text

**Default:** 123456789012345

**Help:** Used in the creation URL, found in Meta Business settings.

#### Phone number ID

**Key:** phone_id

**Type:** text

**Default:** 109876543210987

**Help:** Used in the send URL. This is not the phone number itself.

#### Template name

**Key:** template_name

**Type:** text

**Default:** po_shipment_update

**Help:** Lowercase letters, digits and underscores only.

#### Category

**Key:** category

**Type:** select

**Options:**

- UTILITY
- MARKETING
- AUTHENTICATION

**Default:** UTILITY

#### Language code

**Key:** lang

**Type:** text

**Default:** en_US

#### Header text

**Key:** header_text

**Type:** text

**Default:** Shipment update

#### Body text with numbered variables

**Key:** body_text

**Type:** textarea

**Default:** Hello {{1}}, purchase order {{2}} has shipped and is due on {{3}}. Reply below if the date does not work for you.

**Help:** Use {{1}}, {{2}} style variables. They must be numbered in order with no gaps.

#### Example value for variable 1

**Key:** ex1

**Type:** text

**Default:** Priya

#### Example value for variable 2

**Key:** ex2

**Type:** text

**Default:** PO-48213

#### Example value for variable 3

**Key:** ex3

**Type:** text

**Default:** 12 Nov 2026

#### Footer text

**Key:** footer_text

**Type:** text

**Default:** Acme Precision Ltd purchasing

#### Quick reply button text

**Key:** button_text

**Type:** text

**Default:** Request new date

#### Recipient number (international format, no plus)

**Key:** recipient

**Type:** text

**Default:** 919812345678

**Blocks:**

#### 1. Create the template (POST https://graph.facebook.com/v21.0/{{waba_id}}/message_templates)

**Body:** {
  "name": "{{template_name}}",
  "language": "{{lang}}",
  "category": "{{category}}",
  "components": [
    { "type": "HEADER", "format": "TEXT", "text": "{{header_text}}" },
    {
      "type": "BODY",
      "text": "{{body_text}}",
      "example": { "body_text": [["{{ex1}}", "{{ex2}}", "{{ex3}}"]] }
    },
    { "type": "FOOTER", "text": "{{footer_text}}" },
    { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "{{button_text}}" } ] }
  ]
}

#### 2. Send the approved template (POST https://graph.facebook.com/v21.0/{{phone_id}}/messages)

**Body:** {
  "messaging_product": "whatsapp",
  "to": "{{recipient}}",
  "type": "template",
  "template": {
    "name": "{{template_name}}",
    "language": { "code": "{{lang}}" },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "{{ex1}}" },
          { "type": "text", "text": "{{ex2}}" },
          { "type": "text", "text": "{{ex3}}" }
        ]
      }
    ]
  }
}

**Notes:** Check the current Graph API version and the latest template rules in Meta's WhatsApp Business documentation before going live. Header and button components are optional, delete them from the output if you do not use them. Send the access token in an Authorization: Bearer header, never inside the JSON.

## Content

**Intro:** A WhatsApp Business message that starts a conversation outside the 24 hour customer service window must use a pre-approved template. This builder produces the two JSON payloads you need: one to submit the template for review and one to send it once approved.

**Sections:**

#### How to use the builder

**Body:** Fill in your template name, category, language and body text with numbered variables. Add one realistic example value per variable, because Meta reviewers use the examples to judge what the message will look like. Copy block 1 into a POST to your WhatsApp Business Account's message_templates edge and wait for approval, which is often quick for utility templates but can take longer for marketing. After approval, copy block 2 into your integration code and replace the example values with live data from your ERP, such as the purchase order number and due date.

#### Choosing the right category

**Body:** Category drives both approval and price. Utility templates confirm or update something the customer already asked for or is part of, such as an order, a delivery or an appointment. Marketing templates promote or invite. Authentication templates carry one-time codes. Meta can reclassify a template whose content looks promotional, so keep utility templates transactional and free of upsell wording.

**Bullets:**

- Order and shipment updates: utility
- Payment due reminders on an existing invoice: utility
- New product announcements and offers: marketing
- Login and verification codes: authentication

#### Common mistakes

**Body:** The most frequent rejection reasons are variables at the very start or end of the body, variables placed next to each other with no words between them, missing or unrealistic examples, and vague content like "Your update is here {{1}}". Keep a sensible ratio of fixed text to variables, avoid line breaks and tabs inside a variable value, and never put sensitive data such as full bank account numbers in a template. Template names cannot be reused with a different language by mistake, so keep a naming convention.

**Cta:** If you want order, shipment or quality events from your ERP to trigger approved WhatsApp templates automatically, Netray can build that integration with human approval on any write-back.

**Faq:**

#### Do I need a template for every WhatsApp message?

**Answer:** No. Inside the 24 hour customer service window opened by a customer message you can send free-form replies. A template is required to start a conversation or to message after that window has closed.

#### How long does template approval take?

**Answer:** It varies. Many utility templates are reviewed within minutes to hours, while rejected or flagged ones need edits and resubmission. Plan for a day in your project schedule and have backup wording ready.

#### Can one template carry a PDF or image?

**Answer:** Yes, a template can have a header of type image, video or document. This builder generates a text header only, so add a media header component if you need to attach an invoice or delivery note.

#### Which Graph API version should I use?

**Answer:** Use a version Meta currently supports. The v21.0 shown is an example, so replace it with the version your app is configured for and check Meta's changelog for deprecations.

## Search terms

whatsapp template message builder, whatsapp business api template json, whatsapp cloud api send template message, whatsapp message template example, create whatsapp template api, whatsapp utility template examples, whatsapp template variables, whatsapp template for order confirmation

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
