> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with voice flow agents

In this tutorial, you will learn how to create a voice flow agent that uses dial logic. Dial logic lets users select options by pressing the corresponding numbers on a dial pad. This way, the voice flow agent can guide users through predefined paths based on users' choices.

## Prerequisites

* You need to have access to a Cognigy account.
* One of the following speech provider credentials is required for testing a voice flow agent: Microsoft Azure Speech Services, Google Speech Services, or Amazon Polly.

## Add speech provider credentials

To add credentials for a speech provider, follow these steps:

After adding credentials for the speech provider, you can create your first voice agent.

## Build a voice flow agent

To build a voice flow agent, follow these steps:

**1. Create a flow**

1. In the left-side menu of the Project, go to **Design > Flows**.
2. Create a new Flow by clicking **+ New Flow** in the upper-right corner.
3. In the **New Flow** window, do the following:
   * **Name** — add a unique name, for example, `Getting Started`.
   * **Description** — add a relevant description, for example, `Getting Started Guide for voice agent`.
4. Click **Create**.

**2. Add a set session config node**

1. In the Flow editor, click **+** and select **Extensions > VG**.
2. Create a new Node by selecting **Set Session Config** from the list. The Node appears in the Flow editor.
3. Left-click the **Set Session Config** Node to open the Node editor.
4. In the Node editor, go to the **DTMF** section.
5. In the DTMF section, activate the **Capture DTMF Signals** setting and remove `#` from the **DTMF Submit Digit** field.
6. Click **Save** Node.

**3. Add a question node**

1. Below the Set Session Config Node, add a Question Node.
2. In the Question Node editor, configure the following settings:
   * From the **Question Type** list, select **Number**.
   * From the **Output Type** list, select **Text**.
   * In the **Text** field, enter the following sentences:`Welcome to our customer service line. To learn about payment options, press 1. To contact technical support, press 2.`
3. Click **Save Node**.

**4. Add a lookup node**

1. Below the Question Node, add a Lookup Node.
2. In the Lookup Node editor, select the **Text** type and click **Save Node**.

**5. Add case nodes**

1. Click the **Case** Node. In the **Value** field, specify `1`, then click **Save Node**.
2. Below the **Case** Node, add a Say Node.
3. In the Say Node editor, go to the Text field and in specify the following sentences: `We accept the following payment methods:Credit Card (Visa, Mastercard, American Express), PayPal for secure online payments, or Bank Transfer for direct transfers from your bank account. Thank you for contacting us! Have a great day! Goodbye.`
4. Click **Save Node**.
5. Click the second **Case** Node. In the **Value** field, specify `2`.
6. Below the second **Case** Node, add a Say Node.
7. In the Say Node editor, go to the Text field and in specify the following sentences: `Apologies, all support members are busy. Try to contact us later. Thank you for your patience.`
8. Click **Save Node**.

**6. Add a hang up node**

1. At the end of the Flow, add a Hang Up Node.
2. Click **Save Node**.

Once the voice agent is created, you can test it using the Interaction Panel.

## Test your voice flow agent

To test your voice flow agent, follow these steps:

1. In the existing Flow, open the Interaction Panel by clicking ![interaction-panel](https://mintcdn.com/cognigy-15abf2ba/TTEslzNwYb1tMNix/_assets/icons/blue/interaction-panel.svg?fit=max\&auto=format\&n=TTEslzNwYb1tMNix\&q=85\&s=2eebd120eb62855e9030c9116c266189) **Chat with your Agent** in the upper-right corner of the page. The Interaction panel appears on the right side of the Flow Editor.
2. Initiate a call by clicking ![call](https://mintcdn.com/cognigy-15abf2ba/TTEslzNwYb1tMNix/_assets/icons/blue/phone.svg?fit=max\&auto=format\&n=TTEslzNwYb1tMNix\&q=85\&s=b0dfd79d576387a44d002e45323ed759) **> Start Call** at the bottom of the Interaction Panel.
3. Listen to the message from the voice agent and then select either number 1 or 2 on the dial pad ![dialpad](https://mintcdn.com/cognigy-15abf2ba/Aanuo4ANeXDMmSVF/_assets/icons/black-and-white/dialpad.svg?fit=max\&auto=format\&n=Aanuo4ANeXDMmSVF\&q=85\&s=4fd646b78fe88ffdfa433564c317a09d) located in the bottom-right corner of the Interaction Panel.
4. The voice agent will respond with a voice message according to the number you selected, and then finish the conversation. If you want to listen to a specific voice output again, hover your cursor over the message in the Interaction Panel and click **Voice Preview**.

![Voice flow agent conversation in the Interaction Panel with dial pad](https://mintcdn.com/cognigy-15abf2ba/OcqlmLQ-_Mh92ha1/_assets/ai/develop/getting-started-voice.png?fit=max\&auto=format\&n=OcqlmLQ-_Mh92ha1\&q=85\&s=5efe4a64be6e5c54d2d7c34b83b1da44)

To deploy your Flow in production, you will need to create a Voice Gateway Endpoint and set up a SIP Trunk provider.
For these steps, refer to the [Voice Gateway](https://docs.cognigy.com/voice-gateway/overview) documentation.

## What's next?

* Familiarize yourself with the core concepts of building flow agents, such as [Projects](https://docs.cognigy.com/ai/agents/develop/projects-and-flows/projects.md), [Flows](https://docs.cognigy.com/ai/agents/develop/projects-and-flows/overview), [Nodes](https://docs.cognigy.com/ai/agents/develop/node-reference/overview), and [CognigyScript](https://docs.cognigy.com/ai/platform-features/cognigyscript).
* Enhance your flow agent's performance with AI features, such as [NLU](https://docs.cognigy.com/ai/platform-features/nlu/overview), [LLMs](https://docs.cognigy.com/ai/agents/develop/gen-ai-and-llms/llms) and [Generative AI](https://docs.cognigy.com/ai/agents/develop/gen-ai-and-llms/llms), as well as [Knowledge AI](https://docs.cognigy.com/ai/agents/develop/knowledge-ai/overview).
* Explore [test](https://docs.cognigy.com/ai/agents/test/interaction-panel/overview) and [deploy](https://docs.cognigy.com/ai/agents/deploy/endpoints/overview) features.
* Connect your flow agent to the [contact center](https://docs.cognigy.com/ai/escalate/handovers.md).
