# Whatsapp Calldeflector 2.0

{% hint style="info" %}
Read this if you have Smart Apps in use that have been ordered before 21 october 2024. New Smart Apps documentation can be found within the [Marketplace](https://manuals.dialox.ai/store/marketplace-apps).
{% endhint %}

The Whatsapp Calldeflector 2.0 bot app enables your bot to answer incoming chat messages on your social channels. It can be used to configure any type of social messaging assistant. In the basis it is configured to forward messages to an employee (escalate) while sending an automatic response, but it can also be configured for automatic answering on recognized questions.

On other channels then Whatsapp it will deflect to Whatsapp after waiting for too long on an employee to join and respond. This way your audience is forced to continue in Whatsapp which makes them re-engageable, even when they are offline.&#x20;

For this, the Whatsapp Calldeflector 2.0 bot app is configured with three flows:

* Playbook
* Inbox
* Phone2wa
* Web2wa

Read about flows in the [Flows](https://manuals.dialox.ai/studio/flows) section to understand what type of nodes your can use for configuring the Social Inbox for your use case.

## Quick steps

### Generic setup

At minimum you need to take care of the following

1. Make sure your [opening hours](https://manuals.dialox.ai/settings/app-settings/opening-hours) are configured
2. Make sure your [whatsapp channel](https://manuals.dialox.ai/studio/channels/whatsapp) is enabled (or another chat channel)

### Playbook

Make sure to review and change the following nodes in the Playbook flow. Click on Flows and then open your Playbook.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FKJwQ4PrvW3ZdNt64b2a1%2FScreenshot%202024-04-22%20at%2014.34.26.png?alt=media&#x26;token=16ffcf32-b684-4ada-85ec-558013edab12" alt=""><figcaption></figcaption></figure>

The playbook will open the conversation on 3 separate channels in order to elicit the user intention. You can see this by inspecting the little badges at the [main](https://manuals.dialox.ai/studio/flows/triggers#main) entry point, this will be telephony, chat and whatsapp channel related situations. The user, depending on calling or chatting will then try to answer the questions created (in this case no questions are trained) therefore the unknown flow will trigger the auto reply flow.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FvGXOD5p329faRj6MfvuY%2FScreenshot%202024-04-22%20at%2014.57.09.png?alt=media&#x26;token=625a08c1-b70c-4c02-bc6a-82b036297441" alt=""><figcaption></figcaption></figure>

However, on Whatsapp the conversation is never started by the bot (unless a template message is sent) but only by a Contact. Therefore, the auto\_reply will kick in directly when a message is sent that isn't automatically replied by a [dialog trigger](https://manuals.dialox.ai/studio/flows/nodes/control-flow-invoke-dialog). The auto\_reply flow is invoked by the node [Go to flow](https://manuals.dialox.ai/studio/flows/nodes/control-flow-go-to-flow).

### Inbox

The Inbox will open the conversation on Web using a [say node](https://manuals.dialox.ai/studio/flows/nodes/say) and a [prompt](https://manuals.dialox.ai/studio/flows/nodes/prompt) in order to elicit the user intention. You can see this by inspecting the little badges at the [main](https://manuals.dialox.ai/studio/flows/triggers#main) entry point. The prompt will then try to answer the question (in this case no questions are trained) therefore the unknown flow will trigger the [Escalate: smart ](https://manuals.dialox.ai/studio/flows/nodes/escalate-smart)flow.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FxvrFXqQVlmXy6XdvhmYb%2FScreenshot%202024-04-22%20at%2014.50.05.png?alt=media&#x26;token=99e16c38-4211-4386-aa43-a30fabe4d7bd" alt=""><figcaption></figcaption></figure>

However, on Whatsapp the conversation is never started by the bot (unless a template message is sent) but only by a Contact. Therefore, the Escalate: smart kick in directly when a message is sent that isn't automatically replied by a [dialog trigger](https://manuals.dialox.ai/studio/flows/nodes/flow-control-invoke-dialog).&#x20;

### Phone2wa&#x20;

Also called Phone to Whatsapp is the functionality which causes Speech to deflect to Whatsapp, making the Whatsapp Calldeflector complete. When someone calls the extension the caller can be deflected to the Whatsapp inbox using the following flows:

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2F7tVNAHS2wkmXDpbw9mXa%2FScreenshot%202024-04-22%20at%2014.49.26.png?alt=media&#x26;token=24bfa21a-cfa1-4004-82fb-92e85963aae0" alt=""><figcaption></figcaption></figure>

Once the connected has been closed, the caller will receive a Whatsapp based on the number the call has given up to be contacted on. See the [Ask: phone](https://manuals.dialox.ai/studio/flows/nodes/ask-phone) for reference. After the caller reacts to the incoming whatsapp deflection template the conversation has officially been moved from speech to chat. &#x20;

### Web2wa

Also call Webchat to Whatsapp is the functionality to drag the live Chatwidget based conversation to a Whatsapp conversation. When the user wants to connect via the Chat widget and it takes to long, the user will be shown a QR which can be scanned to deflect to Whatsapp, as shown down below.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2Fi2zwl9ugSeTPXojhpisP%2FScreenshot%202024-04-22%20at%2015.02.28.png?alt=media&#x26;token=a6fb8760-31ff-4e1f-b327-b4ea9b2d3f9b" alt=""><figcaption></figcaption></figure>
