View a markdown version of this page

Use the Connect assistant with real-time data integration - Amazon Connect Customer

Use the Connect assistant with real-time data integration

AI agents of the Connect assistant can call the gateway's tools, or flow modules that wrap them, without a guide. A self-service AI agent answers the customer with no human agent. Give it a data tool only when the tool reads records of a customer your flow verified, as the account agent's getMyAccount does; otherwise give it only the knowledge base. Agent assist uses the gateway's tools to help an agent during a contact. For how to add a tool to a self-service AI agent safely, see Let self-service read the verified account.

The Salesforce template includes a sample: every stack of the template with the account and case guide also creates an AI self-service flow, stack-name-ai-selfservice-sample. The sample is built and tested for chat: its AI agents run the self-service chat prompt.

In the sample flow, the assistant's default Self service AI agent answers the customer: the knowledge agent answers only from your knowledge bases, and the account agent, if you make it the default, also answers from the verified account in the contact's accountId; see Let self-service read the verified account. Either one hands the contact to an agent with Escalate, and the guide then opens on that accountId. On that flow's contacts, agent assist answers the agent from the same knowledge base and the guide's flow modules, asking the agent to confirm each create or update. For agent assist on contacts from your own inbound flow, see Give agents agent assist in the agent workspace. No phone number, chat entry point or flow sends contacts to the AI self-service flow until you route contacts to it. For how AI agents work in Connect Customer, see Use AI agents for real-time assistance.

The following diagram shows both. The numbered path is one self-service chat that ends with an agent; the dashed path is the account agent's data tool, which contacts use only if you make the account agent the default.

Two boxes. The first box, self-service, shows the customer's chat going to the inbound flow, with its Connect assistant block and a Get customer input block with the Lex bot (1); the flow passing the message to the self-service AI agent (2); the AI agent searching the knowledge base of your articles with Retrieve (3); and the AI agent escalating; the flow then queues the chat for a human agent, whose agent workspace opens the guide (4). A dashed arrow labelled "getMyAccount, only if you make the account agent the default" goes from the AI agent to a box: Read the verified account, which reads only the account in the contact's accountId attribute. The second box, agent assist, shows the Connect assistant panel in the agent workspace asking the same Connect assistant, which answers from the same knowledge base with sources.

The stack creates these resources:

  • The AI self-service flow, and the Lex bot stack-name-ai-selfservice-bot, which carries the conversation to the AI agent.

  • The knowledge agent, stack-name-ai-knowledge, which answers from the knowledge bases and escalates to an agent. It reads no Salesforce data.

  • The account agent, stack-name-ai-account, which has the knowledge agent's tools and getMyAccount, which reads only the account in the contact's accountId. The stack creates it when Account agent for verified contacts is true, the default; see Let self-service read the verified account.

  • The agent assist AI agent, stack-name-ai-agent-assist, which the flow's Connect assistant block names. Its tools are the knowledge base search and seven of the guide's flow modules: Find the customer, Read the account, Read a case and List the account's cases, which it runs without asking, and Create a case, Create a customer and Update a record, which it runs only after the agent confirms.

  • Two prompts, one that the knowledge agent and the account agent share for self-service and one for agent assist, and a security profile for each AI agent that lists the tools it may call.

  • When Existing Connect assistant (ARN) is empty, an assistant, stack-name-assistant, and its association with your instance, which the stack keeps when it is deleted or its create fails. When Knowledge base to associate (ARN) is set, that knowledge base's association with the assistant, which the stack removes when it is deleted.

The stack's change-alert topic gets every change to these AI agents, their prompts, the flow modules agent assist and the account agent use, the assistant's default AI agents, and the security profiles in your instance. To subscribe to it, see Monitor the integration.

The flow uses no Connect Customer messages until you route contacts to it. To estimate a chat, count its messages to and from Connect Customer, the AI agent's included, and price them with Connect Customer pricing. Tools the AI agents run are gateway calls; see Amazon Bedrock AgentCore pricing.

Customer chat text, and anything the AI agents read from Salesforce, can be stored in these places. Limit who can read them, and set a retention period on their CloudWatch log groups.

  • Amazon Lex conversation logs, if you turn them on for the bot.

  • Flow logs, if you turn them on. The stack's AI self-service flow turns none on.

  • Chat transcripts, in the Amazon S3 bucket the instance uses for them.

  • The contact attributes aiEscalationReason and aiEscalationSummary, where the flow saves the AI agent's reason and summary on Escalate.

Before you begin

  • The stack from Set up real-time data integration for Salesforce, and a knowledge base with your articles, such as your refunds policy.

  • For the console steps, your AWS sign-in needs these actions:

    • On the stack: cloudformation:DescribeStacks.

    • On the assistant: wisdom:GetAssistant, wisdom:GetAIAgent, wisdom:ListAIAgentVersions, wisdom:UpdateAssistantAIAgent and wisdom:RemoveAssistantAIAgent.

    • On the instance: connect:ListSecurityProfiles, connect:AssociateSecurityProfiles and connect:DisassociateSecurityProfiles.

    A deployer role also needs the AI self-service deployer policy; see CloudFormation template reference.