QConnectClient

Powered by Amazon Bedrock: Amazon Web Services implements automated abuse detection . Because Amazon Q in Connect is built on Amazon Bedrock, users can take full advantage of the controls implemented in Amazon Bedrock to enforce safety, security, and the responsible use of artificial intelligence (AI).

Amazon Q in Connect is a generative AI customer service assistant. It is an LLM-enhanced evolution of Amazon Connect Wisdom that delivers real-time recommendations to help contact center agents resolve customer issues quickly and accurately.

Amazon Q in Connect automatically detects customer intent during calls and chats using conversational analytics and natural language understanding (NLU). It then provides agents with immediate, real-time generative responses and suggested actions, and links to relevant documents and articles. Agents can also query Amazon Q in Connect directly using natural language or keywords to answer customer requests.

Use the Amazon Q in Connect APIs to create an assistant and a knowledge base, for example, or manage content by uploading custom files.

For more information, see Use Amazon Q in Connect for generative AI powered agent assistance in real-time  in the Amazon Connect Administrator Guide.

Installation

NPM
npm install @aws-sdk/client-qconnect
Yarn
yarn add @aws-sdk/client-qconnect
pnpm
pnpm add @aws-sdk/client-qconnect

QConnectClient Operations

Command
Summary
ActivateMessageTemplateCommand

Activates a specific version of the Amazon Q in Connect message template. After the version is activated, the previous active version will be deactivated automatically. You can use the $ACTIVE_VERSION qualifier later to reference the version that is in active status.

CreateAIAgentCommand

Creates an Amazon Q in Connect AI Agent.

CreateAIAgentVersionCommand

Creates and Amazon Q in Connect AI Agent version.

CreateAIGuardrailCommand

Creates an Amazon Q in Connect AI Guardrail.

CreateAIGuardrailVersionCommand

Creates an Amazon Q in Connect AI Guardrail version.

CreateAIPromptCommand

Creates an Amazon Q in Connect AI Prompt.

CreateAIPromptVersionCommand

Creates an Amazon Q in Connect AI Prompt version.

CreateAssistantAssociationCommand

Creates an association between an Amazon Q in Connect assistant and another resource. Currently, the only supported association is with a knowledge base. An assistant can have only a single association.

CreateAssistantCommand

Creates an Amazon Q in Connect assistant.

CreateContentAssociationCommand

Creates an association between a content resource in a knowledge base and step-by-step guides . Step-by-step guides offer instructions to agents for resolving common customer issues. You create a content association to integrate Amazon Q in Connect and step-by-step guides.

After you integrate Amazon Q and step-by-step guides, when Amazon Q provides a recommendation to an agent based on the intent that it's detected, it also provides them with the option to start the step-by-step guide that you have associated with the content.

Note the following limitations:

  • You can create only one content association for each content resource in a knowledge base.

  • You can associate a step-by-step guide with multiple content resources.

For more information, see Integrate Amazon Q in Connect with step-by-step guides  in the Amazon Connect Administrator Guide.

CreateContentCommand

Creates Amazon Q in Connect content. Before to calling this API, use StartContentUpload  to upload an asset.

CreateKnowledgeBaseCommand

Creates a knowledge base.

When using this API, you cannot reuse Amazon AppIntegrations  DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an InvalidRequestException error.

For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:

  1. Call DeleteKnowledgeBase .

  2. Call DeleteDataIntegration .

  3. Call CreateDataIntegration  to recreate the DataIntegration or a create different one.

  4. Call CreateKnowledgeBase.

CreateMessageTemplateAttachmentCommand

Uploads an attachment file to the specified Amazon Q in Connect message template. The name of the message template attachment has to be unique for each message template referenced by the $LATEST qualifier. The body of the attachment file should be encoded using base64 encoding. After the file is uploaded, you can use the pre-signed Amazon S3 URL returned in response to download the uploaded file.

CreateMessageTemplateCommand

Creates an Amazon Q in Connect message template. The name of the message template has to be unique for each knowledge base. The channel subtype of the message template is immutable and cannot be modified after creation. After the message template is created, you can use the $LATEST qualifier to reference the created message template.

CreateMessageTemplateVersionCommand

Creates a new Amazon Q in Connect message template version from the current content and configuration of a message template. Versions are immutable and monotonically increasing. Once a version is created, you can reference a specific version of the message template by passing in <message-template-id>:<versionNumber> as the message template identifier. An error is displayed if the supplied messageTemplateContentSha256 is different from the messageTemplateContentSha256 of the message template with $LATEST qualifier. If multiple CreateMessageTemplateVersion requests are made while the message template remains the same, only the first invocation creates a new version and the succeeding requests will return the same response as the first invocation.

