# Configuring Message Templates

Configuring message templates in WhatsApp4Dynamics allows users to set up predefined message formats for commonly used responses or communication scenarios.

These templates can then be easily accessed and used when sending messages through WhatsApp from within the Dynamics environment. However, these templates need to be pre-approved by Twilio & configured beforehand.

{% hint style="info" %}
**Note:** Although, you can only initiate a conversation by sending a message template. You have the choice to send freeform messages when a customer initiates a conversation or replies on a sent template.
{% endhint %}

To configure WhatsApp message templates in Microsoft Dynamics 365 CRM using Twilio, you can follow these steps:

1. Login to your Twilio Account.

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

1. Navigate to **Try it out**, and then click on **Send a WhatsApp message**.
2. **Business-Initiated Messages**

Once you have established a connection with **Twilio WhatsApp Sandbox**, you can customise the default templates under, **Business-Initiated Messages**. There are multiple **Twilio** message templates that you can choose.

{% hint style="info" %}
**Note:** Twilio (Sandbox) limits you to default message templates. Twilio templates can be used on WhatsApp4Dynamics within Microsoft Dynamics 365 CRM.
{% endhint %}

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

**For Example:** The **Appointment Reminders** template says *“Your appointment is coming up on {{1}}”* In the curly brackets users can add dynamic values or CRM fields as values, while creating templates. However, the template cannot be changed.

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

**Another Example:** The **Order Notification** template that says *“Your {{1}} order of {{2}} has shipped and should be delivered on {{3}}. Details: {{4}}”* Similarly to the above example, in the curly brackets users can add dynamic values or CRM fields as values.

3. **Create Messages Templates in Microsoft Dynamics 365 CRM**

You can now create WhatsApp message templates on Microsoft Dynamics 365 CRM after you have done the setup and are ready to copy templates from your Twilio Account.

To do so, follow the steps:

* In WhatsApp4Dynamics click **Configurations**, and navigate to **Message Templates.**
* Click **+New Message** Template to create a new WhatsApp Message Template.

<figure><img src="/files/4YXvA7SOBoQZnAT2TkC4" alt=""><figcaption></figcaption></figure>

* **Fill Up All the Fields**

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

* **Template Type** – Entity Template
* **Title** – Add a fitting title or describe the template.
* **Record Type** – Mention in which Entity the message template needs to show.

<figure><img src="/files/1mAGC3KsawErC6njvqs5" alt=""><figcaption></figcaption></figure>

* **Message –** In the message section, copy & paste the template from Twilio and customize the curly brackets. Add dynamic values or CRM fields as values to create templates as required.

**For Example:** As shown in the screenshot below, the **Support** team has created a WhatsApp message reminder about the appointment for the **CRM Record (Contact)**. *“Your appointment is{accountname} with{contactid}”* Here accountname & contacted are the dynamic values and can be changed as per your preference.

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

### Personalized Message Template Variables

The Personalized Message Template Variables allows users to customize message content at the time of sending by entering values for variables (placeholders) directly from the chat interface.

Instead of creating multiple templates for different scenarios, this feature enables users to reuse a single approved template and dynamically update the variable values before sending the message to the customer.

**Why This Feature is Useful**

In real-world scenarios, messages often require small changes such as:

* Customer name
* Order number
* Appointment details

Without this feature, multiple templates would need to be created for each variation. With Personalized Message Template Variables, users can enter these details instantly while sending the message, making the process more efficient and user-friendly.\
\
**Configuration Steps**

**1. Navigate to Message Templates**

* Go to WhatsApp4Dynamics
* Open Configurations

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

**•**	Click on Message Templates&#x20;

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

**2. Create or Select a Template**

* Create a new template or open an existing one
* Select the required message template
* Ensure that variables are defined in the template

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

**Example Template:**

Hello {{1}}, 👋

Your interest in {{2}} has been successfully reviewed, and we’re pleased to inform you that your profile has been successfully reviewed and qualified!

**3. Configure Variables for Personalization**

•  Scroll to the Variables Configuration section

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

* Open each variable record
* Set: \
  Variable Value Type = Custom
* Save the changes

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

•	Click Publish&#x20;

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

### How It Works

1. Open a chat record
2. Select the configured message template
3. A pop-up window will appear displaying only those variables that are configured as Custom

<figure><img src="/files/4WamrzYybGix9AIalQIo" alt=""><figcaption></figcaption></figure>

4\.	Enter the required values for each variable

Example Input:

* {{1}} → Emily
* {{2}} → WhatsApp4Dynamics

5. Click Save and Send to send the message template.

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

**Final Message Sent:**

Hello Emily, 👋

Your interest in WhatsApp4Dynamics has been successfully reviewed, and we’re pleased to inform you that your profile has been successfully reviewed and qualified!

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

### Configure Security Role for Message Templates

Message Templates can be configured with **security roles** to control which users are allowed to view and use them in the Chat UI.

This ensures that sensitive or role-specific templates are accessible only to authorized users, helping maintain consistency, security, and proper communication guidelines across teams.

#### How to Assign Security Roles to a Template

Follow these steps:

1. Go to **Configuration**
2. Navigate to **Message Templates**
3. Select the required **Message Template**

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

4\.    In the field **“Authorized Roles for Template Usage”**, select the security roles

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

5. Click **Save**

#### Without Security Role

**If no security role is assigned to a template:**

* All users can access it from chat interface.
* The template will be visible to all the users in the Chat UI

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

#### With Security Role

**If a security role is assigned to a template:**

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

* Only users with that role can view and use the template
* Users without the required permission will **not see the template** in the Chat UI

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

{% hint style="success" %}
For further queries, reach out to us at <crm@inogic.com>
{% 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.inogic.com/whatsapp4dynamics/configuration/configuring-message-templates.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.
