# Set Up Chat IVR

{% hint style="info" %}
If the Add button does not appear for a user, verify the user has a data access policy assigned to an OU that gives them IVR create permissions. The same applies to the Edit or delete buttons.
{% endhint %}

1. Navigate to Queues & IVRs | IVRs | Add
2. Enter a Name and Description for the IVR.
3. Create the IVR Flow using the Designer tab
4. [Set up Chat Link](https://cc.docs.landis.cloud/setup/set-up-chat-channel/set-up-chat-link)

### IVR Designer

The Designer Tab can be used to create an IVR flow. Blocks can be added, edited and deleted by using the controls on the top left corner.

There are 8 call blocks that either trigger the flow or perform an action:

| Block                                         | Description                                                          |
| --------------------------------------------- | -------------------------------------------------------------------- |
| [Root](#example-root-block)                   | Triggers the flow                                                    |
| [DataDip](#example-data-dip-block)            | Sends or retrieves data from an external API                         |
| [CallAction](#example-call-action-block)      | Transfers or ends the chat                                           |
| [PlayPrompt](#example-play-prompt-block)      | Sends the text of the prompt as a message                            |
| [ListenToTone](#example-listen-to-tone-block) | Sends Prompt message (optional) and waits for a menu option response |
| [MultiTone](#example-multitone-block)         | Stores the response into a variable                                  |
| VoiceInput                                    | Not supported in chat channel                                        |
| [Regex](#example-regex-block)                 | Performs a regex match                                               |
| [TextToSpeech](#example-text-to-speech)       | Sends the text as a message                                          |
| [BusinessHours](#example-business-hours)      | Routing based on business hours set                                  |
| [HolidayHours](#example-holiday-hours)        | Routing based on holiday hours set                                   |
| Callback                                      | Not supported in chat channel                                        |
| [AIQuery](#example-ai-query)                  | Sends a prompt to OpenAI and stores the response in a variable       |
| [Copilot Agent](#example-copilot-agent)       | Connects the chat to a Copilot agent                                 |

* Each flow begins with the Root block which triggers the flow when there is an incoming chat.
* There can be multiple of the same blocks which perform different actions.
* Each instance of a block has a unique ID.&#x20;
* The Transition to Block property specifies the Name/ID of next block that will perform the next action.
* The Name field is not optional
* The Description field is optional.

{% hint style="info" %}
For information about Data Value fields on Root State, DataDip, VoiceInput, Regex, AIQuery, and MultiTone blocks, see [Data Collection](#data-collection)
{% endhint %}

#### Variables

* Variables can be created and referenced in blocks.&#x20;
  * Default variables are CallerNumber, CallerName, and ScenarioId.
  * Variables are case sensitive.
  * Only DataDip, VoiceInput, Regex, AIQuery, and MultiTone blocks can create new variables. The names of the variables created by these blocks are prefixed by the block name followed by \_result, e.g. AccountNumber\_result.
  * Variables can be referenced in the following blocks: DataDip, Regex, CallAction, TextToSpeech, AIQuery, and Callback. For more details on using variables in these blocks, refer to the examples below.
  * Variables can used to populate Data Collection fields. See [Data Collection](https://cc.docs.landis.cloud/administration/data-collection)&#x20;

#### **Example Root Block:**

Explanation: When there is an incoming chat, the next action will be the block with ID 2

![](https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FfpbGHS4BdAmsxVX8i6iR%2Fimage.png?alt=media\&token=02b42c9d-33f8-4bf7-94d2-b8a6f7865879)

#### **Example Data Dip Block:**

If Input Parameter Names field is empty, the body of the HTTP POST will include all the available variables. If variables are specified, only the contents of those variables will be included in the body of the post. Multiple variables are required to be separated by commas.

<div align="left"><figure><img src="https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FBCzV8kCcuX8tCuMCbkxP%2Fimage.png?alt=media&#x26;token=ebe4a042-0447-4c38-967e-af40292165b5" alt="" width="297"><figcaption></figcaption></figure></div>

Explanation: A HTTP post is sent to the URL.  A Microsoft Flow is triggered by the HTTP POST. A decision is made by the Power Automate Flow and the returned response will be stored in the "datadip\_result" variable. See [IVR Data Dip Power Automate Flow Configuration](https://cc.docs.landis.cloud/appendix/ivr-data-dip-power-automate-flow-configuration). The next action will be the block with ID 7. If there is no response to the HTTP POST after 30 seconds, the next block will be 6.

#### **Example Call Action Block:**

* Type of Action To Take options:
  * Transfer To Queue/IVR
    * Use chat Widget ID (Cannot use the dropdown options)
  * Transfer To User **(Not supported in Chat Channel)**
  * Transfer To Voicemail **(Not supported in Chat Channel)**
  * End Call
  * Transfer to PSTN.  **(Not supported in Chat Channel)**
* On Transfer Failure **(Not supported in Chat Channel)**

![](https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FSWmeCjUHOGNHnb2b3E8Z%2F2022-11-02%2016_14_04-Window.png?alt=media\&token=6707ea88-a38d-40a2-a829-9506eeb44f60)

Note: Variable can be used for the action target. The variable name is required to be placed inside curly braces.

Explanation: Disconnect Chat.

#### **Example Play Prompt Block:**

The block will play back the specified audio prompt.

![](https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FxIsiFbT8KRtcCAOpJhRZ%2Fimage.png?alt=media\&token=007bbd51-8588-468c-b182-b77e835c3057)

Explanation: The text of the audio prompt will be sent as a chat message. Only text to speech prompts are supported. The next action will be the block with ID 5.

#### **Example Listen to Tone Block:**

The block will wait for a chat response *while and after* a prompt/message is sent.

* Audio Prompt Values (The text of the audio prompt will be sent as a chat message. Only text to speech prompts are supported.)
  * Audio Prompt
  * Empty (no prompt)
* Repeat Prompt Values (The text of the audio prompt will be sent as a chat message. Only text to speech prompts are supported.)
  * Audio Prompt
  * \[Disabled] (no prompt. Will skip the next timeout period.)
  * Empty (replays prompt URI or plays default prompt if prompt URI is null)
* Cannot Connect Prompt Values (The text of the audio prompt will be sent as a chat message. Only text to speech prompts are supported.) Plays only if On Timeout Go To is empty.&#x20;
  * Audio Prompt
  * \[Disabled] (no prompt)
  * Empty (plays default prompt)
* On Timeout Go To
  * Next Block Name - ID
  * Empty (If empty and no menu options have been selected, the Cannot Connect prompt will be sent before the chat is automatically disconnected.)
* Number Of Repeats
  * 0-1000
* Repeat Wait Seconds
  * 0-1000
* Voice Input Enabled **(Not supported in Chat Channel)**
  * **The keyword match field is supported. You can list multiple keywords, separated by commas.**

![](https://cc.docs.landis.cloud/~gitbook/image?url=https%3A%2F%2F1039569329-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lm5wszNs6c24n4NZ30U%252Fuploads%252Fr19ljG5tzej4kpELRVfH%252F2025-07-29%252016_26_39-.png%3Falt%3Dmedia%26token%3Dc8ac7c86-c830-40dd-9b8a-b59e653c0fd9\&width=768\&dpr=3\&quality=100\&sign=70c6e0c7\&sv=2)

Explanation: Audio prompt message is sent. If no chat message is received, after 10 seconds the repeat prompt message is sent. Again, if no chat message is received, after another 10 seconds the chat will timeout and the next block will be ID 3. If "0" or "sales" message is received, the next action will be ID 3. If "1" or "Business Hours" message is received, the next action will be ID 7.

#### Example MultiTone Block:

The block will collect the chat response and store it in a variable.

Note: Pause on Pound and Pause time are settings not currently enabled.

![](https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FSWZpc19L3nGFG18daBnk%2F2022-08-11%2010_42_58-Window.png?alt=media\&token=4bb3ca30-07e4-4b10-b87a-77279d1cca92)

Explanation: Block will collect the chat response and store it in a variable named GatherAccountNumber\_result. Next block is ID 8.

#### Example Regex Block:

The block will perform one or multiple regex matches on a variable. The expressions are evaluated in order top down. On No Match Found option is used if no matches are found. The Regex Replace field is optional but can be used to create a variable to be referenced in a later block.

<div align="left"><figure><img src="https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FWYBZKp6p8I8b1pMpIhWv%2Fimage.png?alt=media&#x26;token=ee86d110-bd91-4910-9f58-97639247637f" alt="" width="298"><figcaption></figcaption></figure></div>

Explanation:&#x20;

If NewDataDip\_result variable matches 123, the call will be transferred to Queue01 and "Queue01" will be stored in a variable.

If NewDataDip\_result variable matches 456, the call will be transferred to Queue02 and "Queue02" will be stored in a variable

If NewDataDip\_result does not match 123 or 456, the call will be transferred to Queue01.

#### Example Text To Speech:

The block will send the text in the text field in a message.

<div align="left"><figure><img src="https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2F3OEXZsCASGbtAVzxWbnE%2Fimage.png?alt=media&#x26;token=6871bd5a-103a-4489-b437-7f3648a13160" alt="" width="297"><figcaption></figcaption></figure></div>

Note: Variables can be used in the text. The variable name is required to be placed inside curly braces. When an opening curly brace is entered, a dropdown list of available variables will appear, and they can be selected from the list.

Explanation: Block will send the contents of the Text field. Next block is ID 7.

#### Example Business Hours:

The block will determine the chat action if during business hours or during an off time.

![](https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FiaDtuElUyAz8sktColU7%2Fimage.png?alt=media\&token=a8f035d2-c1ec-487e-9040-d1d65d3385b6)

Explanation: Business hours set "Default" will be observed using Eastern Standard Time. On hours next block is 6. DefaultOff action next block is 7

#### Example Holiday Hours:

The block will determine the chat action when during a holiday hours set.

![](https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2FphIYHnAyL9xBdXPkHb20%2Fimage.png?alt=media\&token=cf3cae3d-6bfa-4a16-ab44-8ff7f7d7657b)

Explanation: The "2023 Holidays" will be observed using Easter Standard Time. If the current time is during the 2023 holiday hours set, next block is 6. When off holiday, next block is 7.

#### Example Copilot Agent

The block will connect the chat to a Copilot agent through the existing chat interface. When the Copilot agent escalates the chat, it moves to the next block in the IVR.

To setup a Copilot agent, see [Copilot Agents](https://cc.docs.landis.cloud/administration/copilot-agents)

<div align="left"><figure><img src="https://1039569329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lm5wszNs6c24n4NZ30U%2Fuploads%2F8GuK4TWU8ePyGOU9AVYE%2Fimage.png?alt=media&#x26;token=c5fb5daa-d070-44e2-b25b-f349eff48df9" alt="" width="300"><figcaption></figcaption></figure></div>

Explanation: The chat is connected to the "Landis KB Agent". This Copilot agent will handle the chat until it is escalated. At that point it will move to block 6.

#### Example AI Query

The block sends the prompt to Open AI and stores the response in a variable.

![](https://cc.docs.landis.cloud/~gitbook/image?url=https%3A%2F%2F1039569329-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-Lm5wszNs6c24n4NZ30U%252Fuploads%252Fg14m1TxxeLbB3KDs7FiK%252Fimage.png%3Falt%3Dmedia%26token%3Dac963eb6-a106-42a4-9b38-f3c905e5b6e0\&width=768\&dpr=3\&quality=100\&sign=49f0fe75\&sv=2)

Note: Variables can be used in the Prompt text. The variable name is required to be placed inside curly braces. When an opening curly brace is entered, a dropdown list of available variables will appear, and they can be selected from the list.

Explanation: The text in the prompt field will be sent to OpenAI. The response will be stored in NewAIQuery\_result variable. Next block is 8.