CreateQuickResponseCommand

Creates an Amazon Q in Connect quick response.

CreateSessionCommand

Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Amazon Q in Connect session for each contact on which Amazon Q in Connect is enabled.

DeactivateMessageTemplateCommand

Deactivates a specific version of the Amazon Q in Connect message template . After the version is deactivated, you can no longer use the $ACTIVE_VERSION qualifier to reference the version in active status.

DeleteAIAgentCommand

Deletes an Amazon Q in Connect AI Agent.

DeleteAIAgentVersionCommand

Deletes an Amazon Q in Connect AI Agent Version.

DeleteAIGuardrailCommand

Deletes an Amazon Q in Connect AI Guardrail.

DeleteAIGuardrailVersionCommand

Delete and Amazon Q in Connect AI Guardrail version.

DeleteAIPromptCommand

Deletes an Amazon Q in Connect AI Prompt.

DeleteAIPromptVersionCommand

Delete and Amazon Q in Connect AI Prompt version.

DeleteAssistantAssociationCommand

Deletes an assistant association.

DeleteAssistantCommand

Deletes an assistant.

DeleteContentAssociationCommand

Deletes the content association.

For more information about content associations--what they are and when they are used--see Integrate Amazon Q in Connect with step-by-step guides  in the Amazon Connect Administrator Guide.

DeleteContentCommand

Deletes the content.

DeleteImportJobCommand

Deletes the quick response import job.

DeleteKnowledgeBaseCommand

Deletes the knowledge base.

When you use this API to delete an external knowledge base such as Salesforce or ServiceNow, you must also delete the Amazon AppIntegrations  DataIntegration. This is because you can't reuse the DataIntegration after it's been associated with an external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration  and CreateDataIntegration  in the Amazon AppIntegrations API Reference.

DeleteMessageTemplateAttachmentCommand

Deletes the attachment file from the Amazon Q in Connect message template that is referenced by $LATEST qualifier. Attachments on available message template versions will remain unchanged.

DeleteMessageTemplateCommand

Deletes an Amazon Q in Connect message template entirely or a specific version of the message template if version is supplied in the request. You can provide the message template identifier as <message-template-id>:<versionNumber> to delete a specific version of the message template. If it is not supplied, the message template and all available versions will be deleted.

DeleteQuickResponseCommand

Deletes a quick response.

GetAIAgentCommand

Gets an Amazon Q in Connect AI Agent.

GetAIGuardrailCommand

Gets the Amazon Q in Connect AI Guardrail.

GetAIPromptCommand

Gets and Amazon Q in Connect AI Prompt.

GetAssistantAssociationCommand

Retrieves information about an assistant association.

GetAssistantCommand

Retrieves information about an assistant.

GetContentAssociationCommand

Returns the content association.

For more information about content associations--what they are and when they are used--see Integrate Amazon Q in Connect with step-by-step guides  in the Amazon Connect Administrator Guide.

GetContentCommand

Retrieves content, including a pre-signed URL to download the content.

GetContentSummaryCommand

Retrieves summary information about the content.

GetImportJobCommand

Retrieves the started import job.

GetKnowledgeBaseCommand

Retrieves information about the knowledge base.

GetMessageTemplateCommand

Retrieves the Amazon Q in Connect message template. The message template identifier can contain an optional qualifier, for example, <message-template-id>:<qualifier>, which is either an actual version number or an Amazon Q Connect managed qualifier $ACTIVE_VERSION | $LATEST. If it is not supplied, then $LATEST is assumed implicitly.

GetNextMessageCommand

Retrieves next message on an Amazon Q in Connect session.

GetQuickResponseCommand

Retrieves the quick response.

GetRecommendationsCommand

This API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024, you will need to create a new Assistant in the Amazon Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.

Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived . This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant .

GetSessionCommand

Retrieves information for a specified session.

ListAIAgentVersionsCommand

List AI Agent versions.

ListAIAgentsCommand

Lists AI Agents.

ListAIGuardrailVersionsCommand

Lists AI Guardrail versions.

ListAIGuardrailsCommand

Lists the AI Guardrails available on the Amazon Q in Connect assistant.

ListAIPromptVersionsCommand

Lists AI Prompt versions.

ListAIPromptsCommand

Lists the AI Prompts available on the Amazon Q in Connect assistant.

ListAssistantAssociationsCommand

Lists information about assistant associations.

ListAssistantsCommand

Lists information about assistants.

ListContentAssociationsCommand

Lists the content associations.

For more information about content associations--what they are and when they are used--see Integrate Amazon Q in Connect with step-by-step guides  in the Amazon Connect Administrator Guide.

ListContentsCommand

Lists the content.

