# Send WhatsApp message templates

{% hint style="info" %}
Find out more about WhatsApp message templates and when they are used [here](https://guides.clickatell.com/whatsapp-channel/channel-capabilities/whatsapp-message-templates).
{% endhint %}

As an agent, you can send the following WhatsApp message templates to customers directly from Chat Desk:

* Plain text message templates.
* Media templates:
  * [Images, videos, and documents.](https://clickatell.gitbook.io/whatsapp-user-guide/channel-capabilities/whatsapp-message-templates/use-media-in-message-templates)
  * [Quick-reply and call-to-action buttons.](https://clickatell.gitbook.io/whatsapp-user-guide/channel-capabilities/whatsapp-message-templates/use-interactive-buttons-in-message-templates)

{% hint style="success" %}
You'll first need to [add the message template](https://guides.clickatell.com/whatsapp-channel/channel-capabilities/whatsapp-message-templates/add-message-templates) in the Clickatell Portal. Once approved, the template will be active and available to send from Chat Desk.
{% endhint %}

## Select a message template

1. Click the icon for sending an external chat message and select "WhatsApp".

{% hint style="info" %}
An agent can also send a WhatsApp template message to anyone who does not currently have a live chat. This will create a new closed chat. Only when a customer replies to the chat, it will become a live chat.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/L6qvh73O85wIgk6fzpwE/WAMTimage1.png" alt=""><figcaption></figcaption></figure>

2. In the *Send WhatsApp Templated Message* modal, enter the customer's contact number in the *Send To* field.&#x20;
   * You can also access this modal from within a specific chat. In this case, the customer's contact number auto-populates.
3. Next, select a message template from the *Message Template* drop-down. These templates must be set up in the Clickatell Portal.
   * An icon helps identify whether the message template is plain text or requires an image, video, or document.&#x20;

{% hint style="warning" %}
Only approved message templates will pull through from the Clickatell Portal. If the options in the drop-down are grayed out, you first need to [set up templates](https://guides.clickatell.com/whatsapp-channel/channel-capabilities/whatsapp-message-templates/add-message-templates).
{% endhint %}

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/dISid2PhYLzQ3sDidqYH/WAMT%20image%202.png" alt=""><figcaption></figcaption></figure>

4. Once the recipient and template have been specified, add text for the variables that must display in the message body. &#x20;
5. If you selected a media template, click the *Upload* button and follow the prompts to complete the media upload.&#x20;

{% hint style="success" %}
These file formats and sizes are supported for media message templates:

* **Images**: JPEGs, JPGs, or PNGs with a maximum file size of 30 MB.
* **Videos**: MP4s with a maximum file size of 30 MB.
* **Documents**: PDFs with a maximum file size of 30 MB.
  {% endhint %}

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/x41WfFmw6F2muex3nTqz/WAMTimage3.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/9wVuCpLi4B9zd2d1I2wB/WAMTimage6.png" alt=""><figcaption></figcaption></figure>

## Preview message template&#x20;

You can see a real-time preview of the message template to the right. This shows what it will look like to the customer. &#x20;

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/aGxcmW7PD3SbPtVI4h5C/WAMTimage4.png" alt=""><figcaption></figcaption></figure>

The preview includes buttons, headers, and footers.

{% hint style="warning" %}
Buttons are view-only and cannot be edited or clicked from here.&#x20;
{% endhint %}

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/QwkWQTlUdpEGtFnmbmCt/WAMTimage5.png" alt=""><figcaption></figcaption></figure>

## Send template

Once all fields in the modal are completed, click *Send*.&#x20;

After the message template is sent to the customer, it displays in the chat window and includes a *WhatsApp Message Template* tag to clearly indicate that the message was a template.&#x20;

Message templates will form part of the chat history so that agents and supervisors can easily refer back to it.

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/3e4kJSPxGEXfSHNeyeAT/WAMTimage7.png" alt=""><figcaption></figcaption></figure>

When an end-user selects a button on the template, the reply is sent back to Chat Desk and indicates clearly which template the end-user interacted with.

<figure><img src="https://content.gitbook.com/content/AeMbivaErQPM4rXdM6fm/blobs/q5Z5PMJvRSVnTQZmbll0/image.png" alt=""><figcaption><p>The button selected appears in the reply, together with the template the end-user replied to.</p></figcaption></figure>

{% hint style="info" %}
Each time a WhatsApp message template is sent, it initiates a new [closed chat](https://guides.clickatell.com/chat-desk/supervisor-desk/manage-chat-queues-supervisor-desk/chats-and-tickets#closed-chats). When a customer responds to the message, template, it converts to a live chat with all subsequent messages appended to the live chat history. Once the live chat is closed, it is saved as a closed chat with the history starting from that specific WhatsApp template interaction. Any previous chat history with the customer is saved as a separate closed chat.

Live chat message history is retrieved based on the end user, while closed chat history is retrieved based on the chat ID, therefore one customer may have multiple closed chats.
{% endhint %}
