Creating Templates

Overview

A Template in Sent is a reusable blueprint for messages that enables consistent, personalized communication at scale across multiple messaging channels. It represents a structured message format with dynamic variables, media support, and interactive elements that automatically adapts to each channel's requirements.

In Sent, Templates can be created in the Sent Dashboard or programmatically using the API.

In this section, we will cover the process of creating templates in the Sent Dashboard.

When creating a template, you can choose between 4 different options:

  • Create a template from scratch
  • Create a template from one of our sample template
  • Import a template from Meta
  • Create a template from a JSON definition

Creating a Template from Scratch

Create your first template from your Sent Dashboard.

Template from Scratch


  • πŸ“ Navigate to the Templates page and click on the Create from scratch button

  • πŸ“ Explore the template structure and get to know the different sections
    • For this guide, we will create a "Delivery Information" template

  • πŸ“ Fill in the Template Header
WhatsApp only

The header is an optional component that can be used to add a title or introduction for your messages. It is only supported on WhatsApp.

It supports up to 60 characters and up to 1 dynamic variable.

Fill in the template header details

Result


  • πŸ“ Fill in the Template Body
WhatsAppSMS

The body is the main component of the template that contains the message content. It is supported on WhatsApp and SMS. It supports up to 1028 characters and as many dynamic variables and links as you need.

SMS message length is limited to 160 characters per message segment. If your template body exceeds this limit when sent as an SMS, it will automatically be split into multiple SMS messages. Each segment may include additional metadata, meaning the actual character limit per segment could be slightly lower for concatenated messages. On the recipient’s phone, these are usually combined and appear as a single long message, but your SMS usage and billing will reflect the number of segments sent.

Fill in the template body details

  • The yellow boxes are the dynamic variables
  • The lightblue boxes are the dynamic links

Adding dynamic variables and links

  • You can add dynamic variables and links to the template body by clicking on the Insert dynamic variable and Insert dynamic link buttons
Dynamic Variable TypeDescription
TextPlain text content that can be personalized
LinkDynamic URLs for tracking or personalization
Image/MediaImages or media files (WhatsApp only)
FileDocument files (WhatsApp only)
Dynamic Link TypeDescription
LinkCall to Action with dynamic URL that can be personalized

Result


  • πŸ“ Fill in the Template Footer
WhatsApp only

The footer is an optional component that can be used to add a footer to the template. It is supported on WhatsApp only.

It supports up to 60 characters and no dynamic variables or links.

Fill in the template footer details

Result


  • πŸ“ Fill in the Template Buttons
WhatsApp only

The buttons are an optional component that can be used to add interactive buttons to the template.

Fill in the template buttons details

Buttons types & options

  • You can add buttons to the template by clicking on the Add button button.
Button TypeQuantity allowed in the templateDescription
Custom ButtonsUnlimitedCustom Button type and Preconfigured Response type
Visit Website ButtonsUp to 2Support static and dynamic URLs
Phone Number ButtonUp to 1One-tap calling with country code and phone number support
Copy Offer ButtonUp to 1One-tap copying for OTP or offer codes

Result


  • πŸ“ Fill in the Template Category & Language

The category and language are optional fields that can be used to categorize and language the template.

  • The category is automatically detected based on the template content, but you can also manually choose it.
  • The language is automatically detected based on the template content, but you can also manually choose it.

Creating a Template from Sample

Sent provides a large set of pre-designed templates that you can use as a base to create your templates.

Template from Sample


  • πŸ“ Create template from sample
    • Use our pre-designed templates by clicking the Create from Sample button

  • πŸ“ Select a sample template
    • For this guide, we will use the "Hello with sms and whatsapp" sample template
    • Click on the "Use Sample" button

  • πŸ“ Optional: Customize the template if needed

    • You can customize the template details to your needs

Importing a Template from Meta

Sent provides a list of pre-approved templates that you can import from Meta.

Template from Sample


  • πŸ“ Import template from Meta
    • Import a template from Meta by clicking the "Import from Meta" button

  • πŸ“ Select a pre-approved template from the list
    • Click on the "Import Template" button

  • πŸ“ Optional: Customize the template if needed

    • You can customize the template details to your needs

Creating a Template from JSON

Sent also allows you to create a template from a JSON definition.

Template from JSON Definition


  • πŸ“ Create template from JSON Definition
    • Click the Create from Definition button

  • πŸ“ Provide the JSON definition
    • You can also paste your definition in the text area
    • You can also generate a sample JSON definition by clicking the Use Sample JSON button

  • πŸ“ Example of a JSON definition

    • Here is an example of a JSON definition that you can use to create a template. The JSON below will recreate the exact template that we created in the Creating a Template from scratch section.
        {
        "category": "AUTO",
        "language": "AUTO",
        "creationSource": "from-scratch",
        "definition": {
            "header": {
            "type": "text",
            "template": "πŸ“¦ Order {{0:variable}} β€” Delivery Update",
            "variables": [
                {
                "id": 0,
                "name": "orderNumber",
                "type": "variable",
                "props": {
                    "variableType": "text",
                    "sample": "12345"
                }
                }
            ]
            },
            "body": {
            "multiChannel": {
                "type": "body",
                "template": "Hi {{0:variable}},\nYour Acme order {{1:variable}} has been shipped and is expected to arrive {{2:variable}} between {{3:variable}}.\nYou can track your package or update your delivery preferences on this page: {{4:link}} .",
                "variables": [
                {
                    "id": 0,
                    "name": "customerName",
                    "type": "variable",
                    "props": {
                    "variableType": "text",
                    "sample": "Lucas"
                    }
                },
                {
                    "id": 1,
                    "name": "orderNumber",
                    "type": "variable",
                    "props": {
                    "variableType": "text",
                    "sample": "#12345"
                    }
                },
                {
                    "id": 2,
                    "name": "arrivalDate",
                    "type": "variable",
                    "props": {
                    "variableType": "text",
                    "sample": "tomorrow (Oct 11)"
                    }
                },
                {
                    "id": 3,
                    "name": "arrivalTime",
                    "type": "variable",
                    "props": {
                    "variableType": "text",
                    "sample": "2 PM – 4 PM"
                    }
                },
                {
                    "id": 4,
                    "name": "orderLink",
                    "type": "link",
                    "props": {
                    "url": "https://example.com",
                    "shortUrl": "",
                    "alt": "Tracking Page"
                    }
                }
                ]
            }
            },
            "footer": {
            "type": "text",
            "template": "Thank you for shopping with Acme.",
            "variables": []
            },
            "buttons": [
            {
                "id": 1,
                "type": "URL",
                "props": {
                "text": "Track your order",
                "urlType": "dynamic",
                "url": "https://www.example.com"
                }
            },
            {
                "id": 2,
                "type": "PHONE_NUMBER",
                "props": {
                "text": "Acme customer support",
                "countryCode": "US",
                "phoneNumber": "+112345678"
                }
            }
            ]
        }
        }

Template Review Process

Once you have created a template using one of the methods above, you can submit it for review to Meta for WhatsApp approval.

You can initiate the review process by clicking the Submit for Review button in the template details page.

The template will be automatically submitted for review to Meta for WhatsApp approval, but you can still send SMS messages while the template is being reviewed.

Retrieving the Template ID

The template ID is a unique identifier for the template that will come in handy when sending messages using the API.

Retrieve your template ID


  • πŸ“ Select a template from "Your Templates" section of the Dashboard
    • You can click directly on the template card
    • Or you can click on the "View" link on the bottom right of the template card

  • πŸ“ Copy the template ID
    • You can quick-copy the template ID by clicking the copy icon on the right of the template ID field