ListImportJobsCommand

Lists information about import jobs.

ListKnowledgeBasesCommand

Lists the knowledge bases.

ListMessageTemplateVersionsCommand

Lists all the available versions for the specified Amazon Q in Connect message template.

ListMessageTemplatesCommand

Lists all the available Amazon Q in Connect message templates for the specified knowledge base.

ListMessagesCommand

Lists messages on an Amazon Q in Connect session.

ListQuickResponsesCommand

Lists information about quick response.

ListTagsForResourceCommand

Lists the tags for the specified resource.

NotifyRecommendationsReceivedCommand

Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations  and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.

PutFeedbackCommand

Provides feedback against the specified assistant for the specified target. This API only supports generative targets.

QueryAssistantCommand

This API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024, you will need to create a new Assistant in the Amazon Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications.

Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use GetRecommendations .

RemoveAssistantAIAgentCommand

Removes the AI Agent that is set for use by defafult on an Amazon Q in Connect Assistant.

RemoveKnowledgeBaseTemplateUriCommand

Removes a URI template from a knowledge base.

RenderMessageTemplateCommand

Renders the Amazon Q in Connect message template based on the attribute values provided and generates the message content. For any variable present in the message template, if the attribute value is neither provided in the attribute request parameter nor the default attribute of the message template, the rendered message content will keep the variable placeholder as it is and return the attribute keys that are missing.

SearchContentCommand

Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.

SearchMessageTemplatesCommand

Searches for Amazon Q in Connect message templates in the specified knowledge base.

SearchQuickResponsesCommand

Searches existing Amazon Q in Connect quick responses in an Amazon Q in Connect knowledge base.

SearchSessionsCommand

Searches for sessions.

SendMessageCommand

Submits a message to the Amazon Q in Connect session.

StartContentUploadCommand

Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent  to finalize the content creation process or UpdateContent  to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.

StartImportJobCommand

Start an asynchronous job to import Amazon Q in Connect resources from an uploaded source file. Before calling this API, use StartContentUpload  to upload an asset that contains the resource data.

  • For importing Amazon Q in Connect quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see Import quick responses .

TagResourceCommand

Adds the specified tags to the specified resource.

UntagResourceCommand

Removes the specified tags from the specified resource.

UpdateAIAgentCommand

Updates an AI Agent.

UpdateAIGuardrailCommand

Updates an AI Guardrail.

UpdateAIPromptCommand

Updates an AI Prompt.

UpdateAssistantAIAgentCommand

Updates the AI Agent that is set for use by defafult on an Amazon Q in Connect Assistant.

UpdateContentCommand

Updates information about the content.

UpdateKnowledgeBaseTemplateUriCommand

Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Amazon Q in Connect using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.

UpdateMessageTemplateCommand

Updates the Amazon Q in Connect message template. Partial update is supported. If any field is not supplied, it will remain unchanged for the message template that is referenced by the $LATEST qualifier. Any modification will only apply to the message template that is referenced by the $LATEST qualifier. The fields for all available versions will remain unchanged.

UpdateMessageTemplateMetadataCommand

Updates the Amazon Q in Connect message template metadata. Note that any modification to the message template’s name, description and grouping configuration will applied to the message template pointed by the $LATEST qualifier and all available versions. Partial update is supported. If any field is not supplied, it will remain unchanged for the message template.

UpdateQuickResponseCommand

Updates an existing Amazon Q in Connect quick response.

UpdateSessionCommand

Updates a session. A session is a contextual container used for generating recommendations. Amazon Connect updates the existing Amazon Q in Connect session for each contact on which Amazon Q in Connect is enabled.

UpdateSessionDataCommand

Updates the data stored on an Amazon Q in Connect Session.

QConnectClient Configuration

Parameter
Type
Description
defaultsMode
Optional
DefaultsMode | Provider<DefaultsMode>
The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK.
disableHostPrefix
Optional
boolean
Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation.
extensions
Optional
RuntimeExtension[]
Optional extensions
logger
Optional
Logger
Optional logger for logging debug/info/warn/error.
maxAttempts
Optional
number | Provider<number>
Value for how many times a request will be made at most in case of retry.
profile
Optional
string
Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options.
region
Optional
string | Provider<string>
The AWS region to which this client will send requests
requestHandler
Optional
__HttpHandlerUserInput
The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
retryMode
Optional
string | Provider<string>
Specifies which retry algorithm to use.
useDualstackEndpoint
Optional
boolean | Provider<boolean>
Enables IPv6/IPv4 dualstack endpoint.
useFipsEndpoint
Optional
boolean | Provider<boolean>
Enables FIPS compatible endpoints.
Additional config fields are described in the full configuration type: QConnectClientConfig