# Create and Send Template Messages

### Video Tutorial:

{% embed url="<https://www.youtube.com/watch?index=3&list=PL_EdxcvIGFEagxlG7c7rMCg62UA9pPdMk&v=nVGLGYeUZzA>" %}

To create a Message Template, you’ll need to ensure the following:

1. You’re an admin of your MyAlice Account
2. You have an active WhatsApp connection on MyAlice
3. Your Business Manager is verified. If not, you’ll have limited access to the number of templates you can create and send.

## **Create a Message Template**

<figure><img src="/files/Rxuc6tdvLieos9JVtTSZ" alt=""><figcaption></figcaption></figure>

1. Go to Integrations and select the options against your WhatsApp Channel.
2. Click on ‘Manage Templates’.
3. If you’ve created any templates before, you’ll see a list of all the templates here with their relevant status. If not, you’ll see it as blank.
4. To create a new template, click on ‘Create New Message Template’
5. Provide the content of your new template
6. Once done, click ‘Save and Request Approval’ This will send the template to WhatsApp’s end for approval. Normally it takes around 10s for the approval. You can check the status from the ‘Manage Template’ section.

### Message Template Contents

#### Template Related Information

<figure><img src="/files/cZ79g0D1RQwu0jH05Kan" alt=""><figcaption><p>Template Related Information</p></figcaption></figure>

* Template name: This should be in small letters and without any special characters.
* Category: Select the category your template falls under.
* Language: Select the language you’d like the content of the template to be.
* Button Type: You can add buttons with the texts you sent. You also have options to decide how you want the buttons to respond.
  * Sequence: This triggers a sequence from your automation.&#x20;
  * URL: This opens up a URL.
* Header type: Header is basically the title of your content, which will appear in bold to your recipients. You can have two types of headers:
  * Text: A header that will just be a text
  * Image: An image as an header

#### Message Related Information

<div align="left"><figure><img src="/files/k41lGjmmuchCnhY3PgWh" alt=""><figcaption><p>Components of a Message Template</p></figcaption></figure></div>

1. **Header** (optional): Header can be an image or a text. If text, it can be 60 characters max. For image, use an image of 1.91:1 aspect ratio (1125 px by 600 px) for best view. Accepted formats are .jpg, and .png
2. **Body**: This is the message that you want to send to the customers. You can use variables in body. To use variables, use this format: `{{variable|example}}` where variable is the name of the variable, and example is a sample data. While sending message template, variable will be replaced by customer attributes.
3. **Footer** (optional): Footer can be a text with 60 characters limit.&#x20;
4. **Button**: You can add buttons with the texts you sent. Buttons can trigger chatbot sequences created in MyAlice or take the users to any URL. URLs can be static or dynamic. If you want to use Dynamic URL like Abandoned Checkout URL, You need to add suffix. So for example `https://ecomwave.com/AYSF34` link to pass dynamically, in WhatsApp Message Template URL, use `https://ecomwave.com/{{url|example}}`. Notice a few things:
   * You cannot make the full URL dynamic. If you need to do that, use our helper redirection url: `https://gtlc.cc/r/?link={{url|example}}`
   * In the url variable, add a variable with an example like this: `{{url|example}}`

## **Accepted Media Types and Maximum Sizes**

<figure><img src="/files/E7eFppKYNdi9ngu7eNyY" alt=""><figcaption></figcaption></figure>

## **Send an Approved Message Template**

There are two ways you can send template messages:

1. You’ll have to use a template message if you want to send a message to a user-initiated conversation on WhatsApp beyond 24 hours.
2. You can broadcast a template message to a list of your contacts

### Send Template for Conversations beyond 24 hours

#### Step 1: Go to the relevant WhatsApp ticket

![](/files/vO4GezJxPWBa9jbhhcMu)

#### Step 2: Click on the template icon on the bottom of the middle bar

![](/files/Pm3scXK1uaHzuXfuRMOj)

Here you’ll see the list of all your approved template messages. Click on the one that you’d like to send and it’ll be automatically populated in the text box. Hit ‘Send’ and it’ll be sent to the customer.

### Send Message Template with API

```
Base URL: https://api.myalice.ai
```

{% openapi src="/files/vMUjVt2pNFf9ehFTM13I" path="/stable/open/whatsapp/send-template-message" method="post" %}
[MyAlice Backend API (stable).yaml](https://1800541801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MgzCdF2XNgHNO9_KQDe%2Fuploads%2FsJBAiyVqiqal3qXFri2C%2FMyAlice%20Backend%20API%20\(stable\).yaml?alt=media\&token=96fb2813-e862-4849-92ea-e4b00d8807a9)
{% endopenapi %}

{% hint style="info" %}
You can get your API key by going to Settings -> Team Information.
{% endhint %}


---

# 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.myalice.ai/whatsapp/create-and-send-template-messages.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.
