

# Create quick responses for use with chat and email contacts in Amazon Connect
<a name="create-quick-responses"></a>

Quick responses provide contact center agents with pre-written responses in English that they can use during chat and email contacts. Quick responses are especially useful for answering common customer inquiries. They help improve agent productivity, reduce handle times, and improve customer satisfaction scores. Quick responses are available in English only.

You can use the Amazon Connect admin website or [Connect AI agents actions](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_Operations.html) to create quick responses. You can add single quick responses or import many of them at the same time. You can also personalize responses with [user-defined attributes](add-attributes.md). In addition, you can assign shortcut keys to quick responses, and associate them with [routing profiles](https://docs.aws.amazon.com/connect/latest/adminguide/about-routing.html) so that agents can quickly access relevant content.

By default, CCP enables agents to search quick responses. Custom builders can use [Amazon Connect Streams](https://github.com/aws/amazon-connect-streams) to programmatically implement quick response search in their implementations of CCP.

For information about how agents search for quick responses, see [Search for quick responses to customers in the Contact Control Panel (CCP)](search-qr-ccp.md).

**Tip**  
Even though quick responses use the Connect AI agents APIs, quick responses don't lead to additional billing. You only pay for the chat message price or email price. For more information, see [Amazon Connect Pricing](https://aws.amazon.com/connect/pricing/).

**Topics**
+ [Assign security profile permissions](quick-response-permissions.md)
+ [Set up an Amazon Connect knowledge base](setup-knowledgebase.md)
+ [Add quick responses for use with chat and email contacts](quick-responses.md)
+ [Add attributes for personalizing quick responses](add-attributes.md)
+ [Edit quick responses](edit-quick-responses.md)
+ [Delete quick responses in Amazon Connect](delete-qr.md)
+ [Import quick responses](add-data.md)
+ [View the import history for your quick responses](view-import-history.md)
+ [Enable quick responses in a custom CCP](enable-qr-search.md)

# Assign permissions to manage quick responses in Amazon Connect
<a name="quick-response-permissions"></a>

To create and manage quick responses in the Amazon Connect admin website, users need the Content Management security profile permissions. The following image shows these permissions on the **Security profiles** page.

![\[The various quick response permissions, all with green check marks.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/content-mgmt-qr.png)


Following is a description of the Content Management permissions.
+ **All** – Enables all permissions, but you must have a custom view to enable **Access**.
+ **Access** – Grants users access to custom views. This checkbox remains unavailable until you create a custom view.
+ **Create** – Enables users to create Connect AI agents knowledge bases and quick responses in the Amazon Connect admin website. This setting also enables users to View and Edit. It does not grant permission to delete quick responses.
+ **View** – Enables users to view quick responses in the Amazon Connect admin website.
+ **Edit** – Enables users to edit quick responses in the Amazon Connect admin website.
+ **Delete** – Enables users to delete quick responses in the Amazon Connect admin website.

If you want the same users to add personalized attributes to quick responses, they will also need the **Channels and flows**, **Flows - Publish** permission. 

For information about adding permissions to an existing security profile, see [Update security profiles in Amazon Connect](update-security-profiles.md).

# Set up an Amazon Connect knowledge base to store quick responses
<a name="setup-knowledgebase"></a>

You must create an [Amazon Connect knowledge base](connect-ai-agent.md) to store quick responses. You can use the Amazon Connect admin website to create the knowledge base with a single click. The site uses AWS owned keys to encrypt data. 

**Note**  
You can create your own key by providing a custom [ ServerSideEncryptionConfiguration](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_ServerSideEncryptionConfiguration.html#wisdom-Type-ServerSideEncryptionConfiguration-kmsKeyId) in an [CreateKnowledgeBase](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_CreateKnowledgeBase.html) API call. For more information, see [Initial set-up for AI agents](ai-agent-initial-setup.md), in this guide.

The following steps explain how to use the Amazon Connect admin website to create an Amazon Connect knowledge base.

**To create a knowledge base**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an admin account, or an account with **Content Management - Quick responses - Create** permission in its security profile.

1. On the navigation bar, choose **Content Management**, then **Quick responses**.

1. On the **Quick responses** page, choose **Get started**.
**Note**  
If the **Get started** button isn't available, sign in with an account that has the admin security profile, or ask another admin for help.

1. Remain on the page until the process ends. Do not refresh the page until the process ends. An indicator shows the status.  
![\[A horizontal green status bar.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-3.png)

The finished knowledge base provides two sample quick responses.
+ The sample responses are associated with the [basic routing profile](https://docs.aws.amazon.com/connect/latest/adminguide/concepts-routing.html), if that exists in your Amazon Connect instance.
+ The sample responses are set to **Inactive**, meaning agents can't see or search for them. Activating a sample quick response makes it visible and searchable by agents assigned to the basic routing profile.
+  If the basic routing profile is not present in your Amazon Connect instance, the sample quick responses are associated with **All** routing profiles. After you activate a sample quick response, all agents can see and search for that response, regardless of their assigned routing profiles. 

**Note**  
Quick responses are only available in the **Chat** and **Email** channels. 

# Add quick responses for use with chat and email contacts in Amazon Connect
<a name="quick-responses"></a>

This topic explains how to add a quick response by using the Amazon Connect admin website. For the APIs used to create and manage quick responses programmatically, see [APIs to create and manage quick responses](#apis-quick-responses). 

**To add responses**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Content Management - Quick responses - Create** permission.

1. On the navigation bar, choose **Content Management**, then **Quick responses**.  
![\[Menu showing "Content Management" and "Quick responses."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-1.png)

1. On the **Quick responses** page, choose **Add response**.
**Note**  
If the **Add response** button isn't available, sign in with an account that has the admin security profile, or ask another admin for help.

1. On the **Add response** page, choose whether the response is for chat, email, or both channels.

1. On the **Add response** page, enter a name, description, and shortcut key for the quick response. You must enter a unique name and shortcut key because agents will search on those values.

1. Open the **Routing profiles** list and select one or more profiles. You can select a maximum of 20 profiles, or choose **All**. Only the agents assigned to a given profile can see the quick responses associated with that profile.

1. (Optional) Choose **Activate: Make this response visible for agents** if you want agents to see and search for the response.

1. In the **Content** section, enter the response, then choose **Save**.

**Note**  
If you configured user-defined attributes in the flow block, those attributes, such as customer name, appear when an [agent searches for a response in CCP](search-qr-ccp.md). For more information, see [Set contact attributes](set-contact-attributes.md).

## APIs to create and manage quick responses
<a name="apis-quick-responses"></a>

Use the following APIs to create and manage quick responses programmatically:
+ [CreateQuickResponse](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_CreateQuickResponse.html)
+ [UpdateQuickResponse](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_UpdateQuickResponse.html)
+ [DeleteQuickResponse](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_DeleteQuickResponse.html)
+ [GetQuickResponse](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_GetQuickResponse.html)
+ [ListQuickResponses](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_ListQuickResponses.html)
+ [SearchQuickResponses](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_SearchQuickResponses.html)
+ [UpdateQuickResponse](https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_UpdateQuickResponse.html)

# Add attributes for personalizing quick responses in Amazon Connect
<a name="add-attributes"></a>

You can personalize quick responses by adding user-defined attributes. To do so, you use the Amazon Connect admin website to create responses that include [Amazon Connect contact attributes](https://docs.aws.amazon.com/connect/latest/adminguide/connect-contact-attributes.html). You can also use the [Set contact attributes](set-contact-attributes.md) block to create user-defined attributes in flows.

When quick responses contain user-defined attributes, the value of those attributes, such as customer name, appear when an [agent searches for a response in CCP](search-qr-ccp.md).

The following steps explain how to add user-defined attributes to quick responses. You first create a set-contact attribute, and then you add the attribute to a quick response.

**To create a set-contact attribute**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Flows - Edit or Create** permissions.

1. On the navigation bar, choose **Routing**, then **Flows**.  
![\[Menu showing "Routing" and "Flows".\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/routing-flows.png)

1. On the **Flows** page, the **Type** column lists each type of flow. Choose the flow that you want to add attributes to.

1. Follow the steps in [Creating a set contact attribute](set-contact-attributes.md).
**Note**  
In the contact attribute configuration, select the **User defined** namespace, then save and publish the flow.

1. When finished, complete the next set of steps.

You can follow these steps when creating or updating a quick response.

**To add an attribute to a quick response**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Content Management - Quick responses - Create or Edit** permission.

1. On the left navigation bar, choose **Content Management**, then **Quick responses**.  
![\[Menu showing "Content Management" and "Quick responses."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-1.png)

1. Choose **Add response** to create a response.

   —or—

   Select the checkbox next to the quick response that you want to personalize, then choose **Edit**.

1. Choose the content section, enter the quick response content, then use handlebar syntax to enter a user-defined attribute. Make sure you include the `Attributes` namespace prefix. For example, **\$1\$1Attributes.Customer\$1\$1**.

   The following image shows a quick response for an email.   
![\[A quick response with an attribute for the customer name.\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/email-quick-response-attributes.png)

1. Choose **Save**.

The following steps explain how to test attributes in CCP.

**To test attributes**

1. Log in to the Amazon Connect admin website chat testing page at https://*instance name*.my.connect.aws/test-chat.

1. Choose the flow with the user-defined attribute.

1. Start a chat and enter **/\$1*searchText***, where *searchText* is the assigned shortcut key.

**Note**  
For more information, see [Test voice, chat, and task experiences in Amazon Connect](chat-testing.md).

# Edit quick responses in Amazon Connect
<a name="edit-quick-responses"></a>

This topic explains how to use the Amazon Connect admin website to edit a quick response. To edit a quick response programmatically, see [UpdateQuickResponse](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_UpdateQuickResponse.html) in the *Connect AI agents API Reference*.

**To edit a response**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Content Management - Quick responses - Edit** permission.

1. On the navigation bar, choose **Content Management**, then **Quick responses**.  
![\[Menu showing "Content Management" and "Quick responses."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-1.png)

1. On the **Quick responses** page, choose the name of the quick response that you want to edit. You can also select the checkbox next to the response, then choose **Edit**.

1. As needed, change the following fields: 
   + **Name**
   + **Description**
   + **Shortcut key**
   + **Routing Profiles**
   + **Activate/Deactivate quick response**
   + **Content**
   + **Channel**

1. Choose **Save**.

# Delete quick responses in Amazon Connect
<a name="delete-qr"></a>

This topic explains how to use the Amazon Connect admin website to delete a quick response. To delete a quick response programmatically, see [DeleteQuickResponse](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_DeleteQuickResponse.html) in the *Connect AI agents API Reference Guide*.

**Important**  
You can't undo a deletion.
Agents can't see or use deleted quick responses.

**To delete a response**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Content Management - Quick responses - Delete** permission.

1. On the navigation bar, choose **Content Management**, then **Quick responses**.  
![\[Menu showing "Content Management" and "Quick responses."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-1.png)

1. On the **Quick responses** page, select the checkbox next to the response that you want to delete. You can select a maximum of 20 responses.

1. Choose **Delete**.

   A success message appears:  
![\[A green checkmark and the words "Successfully Deleted selected Quick response."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/deletion-success-message.png)

**Note**  
If the **Delete** button is inactive, sign in to an Amazon Connect an account that has the required security profile, or ask another admin for help.
Remain on the page until the delete operation finishes. 

# Import quick responses to Amazon Connect
<a name="add-data"></a>

You can import a maximum of 100 quick responses at a time from a .csv file. This topic explains how to use the Amazon Connect admin website to import quick responses. To import quick responses programmatically, see [StartImportJob](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_StartImportJob.html) in the *Connect AI agents API Reference*.

**To import responses**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Content Management - Quick responses - Create** permission.

1. On the navigation bar, choose **Content Management**, then **Quick responses**.  
![\[Menu showing "Content Management" and "Quick responses."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-1.png)

1. On the **Quick responses** page, choose **Import**. 

1. In the **Import** dialog box, choose the **Responses Import Template.csv** link, then save the resulting **Response Import Template.csv** file to your desktop. The file opens in Microsoft Excel or a similar spreadsheet program.

1. In the .csv file, enter values in each column. Remember the following:
   + The **Name** and **Shortcut key** values must be unique across all the quick responses in your Amazon Connect instance.
   + Values in the **Routing Profile** column are case sensitive and must match the name of your routing profile exactly.
   + Do not rename or change the values in the first row of the .csv file. Those header keys are reserved and used to generate payloads for the [CreateQuickResponse](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_CreateQuickResponse.html) API.
   + Remove all instances of **<\$1Required field>** from the .csv file. They're only for information.

1. Save the .csv file, return to the Amazon Connect admin website, and in the **Import** dialog box, choose **Upload file**.

1. Locate and open the .csv file, then choose **Import**.

   Success or failure messages appear when the import operation finishes. If the operation fails, choose the **Download failed imports link** in the message. Check the .csv file for leading or trailing spaces, and for any messages about the error.

You can navigate away from the **Quick response** page before the import job finishes. Choose the **View import history** link, located below the list of responses, to view status of your import jobs.

# View the import history for your Amazon Connect quick responses
<a name="view-import-history"></a>

Amazon Connect retains import history for the lifetime of your knowledge base. To delete that history, you must use the [DeleteKnowledgeBase](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_DeleteKnowledgeBase.html) action to delete the knowledge base.

This topic explains how to use the Amazon Connect admin website to view import histories. To view import histories programmatically, see [ListImportJobs](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_ListImportJobs.html) in the *Connect AI agents API Reference*.

**To view import history**

1. Log in to the Amazon Connect admin website at https://*instance name*.my.connect.aws/. Use an **Admin** account, or an account assigned to a security profile that has **Content Management - Quick responses - View** permission.

1. On the left navigation bar, choose **Content Management**, then **Quick responses**.  
![\[Menu showing "Content Management" and "Quick responses."\]](http://docs.aws.amazon.com/connect/latest/adminguide/images/agent-application-1.png)

1. On the **Quick responses** page, choose the **View import** history link.

# Enable Amazon Connect quick responses in a custom Contact Control Panel (CCP)
<a name="enable-qr-search"></a>

To enable your agents to use quick responses for an embedded or custom CCP, you use the [ Amazon Connect Streams library](https://github.com/amazon-connect/amazon-connect-streams) on GitHub to call the [SearchQuickResponse](https://docs.aws.amazon.com/amazon-q-connect/latest/APIReference/API_SearchQuickResponses.html) API and return a list of quick response search results to CCP. For more information, see [Amazon Connect Streams Documentation](https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md#quick-responses-apis) on Github.

**Note**  
To prevent search API misuse, we implemented default values for the following request parameters:  
`debounceTime` – 250ms between subsequent `SearchQuickResponse` API calls
`maxSearchResults` – 25
Search priority order:  
`shortcut key`
`name`
`content`
`description`

For information about the agent's experience using quick responses, see [Search for quick responses to customers](search-qr-ccp.md).