# Inbound Message Guide

{{<tags >}}

An **inbound message** is any message that a user sends to your WABA line (WhatsApp Business Account line). There are two primary ways to start a conversation or flow with inbound messages:

- **Default Inbound Flow**: This flow is triggered by any message from the client. For example, if a client texts *"Hi, I'd like some information"*, or maybe just *"Hello"* to your phone line, the default flow will be initiated.

- **Specific Inbound Flow**: This flow is triggered by a specific message set by your company to initiate a particular flow. For instance, if the user sends "Contact Support", this specific message will trigger a specific flow that is associated with the exact "Contact Support" message.

By configuring these inbound flows, you can manage and direct customer interactions efficiently, ensuring a smooth and automated response process.

## Prerequisites

To flawlessly perform all the steps of this guide, the following prerequisites must be met:

1. **Truora Account**: If you don't already have one, learn how to {{< newtab href="/customer-engagement/account/" >}}Set up a Truora account{{< /newtab >}}.
2. **Activated Whatsapp line**: Follow this {{< newtab href="/guides/waba_acquisition/" >}}guide{{< /newtab >}} to acquire and activate WhatsApp lines in **Truora**.
3. **A Created Whatsapp Flow**: Have at least one flow already built. Learn how to {{< newtab href="/guides/flows" >}}Create a WhatsApp Flow{{< /newtab >}} in **Truora**.

## Default Inbound Flow

A **Default Inbound Flow** is a conversational flow that triggers when a user sends any message to your **Chatbot**. For instance, a client might text *"Hi, I'd like some information"*, *"Hello"*, or simply *"Hi"*. If you've configured a default flow, it will automatically start in response to any message.

### Setting a default flow for any inbound message

1. Log in to the [Truora dashboard](https://connect.truora.com/) and click **Open** in the **Customer Engagement** section.
2. Ensure you have already created a flow. If not, visit the {{< newtab href="/guides/flows" >}}Create a WhatsApp Flow{{< /newtab >}} guide.
3. Click on **Settings** to display the list of your account's **Whatsapp lines**.
4. In the **Default flow** column of the desired **Whatsapp line**, click **Select flow**.
5. Select the flow you created for this WhatsApp line and click **Select flow**.
6. If a flow is already selected, you can always:
    - Change it by clicking on the flow and repeating the process.
    - Remove it by clicking on the three dots beside the flow, then clicking **Remove flow**

{{<img width="100%" src="/images/illustrations/inbound/inbound_default.gif" alt="default_inbound" class="border border-slate-300 rounded-md">}}

You've successfully configured a default flow for this WhatsApp line. Any message received on this line will now trigger the flow you created for this purpose.

## Specific Inbound Flow

In addition to the **Default Inbound Flow**, which is triggered by any message sent to your WhatsApp line, you can also define a **Specific Inbound Flow**. This flow will be triggered only if a specific message, predefined by your company, is sent to your WhatsApp line.

### Setting a specific inbound message for a specific flow

You can create a **Specific Inbound Message** while creating or editing a **flow** that will start with this message:

1. Log in to the [Truora dashboard](https://connect.truora.com/) and click **Open** in the **Customer Engagement** section.
2. Ensure you have already created a flow. If not, visit the {{< newtab href="/guides/flows" >}}Create a WhatsApp Flow{{< /newtab >}} guide.
3. Click on **My flows** and open your flow by clicking on its name.
4. Click on **Edit** and select the **Your client sends it to you** box in the flow builder.
5. In the **Initial message configuration** right side bar, select **Custom message**, and in **Chatbot phone** select your **Whatsapp line**.
6. Write the exact message that your client will send to trigger the conversation. For example *"Contact Support"*.
7. Click on **Save Message**.
8. Once saved, you have the option to either **clear** or **edit** the message if needed.
9. Finally, click on **Save and publish** to complete the process.

Now, if a client texts *"Contact Support"* to your **Chatbot phone**, it will trigger the associated flow.

{{<img width="100%" src="/images/illustrations/inbound/inbound_specific.gif" alt="specific_inbound" class="border border-slate-300 rounded-md">}}

## Testing your Inbound message

To test your inbound conversation once you have **Saved and published** the flow, follow these steps:

1. Click on **Test Conversation**.
2. Select **Your user sends it** and **Continue**.
3. Review the **Chatbot phone** and **Message** and click on **Continue**.
4. Test your conversation:
    - Click on **Open conversation** to directly open and test the Whatsapp conversation with the **Chatbot**.
    - Or click on **Copy link** and use this link to test the conversation on any device.

{{<img width="100%" src="/images/illustrations/inbound/inbound_test.gif" alt="inbound_test" class="border border-slate-300 rounded-md">}}

<br>

---

## Creating a link to your WABA line

Encourage your users to start a flow by creating a link that you can place on your landing page, media campaigns, or app buttons. When the user clicks the link, a WhatsApp chat with your WABA line will open, and you can even set a pre-configured message to trigger a specific flow.

You can follow the official WhatsApp [How to use click to chat](https://faq.whatsapp.com/5913398998672934/?helpref=hc_fnav) guide or use the following instructions:

### Create a link without pre-filled message

To create a link to your WABA line without a pre-filled message, which allows users to type whatever they want, use the following format. This is useful for triggering the **Default Flow** of your line:

  - ``https://wa.me/<number>``

Replace ``<number>`` with your full phone number in international format, excluding any zeroes, brackets, or dashes.

**Examples**:
  - Correct: ``https://wa.me/1XXXXXXXXXX``
  - Incorrect: ``https://wa.me/+001-(XXX)XXXXXXX``

### Create a link with a pre-filled message

You can create a link that, when clicked, opens a WhatsApp chat with a pre-filled message ready to be sent. This is useful for triggering a **Specific Inbound Flow**  related to the pre-filled message.

Use the following format: 

  - ``https://wa.me/<number>?text=<message>``

Replace ``<number>`` with the full phone number in international format, and ``<message>`` with the **URL-encoded** text you want to pre-fill.

**Example**:

  - ``https://wa.me/11234567890?text=Contact%20Support``

