

# Use the flow designer in Amazon Connect to create flows
<a name="create-contact-flow"></a>

The starting point for creating all flows is the flow designer. It's a drag-and-drop work surface that enables you to link together blocks of actions. For example, when a customer first enters your contact center, you can ask for some input and then play a prompt such as "Thank you."

For descriptions of the available flow blocks, see [Flow block definitions in the flow designer in Amazon Connect](contact-block-definitions.md).

**Topics**
+ [

## Before you begin: develop a naming convention
](#before-create-contact-flow)
+ [

## Choose a flow type
](#contact-flow-types)
+ [

## Create an inbound flow
](#create-inbound-contact-flow)
+ [

## Add tags to flows and flow modules
](#tag-flows-and-flow-modules)
+ [Use the mini-map to navigate a flow](flow-minimap.md)
+ [Customize the name of a block](set-custom-flow-block-name.md)
+ [Undo and redo history](undo-redo-history.md)
+ [Add notes to a block](add-notes-to-block.md)
+ [Copy and paste flows](copy-paste-contact-flows.md)
+ [Archive, delete, and restore flows](delete-contact-flow.md)
+ [Generate logs for published flows](logs.md)
+ [Roll back a flow](flow-version-control.md)
+ [Best practices for flows](bp-contact-flows.md)
+ [Contact initiation methods and flow types](contact-initiation-methods.md)

## Before you begin: develop a naming convention
<a name="before-create-contact-flow"></a>

Chances are you're going to create tens or hundreds of flows. To help you stay organized, it's important to develop a naming convention. After you start creating flows, we strongly recommend against renaming them.

## Choose a flow type
<a name="contact-flow-types"></a>

Amazon Connect includes a set of specific flow types. **Each type has only those blocks for a specific scenario.** For example, the flow type for transferring to a queue contains only the appropriate flow blocks for that type of flow. 

**Important**  
When you create a flow, you need to choose the right type for your scenario. Otherwise, the blocks you need may not be available. 
You can't import flows of different types. This means if you start with one type and need to switch to another to get the right blocks, you have to start over.

The following flow types are available. 


| Type | When to use | 
| --- | --- | 
|  **Inbound flow**  |  This is the generic flow type that's created when you choose the **Create flow** button, and don't select a type using the drop-down arrow. It creates an inbound flow.  This flow works with voice, chat, and tasks.   | 
|  **Campaign flow**  |  Use to manage what the customer experiences during an outbound campaign. This flow only works with outbound campaigns.  | 
|  **Customer queue flow**  |  Use to manage what the customer experiences while in queue, before being joined to an agent. Customer queue flows are interruptible and can include actions such as an audio clip apologizing for a delay and offering an option to receive a callback, leveraging the **Transfer to queue** block. This flow works with voice, chat, and tasks.   | 
|  **Customer hold flow**  |  Use to manage what the customer experiences while the customer is on hold. With this flow, one or more audio prompts can be played to a customer using the **Loop prompts** block while waiting on hold. This flow works with voice.   | 
|  **Customer whisper flow**  |  Use to manage what the customer experiences as part of an inbound call immediately before being joined with an agent. The agent and customer whispers are played to completion, then the two are joined. This flow works with voice and chat.   | 
|  **Outbound whisper flow**  |  Use to manage what the customer experiences as part of an outbound call before being connected with an agent. In this flow, the customer whisper is played to completion, then the two are joined. For example, this flow can be used to enable call recordings for outbound calls with the **Set recording behavior** block. This flow works with voice and chat.   | 
|  **Agent hold flow**  |  Use to manage what the agent experiences when on hold with a customer. With this flow, one or more audio prompts can be played to an agent using the **Loop prompts** block while the customer is on hold. This flow works with voice.   | 
| **Agent whisper flow** | Use to manage what the agent experiences as part of an inbound call immediately before being joined with a customer. The agent and customer whispers are played to completion, then the two are joined. This flow works with voice, chat, and tasks.   | 
| **Transfer to agent flow** | Use to manage what the agent experiences when transferring to another agent. This type of flow is associated with transfer to agent quick connects, and often plays messaging, then completes the transfer using the **Transfer to agent** block. This flow works with voice, chat, and tasks.   Do not place any sensitive information in this flow. When a cold transfer occurs, the transferring agent disconnects before transfer is completed, and this flow is run on the caller. This means information in the flow is played to the caller, not the agent.    | 
| **Transfer to queue flow** | Use to manage what the agent experiences when transferring to another queue. This type of flow is associated with transfer to queue quick connects, and often plays messaging, then completes the transfer using the **Transfer to queue** block. This flow works with voice, chat, and tasks.  | 

## Create an inbound flow
<a name="create-inbound-contact-flow"></a>

Use these steps to create an inbound flow. 

1. In the left navigation menu, choose **Routing**, **Flows**.   
![\[The Amazon Connect navigation menu.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/menu-contact-flows.png)

1. Choose **Create flow**. This opens the flow designer and creates an inbound flow (Type = Flow). 

1. Type a name and a description for your flow.

1. Search for a flow block using the **Search** bar, or expand the relevant group to locate the block. For descriptions of the flow blocks, see [Flow block definitions in the flow designer in Amazon Connect](contact-block-definitions.md).

1. Drag and drop contact blocks onto the canvas. You can add blocks in any order or sequence, as connections between elements aren't required to be strictly linear.
**Tip**  
You can move blocks around the canvas so the layout aligns to your preferences. To select multiple blocks at the same time, press the **Ctrl** key on your laptop (or the **Cmd** key on a Mac), choose the blocks you want, and then use your mouse to drag them as a group within the flow. You can also use the **Ctrl**/**Cmd** key to start at one point on the canvas and drag your pointer across the canvas to select all blocks included in the frame. 

1. Double-click the title of the block. In the configuration pane, configure settings for that block and then choose **Save** to close the pane.

1. Back on the canvas, click on the first (the originating) block.

1. Choose the circle for the action to perform, such as ****Success.

1. Drag the arrow to the connector of the group that performs the next action. For groups that support multiple branches, drag the connector to the appropriate action. 

1. Repeat the steps to create a flow that meets your requirements.

1. Choose **Save** to save a draft of the flow. Choose **Publish** to activate the flow immediately.

**Note**  
All connectors must be connected to a block in order to successfully publish your flow.

## Add tags to flows and flow modules
<a name="tag-flows-and-flow-modules"></a>

A *tag* is a custom metadata label that you can add to a resource to make it easier to identify, organize, and find in a search. Tags are comprised of two individual parts: A tag key and a tag value. This is referred to as a key:value pair.

A tag key typically represents a larger category, while a tag value represents a subset of that category. For example you could have tag key=Color and tag value=Blue, which would produce the key:value pair `Color:Blue`.

You can add resource tags to your flows and flow modules. Use the following steps to add a resource tag from the flow designer.

1. Open the tag section on flow designer page for a chosen flow or flow module.  
![\[The flow designer.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/tag-flows-and-flow-modules-1.png)

1. Enter a **Key** and **Value** combination to tag the resource.  
![\[Tags section in the flow designer.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/tag-flows-and-flow-modules-2.png)

1. Choose **Add**. Tags are not persisted until you save or publish the flow.

For more information, see [Apply tag-based access control in Amazon Connect](tag-based-access-control.md)

# Use the mini-map in Amazon Connect to navigate a flow
<a name="flow-minimap"></a>

In the lower left corner of the flow designer, there's a miniaturize view of the entire flow. Use this view to help you easily navigate the flow. The drag-to-move mini-map has visual highlights that enable you to quickly move to any point in the flow.

The following image shows the location of the mini-map in the flow designer. The arrow points to the toggle that you use to hide or show the mini-map.

![\[A flow with the mini-map.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-minimap.png)


The following GIF shows an example of how you can use the mini-map to navigate a large flow. Click or tap the mini-map to move the view to the desired location on the flow designer. 

![\[A flow that shows the mini-map.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-minimapgif.gif)


Note the following functionality:
+ It shows your current view in green outline.
+ It highlights selected blocks in blue, notes in yellow, search results in orange, and termination blocks in black.
+ It allows continuous movement of the view when you drag on the mini-map.
+ It returns the view to the **Entry** block and trims unused space when you choose **Reset**.

# Customize the name of a flow block in Amazon Connect
<a name="set-custom-flow-block-name"></a>

To help you distinguish blocks in a flow, you can customize the names of blocks. For example, when there are multiple **Play prompt** blocks, and you want to distinguish between them at a glance you can assign each block their own name. 

Custom flow block names appear in CloudWatch logs under the `Identifier` field. This makes it easier for you to review the logs to diagnose issues.

**Important**  
The following characters are not allowed in the block name or `Identifier` field: (% : ( \$1 / ) = \$1 , ; [ ] \$1 \$1)
The following strings are not allowed in the block name or `Identifier` field: \$1\$1proto\$1\$1, constructor, \$1\$1defineGetter\$1\$1, \$1\$1defineSetter\$1\$1, toString, hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toLocaleString, and valueOf. 

There are two ways you can specify a custom block name:
+ On the block, choose **...**, and then choose **Add block name**, as shown in the following GIF.  
![\[A block with a custom name.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/set-custom-flow-block-name-1.gif)
+ You can also customize the name of the block on the **Property** page, as shown in the following GIF.  
![\[A block with a custom name.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/set-custom-flow-block-name-2.gif)

# Undo and redo actions in the flow designer in Amazon Connect
<a name="undo-redo-history"></a>

You can undo and redo actions in the flow designer. Choose the undo and redo items on the toolbar. Or, with your cursor on the flow designer canvas, use the shortcut keys: Ctrl\$1Z to undo, Ctrl\$1Y to redo. 

**Tip**  
On a Mac, Ctrl\$1Y opens the history page instead of performing a redo.

To access a history of your actions that you can undo, choose the **Undo** dropdown button on the toolbar, as shown in the following image.

![\[The undo dropdown.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-undo.png)


## Limits
<a name="undo-redo-limits"></a>


| Action | Limit | 
| --- | --- | 
|  History limit  |  Up to 100 actions can be undone.  | 
|  Dragging unconnected connector  |  This action cannot be undone.  | 
|  Folding of notes  |  This action cannot be undone.  | 
|  Page reload  |  The undo history is not retained after a page is reloaded.  | 

# Add comments to a flow block in the flow designer in Amazon Connect
<a name="add-notes-to-block"></a>

To add notes to a block, on the toolbar choose **Annotation**. Or, with your cursor on the flow designer canvas, use the shortcut keys: Ctrl \$1 Alt \$1N. A yellow box opens for you to type up to 1000 characters. This enables you to leave comments that others can view.

The following image shows the flow designer toolbar, the annotation box, and an annotation that is attached to a block.

![\[A block with annotations.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-annotations.png)


The following GIF shows how to move notes around the flow designer and attach them to a block.

![\[Notes on the flow designer.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-annotationsGIF.gif)


The following image shows the dropdown menu that allows you to view a list of all the notes in a flow. Choose a note to navigate to it. Use the search box to search notes across the flow.

![\[The list note menu item.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-annotations2.png)


Note the following functionality:
+ Unicode and emojis are supported.
+ You can copy and paste, undo, and redo into the note box.
+ You can search notes across the flow.
+ When a block is deleted, the notes are deleted. When a block is restored, the notes are restored.

## Limits
<a name="note-limits"></a>


| Item | Limit | 
| --- | --- | 
|  Character limit  |  1000 characters per note  | 
|  Attachment limit  |  5 notes per block  | 
|  Note limit  |  100 notes per flow  | 

# Copy and paste flows in Amazon Connect
<a name="copy-paste-contact-flows"></a>

You can select, cut, copy, and paste a complete flow or multiple blocks within or across flows. The following information is copied:
+ All configured settings in the selected flow blocks.
+ The layout arrangements.
+ The connections.

The following image shows the copy item on the flow designer toolbar.

![\[The copy item on the toolbar.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-copytoolbar.png)


Or, if desired, use the shortcut keys. 

**Windows: CTRL\$1C to copy, CTRL\$1V to paste, and CTRL\$1X to cut**

1. To select multiple blocks at the same time, press the **Ctrl** key, and choose the blocks you want.

1. With your cursor on the flow designer canvas, press **Ctrl\$1C** to copy the blocks.

1. Press **CTRL\$1V** to paste the blocks.

**Mac: Cmd\$1C to copy, Cmd\$1V to paste, and Cmd\$1X to cut**

1. To select multiple blocks at the same time, press the **Cmd** key, and choose the blocks you want.

1. Press **Cmd\$1C** to copy the blocks.

1. Press **Cmd\$1V** to paste the blocks.

**Tip**  
Amazon Connect uses the clipboard for this feature. Paste won't work if you edit the JSON in your clipboard and introduce a typo or other error, or if you have multiple items saved to your clipboard. 

# Archive, delete, and restore flows in Amazon Connect
<a name="delete-contact-flow"></a>

Flows and modules must be archived before you can delete them from your Amazon Connect instance. Archived flows and modules can be restored.

**Warning**  
Deleted flows and modules cannot be restored. They are permanently deleted from your Amazon Connect instance.

## Important things to know
<a name="important-archive-flow"></a>
+ **Use caution when archiving flows or modules**. Amazon Connect does not validate whether the flow or module you are archiving is being used in other published flows. It does not warn you that the flow is in use. 
+ Default flows cannot be archived or deleted. If you attempt to archive a default flow, you'll get message similar to the following image.  
![\[The Archive option in the dropdown menu.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-archive-error.png)
+ Flows and modules that are associated with queues, quick connects, or phone numbers cannot be archived. You need to disassociate the resources from the flows before you can archive them.
+ Archived flows and modules count towards your **Flows per instance** and **Modules per instance** service quotas. You must delete them to not have them counted. For more information about quotas, see [Amazon Connect service quotas](amazon-connect-service-limits.md).

## Archive a flow or module
<a name="archive-flow"></a>

There are two ways you can archive flows or modules.

**Option 1: Open the flow or module and then archive it**

1. Log in to Amazon Connect with a user account that has the **Numbers and flows** - **Flows** - **Edit** permission in its security profile. If you are archiving a flow module, you need **Flow modules** - **Edit** permission.

1. On the navigation menu, choose **Routing**, **Flows**.

1. Open the flow or module you want to archive.

1. On the flow designer page, choose the dropdown menu, and then choose **Archive**, as shown in the following image.  
![\[The Archive option in the dropdown menu.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/contact-flow-archive.png)

1. Confirm you want to archive the flow or module.

1. To locate the archived flow or module, choose **View archive**.

**Option 2: Search for flow or module and then archive it**
+ On the **Flows** page, search for the flow or module you want archive, and then choose **Archive** from the **...** menu, as shown in the following image.  
![\[The Archive option in the dropdown menu.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-archive-option2.png)

## Restore an archived flow or module
<a name="restore-flow"></a>

There are two ways you can restore flows or modules.

**Option 1: View list of archived flows or modules, and choose Restore**

1. Log in to the Amazon Connect admin website with a user account that has the **Numbers and flows** - **Flows** - **Edit** permission in its security profile. If you are restoring a flow module, you need **Flow modules** - **Edit** permission.

1. On the navigation menu, choose **Routing**, **Flows**.

1. On the **Flows** page, choose **View archive**.

   1. To restore archived modules, on the **Flows** page, choose the **Modules** tab, and then choose **View archive**.

1. On the **Flows Archive** page, next to the flow or module you want to restore, under **Actions**, choose **...** and then choose **Restore**. This option is shown in the following image.  
![\[The Amazon Connect Flows Archive page showing the restore option in the Actions menu for an archived flow.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-restorearchive1.png)

**Option 2: Restore the archived flow or module from the flow designer**

1. Open the archived flow or module in the flow designer.

1. From the dropdown menu, choose **Restore**, as shown in the following image.  
![\[The Amazon Connect flow designer dropdown menu showing the Restore option for an archived flow.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/flow-restorearchive.png)

## Delete an archived flow or module
<a name="delete-flow"></a>

You can delete archived flows and modules manually by using the Amazon Connect admin website, or programmatically by using the [DeleteContactFlow](https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteContactFlow.html) API. 

**Warning**  
Deleted flows and modules cannot be restored. They are permanently deleted from your Amazon Connect instance.

**Option 1: View list of archived flows or modules, and choose Delete**

1. Log in to the Amazon Connect admin website with a user account that has the **Numbers and flows** - **Flows** - **Remove** permission in its security profile. If you are deleting a flow module, you need **Flow modules** - **Remove** permission.

1. On the navigation menu, choose **Routing**, **Flows**.

1. On the **Flows** page, choose **View archive**.

   1. To delete modules, on the **Flows** page, choose the **Modules** tab, and then choose **View archive**.

1. On the **Flows Archive** page, next to the flow or module you want to delete, under **Actions**, choose **...** and then choose **Delete**. 

1. Confirm that you want to delete the flow or module.

**Option 2: Delete the archived flow or module from the flow designer**

1. Open the archived flow or module in the flow designer.

1. From the dropdown menu, choose **Delete**.

1. Confirm that you want to delete the flow or module.

# Generate logs for published flows in Amazon Connect
<a name="logs"></a>

After your flow is published live, you can use flow logs to help analyze flows and quickly find errors your customers encounter. If needed, you can roll back to a previous version of the flow. 

For more information about using flow logs, see [Use flow logs to track events in Amazon Connect flows](about-contact-flow-logs.md). 

# Flow version control: Roll back a flow
<a name="flow-version-control"></a>

## View a previous version of a flow
<a name="how-to-view-previous-flows"></a>

This procedure is especially useful if you want to research how a flow has been changed over time. 

1. In the flow designer, open the flow you want to view.

1. Choose the **Latest: Published** dropdown to view a list of previously published versions of the flow.

   For default flows that are provided with your Amazon Connect instance, the oldest flow in the list is the original version. The date matches when your Amazon Connect instance was created. For example, in the following image, the original default flow is dated 07/21/22.  
![\[The Latest published dropdown box listing the dates the default agent hold was published.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/default-agent-hold-versioning.png)
**Note**  
For users with tag-based access controls configured on their security profile, the dropdown will be restricted to **Latest: Published** and **Latest: Saved** versions. To learn more about tag-based access controls in Amazon Connect, see [Apply tag-based access control in Amazon Connect](tag-based-access-control.md).

1. Choose the version of the flow to open and view it. You can view all the blocks and how they are configured.

1. Next, you can do one of the following: 
   + To return to the most recently published version, choose it from the **Latest: Published** dropdown list. 
   + Make changes to the previous version and choose **Save as** from the dropdown to save it with a new name. Or choose **Save** from the dropdown to assign the same name.   
![\[The Save dropdown box, the Save as option.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/default-agent-hold-saveas.png)
   + Or, choose **Publish** to return the previous version to production. 

## Roll back a flow
<a name="rollback"></a>

1. In the flow designer, open the flow you want to roll back.

1. Use the drop-down to choose the version of the flow you want to roll back to. If you choose **Latest**, it reverts the flow to the most recent published version. If there isn't a published version, it reverts to the most recent saved version. 
**Note**  
To see a consolidated view of all changes across all flows, click the **View historical changes** link at the bottom of the **Flows** page. You can filter to a specific flow by date or user name.

1. Choose **Publish** to push that version into production. 

# Best practices for flows in Amazon Connect
<a name="bp-contact-flows"></a>

Use the list of recommended best practices in this topic when you are using and creating flows.
+ Use consistent attribute naming conventions across all AWS services. Use camel case for yourAttributeNames to avoid confusion when passing and referencing variables. 
+ Use standard naming conventions for attribute names. Don't use spaces or special characters that could impact downstream reporting processes such as AWS Glue crawlers. 
+ Create modular flows. Make the flows as small as possible, and then combine modular flows into an end-to-end contact experience. This helps to keep your flows manageable, and you won't require numerous regression testing cycles.
+ When you set **User Defined** or **External** values in dynamic attribute fields, use only alphanumeric characters (A-Z, 0–9) and periods. No other characters are allowed.
+ Ensure all error branches are routed to a block that effectively handles the error or terminates the contact.
+ Use a **Set logging behavior** block to enable or disable logging for segments of the flow where sensitive information is collected and can't be stored in CloudWatch.
+ Ensure that attributes used in the flow are set and referenced correctly. If there are periods prepended to the attribute names, you are likely using JSONPath (\$1.) format while also selecting a variable type from the pick list. For example, using:
  + **Save text as attribute** and value `$.External.variableName` works as expected.
  + `Set dynamically` and value `variableName` works as expected.
  + **Set dynamically** and `$.External.variableName` results in a prepended period. 
+ Before transferring a call to agent and putting that call in a queue, ensure that **Check hours of operation** and **Check staffing** blocks are used. They verify that the call is within working hours and that agents are staffed to service.
+ Ensure that callbacks are offered before and after queue transfer by using **Check queue status** blocks. Include a condition for **Queue capacity** that is greater than X, where X is a number representing your expected queue capacity.
  + If queue capacity exceeds the expected capacity, use a **Get Customer Input** block to offer a callback. This retains the caller's position in the queue and calls them back when an agent is available.
  + In the **Set callback number** block, choose the number to be used to call the customer back in the CCP. Use **System** and **Customer Number** or a new number, collected by a **Store Customer Input** block, using **System** and **Stored customer input**.
  + Finally, add a **Transfer to queue** block. Configure it to **Transfer to callback queue** and configure the callback options to fit your specific use case.
+ Use a **Loop prompts** block in your Customer queue flow to interrupt with a queued callback and external transfer option at regular intervals. 
+ Ensure that all countries referenced in external transfers or used for outbound dialing are added to the service quota for your account/instance.
+ Ensure that all numbers referenced in external transfers are in E.164 format. Drop the national trunk prefix that you use when calling locally. This prefix would be the leading 0 for most of Europe, 1 for the US. The prefix is replaced by the country code. For example, the UK mobile number **07911 123456** in E.164 format is **\$144 7911 123456 (tel:\$1447911123456)**.
+ Ensure that there are no infinite loops in the flow logic. Also ensure that for each call, the flow connects the caller to an agent, bot, or transferred externally for further assistance.

# Contact initiation methods and flow types in your Amazon Connect contact center
<a name="contact-initiation-methods"></a>

Every contact in your Amazon Connect contact center is initiated by one of the following methods: 
+ INBOUND
+ OUTBOUND
+ TRANSFER
+ CALLBACK
+ API
+ QUEUE\$1TRANSFER
+ DISCONNECT
+ WEBRTC\$1API
+ EXTERNAL\$1OUTBOUND
+ MONITOR
+ AGENT\$1REPLY
+ FLOW
+ CAMPAIGN\$1PREVIEW

The initiation method is stored in the `InitiationMethod` field of the contact record. 

You can create flows appropriate for a given initiation method when you know which [types of flows ](create-contact-flow.md#contact-flow-types) the initiation method uses.

For each initiation method, this topic explains which types of flows are run.

## INBOUND
<a name="inbound-initiation-method"></a>

The customer initiated a voice (phone) contact with your contact center.
+ When the contact successfully connects with the phone number of your contact center, an [Inbound flow](create-contact-flow.md#contact-flow-types) is presented to caller.
+ During the transition in the **Inbound flow**, if the customer is put in a queue, a [Customer queue flow](create-contact-flow.md#contact-flow-types) is played to customer.
+ After the agent becomes available to handle the caller and accept the contact, a [Agent whisper flow](create-contact-flow.md#contact-flow-types) is played to the agent.
+ After a [Agent whisper flow](create-contact-flow.md#contact-flow-types) completes, a [Customer whisper flow](create-contact-flow.md#contact-flow-types) is played to customer.
+ After the both whisper flows are played successfully to the agent and the customer respectively, the caller gets connected to agent for interaction.

To summarize, for a simple inbound call, the following flow types are played before caller is connected to agent: 

1. **Inbound flow**

1. **Customer queue flow**

1. **Agent whisper flow**

1. **Customer whisper flow**

## OUTBOUND
<a name="outbound-initiation-method"></a>

An agent initiated voice (phone) contact to an external number, by using their CCP to make the call. 
+ As soon as the destination party picks the call, they are presented with an [Outbound whisper flow](create-contact-flow.md#contact-flow-types).
+ After an **Outbound whisper flow** successfully completes, the agent and the contact are connected for interaction.

Before the call is made, all the blocks before the first **Play prompt** are run. After the customer picks up, the first **Play prompt** and all the blocks after it are run. 

To summarize, an **Outbound flow** type is the only one involved in an outbound call initiated from Amazon Connect.

## TRANSFER
<a name="transfer-initiation-method"></a>

The contact was transferred by an agent to another agent or to a queue, using quick connects in the CCP. This results in a new contact record being created.

Before the agent transfers the contact to another agent or queue, all the flows involved in an INBOUND contact are run.
+ Agent to Agent transfer using Agent Quick Connect
  + After the agent transfers the inbound contact to another agent:
    + A [Agent transfer flow](create-contact-flow.md#contact-flow-types) is played to the source agent.
    + After the destination agent accepts the call, a [Agent whisper flow](create-contact-flow.md#contact-flow-types) is played to destination agent, and then a [Customer whisper flow](create-contact-flow.md#contact-flow-types) is played to source agent.
    + After all three flows are successfully run, the interaction begins between the source and destination agents.
    + During this whole process, the inbound caller is on hold and a [Customer hold flow](create-contact-flow.md#contact-flow-types) is played to the inbound caller during hold time.

    After the source agent is connected with destination agent, the source agent can do one of the following actions:
    + Choose **Join**. This joins all parties on the call: source agent, destination agent, and the customer are joined in a conference call.
    + Choose **Hold all**. This puts the destination agent and the customer on hold. 
    + Put destination agent on hold, so only the source agent can talk to the customer.
    + Choose **End call**. The source agent leaves the call but the destination agent and the customer are directly connected and continue talking.

  To summarize for an agent to agent transfer call, the following flow types are run:

  1. **Agent transfer flow**

  1. **Agent whisper flow** (played to the destination agent) 

  1. **Customer whisper flow** (played to the source agent) during whole this process

  1. **Customer hold flow** played to the original caller
+ Agent to Queue transfer using Queue Quick Connect
  + After the agent transfers the inbound call to another queue:
    + A [Queue transfer flow](create-contact-flow.md#contact-flow-types) is played to source agent.
    + After the agent from the transferred queue accepts the call, an [Agent whisper flow](create-contact-flow.md#contact-flow-types) is played to destination agent, and then a [Customer whisper flow](create-contact-flow.md#contact-flow-types) is played to source agent.
    + After these flows run, the source and destination agent interaction begins.
    + During this whole process, the inbound caller is on hold. A [Customer hold flow](create-contact-flow.md#contact-flow-types) is played to the inbound caller during the hold time.

    After the source agent is connected with destination agent, the source agent can do one of the following:
    + Choose **Join**. This joins all parties on the call: source agent, destination agent, and the customer are joined in a conference call.
    + Choose **Hold all**. This puts destination agent and the customer on hold.
    + Put destination agent on hold, so only the source agent can talk to the customer.
    + Choose **End call**. The source agent leaves the call but the destination agent and the customer are directly connected and continue talking.

  To summarize for agent to queue transfer call, the following flows are played: 

  1. **Queue transfer flow** 

  1. **Agent whisper flow** (played to the destination agent) 

  1. **Customer whisper flow** (played to the source agent) during whole this process

  1. **Customer hold flow** played to the original caller

## CALLBACK
<a name="callback-initiation-method"></a>

The customer is contacted as part of a callback flow. 
+ As soon as agent accepts the callback contact, an [Agent whisper flow](create-contact-flow.md#contact-flow-types) is played to the agent.
+ After the customer accepts the callback call, an [Outbound whisper flow](create-contact-flow.md#contact-flow-types) is played to customer.
+ After these two flows are played, the agent and customer are connected and can interact. 

To summarize, for callback contacts, the following flow types are played:
+ **Agent whisper flow**
+ **Outbound whisper flow**

## API
<a name="api-initiation-method"></a>

 The contact was initiated with Amazon Connect by API. This could be:

1. An outbound contact you created and queued to an agent using the [StartOutboundVoiceContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html) API.

1. A live chat that was initiated by the customer with your contact center where you called the [StartChatContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html) API.

1. A task that was initiated by calling the [StartTaskContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartTaskContact.html) API.

Following is an example of an API initiated contact method:
+ After the outbound contact is successfully initiated using the [StartOutboundVoiceContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundVoiceContact.html) API, an [Inbound flow](create-contact-flow.md#contact-flow-types) provided in the API request is played to the customer.
+ Depending on the configuration of the [Inbound flow](create-contact-flow.md#contact-flow-types), additional flows are played. For example, an [Inbound flow](create-contact-flow.md#contact-flow-types) transfers a customer to an agent for conversation. In this case, a [Customer queue flow](create-contact-flow.md#contact-flow-types) is played to customer while they waiting in queue for an agent.
+ When the available agent accepts the call, an [Agent whisper flow](create-contact-flow.md#contact-flow-types) is played to agent.
+ A [Customer whisper flow](create-contact-flow.md#contact-flow-types) is played to customer.
+ After both whisper flows are played successfully to the agent and customer respectively, the caller is connected to agent for interaction.

To summarize API initiation methods, the following flows are played before the customer is connected to agent:
+ **Inbound flow**
+ **Customer queue flow**
+ **Agent whisper flow**
+ **Customer whisper flow**

## QUEUE\$1TRANSFER
<a name="queue-transfer-initiation-method"></a>

While the customer was in one queue (listening to a [Customer queue flow](create-contact-flow.md#contact-flow-types)), they were transferred into another queue using a flow block.
+ The customer who is waiting in the queue for an agent is presented only with a [Customer queue flow](create-contact-flow.md#contact-flow-types). No additional flows are involved.

## DISCONNECT
<a name="disconnect-initiation-method"></a>

When a [Set disconnect flow](set-disconnect-flow.md) block runs, it specifies which flow to run after a disconnect event during a contact.
+ You can specify only an [Inbound flow](create-contact-flow.md#contact-flow-types) in this block. Since it occurs after the disconnect event, no additional flow is presented to customer.

## WEBRTC\$1API
<a name="webrtc-api-initiation-method"></a>

The contact used the communication widget to make an in-app voice/video call to an agent. This initiation method is created by the same flow types as the Inbound initiation method:

1. **Inbound flow**

1. **Customer queue flow**

1. **Agent whisper flow**

1. **Customer whisper flow**

## EXTERNAL\$1OUTBOUND
<a name="external-outbound-initiation-method"></a>

An agent initiated a voice (phone) contact with an external participant by using either a quick connect in the CCP or a flow block. No flow type is associated with this initiation method.

## MONITOR
<a name="monitor-initiation-method"></a>

A supervisor initiated the monitor feature on a contact connected to an agent. The supervisor can silently monitor the agent and customer, or barge the conversation. No flow type is associated with this initiation method.

## AGENT\$1REPLY
<a name="agent-reply-initiation-method"></a>

An agent has replied to an inbound email contact to create an outbound email reply. For this initiation method the **Outbound whisper flow** type is played. 

## FLOW
<a name="flow-initiation-method"></a>

An email was initiated by the [Send message](send-message.md) block. For this initiation method the **Outbound whisper flow** type is played. 

## CAMPAIGN\$1PREVIEW
<a name="campaign-preview-initiation-method"></a>

The contact was initiated by an outbound campaign using preview dialing mode. The agent previews customer information before the call is placed.

## Override the default contact flows
<a name="override-default-contact-flows"></a>

For all of the initiation methods discussed in this topic, if you don't specify flows for **Agent whisper flow**, **Customer whisper flow**, **Customer queue flow**, or **Outbound whisper flow**, then the default flow of that type runs instead. For a list of default flows, see [Default flows in Amazon Connect for your contact center](contact-flow-default.md).

To override the defaults and use your own flows, use the following blocks:
+ [Set customer queue flow](set-customer-queue-flow.md)
+ [Set hold flow](set-hold-flow.md)
+ [Set whisper flow](set-whisper-flow.md)

For more information, see [Default flows in Amazon Connect for your contact center](contact-flow-default.md). 