
# Create a WhatsApp flow in 5 minutes or less

> **In simple terms:** This guide shows you how to build a chatbot for WhatsApp. You'll create a conversation flow (like a decision tree) that automatically talks to your customers, collects information, or even verifies their identity—all through WhatsApp.

{{<tags>}}

Using WhatsApp Customer Engagement, you can create a flow in 5 minutes or less. A flow is a sequence of steps that you can use to interact with or collect your users' information. For example, you can create a flow to collect a user’s name, email, and phone number. You can also create a flow to perform identity validations such as validating user's document identification, driver's license, collect your user’s digital signature, or other available validations in our [**Validators' Suite**](/digital-identity/validators/).

## Creating flows

In order to use a flow, you need to create a flow template. A flow template is a reusable flow that you can use in one of our integrations such as [**WhatsApp**](/customer-engagement/), [**Web**](/digital-identity/create_process_link/), [**iFrame**](/digital-identity/iframe_integration/) or [**Webview**](/digital-identity/webview_integration/). You can create a flow template using the **Customer Engagement Dashboard**.

## Create a flow template using Customer Engagement Dashboard

To create a flow template using Customer Engagement Dashboard, follow these steps:

1. Once you are in our products' [**Dashboard**](/guides/dashboard/), click the **Open** button in the **WhatsApp Customer Engagement** product.
{{<img src="/images/illustrations/accounts_dash.png" alt="accounts dashboard" width="90%" class="rounded-md">}}
2. Click on **My flows** and then on the **Create new flow** button. 
{{<img src="/images/illustrations/new_flow.png" alt="new flow" width="90%" class="rounded-md">}}
3. Select **Blank Template** and click on the **Continue** button. 
{{<img src="/images/illustrations/flow_chat.png" alt="new flow option" width="50%" class="rounded-md">}}
4. In the tab **Process** add the steps you want to use in your flow considering your use case, using our drag & drop flowbuilder’s steps. For example, you can add a step to collect a user’s name, email, and phone number or steps to perform the validations your user needs to complete. 
For more information please visit [**How to Use WhatsApp to Validate Identity**](/guides/how_use_whatsapp_kyc/) guide.
{{<img src="/images/illustrations/flowbuilder.png" alt="drag and drop flowbuilder" class="rounded-md">}}

## Adding live capture for Identity Validations on WhatsApp

For improved security when requesting image uploads to your users, Truora has full support for Meta's Whatsapp live image capture functionality out of the box without any extra configuration. This ensures that users can only upload photos that they've taken at the moment of making their verification, avoiding common security issues when allowing uploading from gallery.

The following blocks support the automatic use of live capture for image uploads by default:

- Document Verification
{{<img src="/images/illustrations/wa_flows_photopicker/document_verification_box.png" alt="document verification box" width="45%" class="border border-slate-300 rounded-md">}}
- Invoice Verification (Proof of address)
{{<img src="/images/illustrations/wa_flows_photopicker/proof_of_address_box.png" alt="proof of address verification box" width="45%" class="border border-slate-300 rounded-md">}}
- Document + Face Verification with Selfie
{{<img src="/images/illustrations/wa_flows_photopicker/doc_and_face_box.png" alt="doc and face verification with selfie box" width="45%" class="border border-slate-300 rounded-md">}}
- Open questions with image inputs
{{<img src="/images/illustrations/wa_flows_photopicker/open_question_with_image_box.png" alt="open question with image input box and sidebar" width="45%" class="border border-slate-300 rounded-md">}}

For more information on how to configure and customize the live capture feature you can follow our [detailed guide](/guides/create_a_whatsapp_flow_with_photopicker/).

## Saving your flow template

Once you have created and configured your flow template, you can:

* Save it as a draft (option **save without publishing**)
* Save the template and publish it
* Save the template as a copy
* Test the flow template (only if you have saved it)

{{<img width="" src="/images/illustrations/save_flow.png" alt="saving whatsapp flow" class="rounded-md">}}

## Configure the flow template

Click the **Settings** tab in the top bar, and then the **General** tab in the sidebar. Here you can set the following:

- **Chatbot language**: Select English, Spanish, or Portuguese.
- **Process expiration time**: Set the maximum time a user has to complete the flow. This can be set to a minimum of 30 minutes and a maximum of 23 hours and 30 minutes.
- **Default failure message**: Set a default message to be sent to users when a flow fails. This is deactivated by default; you may activate and customize your message as needed.
- **Re-engagement message**: If the user does not respond to the last message within a specified time, a reminder message will be sent to inform them that they have a flow in progress. This feature is deactivated by default, but you can activate it and customize both the time interval and the message as needed.
- **Initial instructions message**: An initial default message with instructions to go back, forward, or restart. This is activated by default. The message can be in English, Spanish, or Portuguese, depending on the language set in the **Chatbot language**. The following are the default messages per language:
    - **English (EN)**: At any time you can send: *BACK* to return to the previous step. *EXIT* to abandon the flow. *RESTART* to start again.
    - **Spanish (ES)**: En cualquier momento podrás enviar: *ATRAS* para volver al paso anterior. *SALIR* para abandonar el flujo. *REINICIARr* para iniciar nuevamente.
    - **Portuguese (PT)**: A qualquer momento você pode enviar: *VOLTAR* para voltar à etapa anterior. *SAIR* para abandonar o fluxo. *REINICIAR* para começar novamente.

{{<img src="/images/illustrations/configure_flow_wapp.gif" alt="whatsapp flow configuration" class="rounded-md">}}

**NOTE:** The process expiration time has a **shelf life of 2 hours by default** and its maximum shelf life is 24 hours. The process expiration time is the time that the user has to complete the flow. If the user does not complete the flow within the time limit, the flow will expire and the user will have to start the flow again. The process expiration time can be configured in the Flow **Settings** tab.

## Testing the flow template using an Inbound message

Once you have configured and saved your flow template, you can test it using an inbound message. To do this, follow these steps:

* Click the **Test conversation** button in the upper right side of the screen.
* Select the **Chatbot phone** option. This is your WABA line.
* Enter the message you want to set as **Inbound message** to trigger the chatbot.
* Click the **Continue** button.

{{<img src="/images/illustrations/test_flow.png" alt="test flow" width="40%" class="rounded-md">}}

* Click **Open conversation** to start the flow immediately, or click **Copy link** and paste it in a new tab to start the flow.

{{<img src="/images/illustrations/test_flow_preview.png" alt="test flow" width="40%" class="rounded-md">}}

## Get Results of process

- You can access the results of your chatbot process (or flow) through Truora's dashboard or by querying Truora's API. For more details, refer to the [**Guide to Get Results**](/guides/wa_get_result/).
- To get a process (or WhatsApp flow) results automatically, you must subscribe webhooks. For more information, please visit the [**WhatsApp Webhooks guide**](/guides/wa_webhooks/).
