View a markdown version of this page

Synthetic customer - Amazon Connect Customer

Synthetic customer

When you validate an AI agent with scripted inputs, you write every customer response and every expected agent response in advance. That works for fixed paths, but AI agents reason dynamically, and real customers change topics, share information out of order, and phrase things in unexpected ways. A synthetic customer lets you validate how your experience handles those real conversations.

Think of it as briefing a mystery shopper. You tell them who they are, what they want, and what they know. Then they reach out to your contact center and respond naturally to whatever happens. You don't hand them a script; you hand them a brief. The persona defines who the customer is, and the scenario defines what they want and what they know. The quality of that brief determines the quality of the test. For guidance, see Write effective scenarios and personas.

What can a synthetic customer interact with?

A synthetic customer begins at the starting point you choose and moves through your experience the way a real customer would.

Channels
Voice

The synthetic customer speaks and listens, using the language and voice defined in the persona.

Chat

The synthetic customer sends and receives chat messages.

Starting points
Flow

The test starts at the contact flow you select on the Settings tab.

Phone number

For voice tests only. The test starts at a phone number claimed in your instance and follows the flow associated with it.

Agentic CX Designer application

The test starts at a system-managed flow that gives the conversation to the application you select on the Settings tab. For more information, see Start a test at an Agentic CX Designer application.

What it can interact with in your experience

  • IVR menus, including touch-tone (DTMF) input (voice only)

  • Amazon Lex bots

  • AI agents in your flow, including the tools they call

  • Agentic CX Designer applications invoked from your flow

  • Queue transfers, including requests to speak with a human agent. To continue the test, accept or reject the contact in the Contact Control Panel (CCP). If you accept, you act as the human agent and talk with the synthetic customer.

How the scenario works

The scenario tells the synthetic customer why it is contacting you and tells the test what success looks like. Everything the synthetic customer knows about its situation comes from the scenario, so the more specific the scenario, the more realistic the conversation and the more meaningful the result.

Configuration options:

Scenario name

A short, descriptive name, such as "Rebook cancelled flight". Use a name that tells a reviewer what the test validates.

Reason for contact

What the customer is trying to accomplish, including what happened, what they already tried, what they prefer, and how they respond if what they are trying to accomplish can't be met. This field drives the synthetic customer's behavior across every turn.

Expected outcome

The business result that counts as success, written as the behaviors your experience must complete. The test run is evaluated against this field, and the run ends when the expected outcome is reached.

Additional detail (optional)

A section that groups the following settings.

Initial query

The customer's opening message, written the way a real customer would say or type it.

Stop conditions

Limits that end the conversation if the expected outcome isn't reached first.

Max turns (optional)

Select the check box and enter the maximum number of customer and agent exchanges, up to 50. If you don't set Max turns, a conversation that never reaches its expected outcome ends at the 5-minute test duration limit.

Known inputs

Name and value pairs for the details the customer knows and provides when asked, such as Name = Booking reference, Value = ABC123. Choose Add value to add another pair. You can add up to 20 pairs.

The Define scenario dialog with Scenario name, Reason for contact, Expected outcome, Initial query, Max turns, and Known inputs.

After you define the scenario, choose Next to define the persona.

Use cases:

  • Validating a specific customer intent, such as rebooking, a refund request, or a claim status check

  • Validating how your experience handles a customer whose goal can't be met, such as no available flights

  • Validating that your experience collects and uses the right details, such as verifying identity before sharing account information

How the persona works

The persona tells the synthetic customer who it is and how it behaves. The same scenario played by two different personas produces two different conversations. A calm, cooperative customer and a frustrated customer who pushes back exercise very different paths through your AI agent, which is exactly what you want to validate before production.

Configuration options:

Name

A descriptive name, such as "Frustrated frequent flyer".

Language

The language the synthetic customer speaks or types. You can choose a language that Amazon Polly supports. For the full list, see Languages in Amazon Polly.

Voice

The Amazon Polly voice the synthetic customer uses. The list shows only the voices for the language you choose, and when you change the language, the voice changes to one that speaks it. For the full list, see Available voices.

Engine

The speech engine for the voice. Only the engines the selected voice supports are shown. For more information, see Amazon Polly voice engines.

Communication style

How much the customer says in each reply. Move the slider to choose one of the following options.

Terse

Replies in a word or two, usually just the value.

Concise

Answers in one short sentence.

Standard

Answers in full sentences.

Verbose

Gives long answers, with extra detail around what was asked.

Emotional state

The mood the customer brings to the conversation. Choose one of the following options.

Neutral

Matter of fact, with no strong feelings either way.

Happy

Friendly and upbeat, and easy to please.

Confused

Unsure what's happening, and asks for things to be explained.

Frustrated

Loses patience quickly when things are slow or repeated.

Angry

Hostile from the start, and might threaten to escalate.

Anxious

Worried about the outcome, and seeks reassurance.

Cooperativeness

How readily the customer answers questions and follows the steps your experience asks for. Move the slider to choose one of the following options.

Cooperative

Answers right away and follows every step without pushback.

Neutral

Answers when asked and follows the steps, nothing more.

Uncooperative

Pushes back on questions and steps, and needs convincing.

Background (optional)

The customer's history and what they know, such as how long they have been a customer, prior contacts history, loyalty status, or familiarity with your rules and policies.

Note

Voice and Engine appear for every test case, but they apply only to voice test cases. They have no effect when the test case uses the Chat channel.

The Define persona dialog with Name, Language, Voice, Engine, Communication style, Emotional state, Cooperativeness, and Background.

Use cases:

  • Validating that your AI agent stays on task with a customer whose communication style is Verbose

  • Validating de-escalation and handoff behavior with a frustrated or angry customer

  • Validating that your experience still verifies identity when an uncooperative customer resists sharing details

  • Validating language support by running the same scenario in a second language

What happens when the test runs?

When you run the test case, the synthetic customer contacts your experience at the starting point on the selected channel. It opens with the initial query, then responds to each prompt or message based on the reason for contact and the persona. When your experience asks for a detail defined in known inputs, the synthetic customer provides that exact value.

The conversation continues until one of the following happens.

  • The expected outcome is reached.

  • Your experience disconnects the contact.

  • The conversation reaches the Max turns you set.

  • The test reaches the 5-minute duration limit.

The test run is then evaluated against the expected outcome and every Observe and Check block on the canvas.

Important

The synthetic customer doesn't end the conversation on its own. If the expected outcome can't be met, the conversation might escalate to a human agent, and your flow transfers the contact to a queue where a live agent can pick it up. To prevent this, add an interaction group that observes Test started and substitutes your production queue with a test queue that has no agents (Action: Mock resource behavior, Resource type: Queue, Option: Substitute resource). Add an interaction group that observes the transfer and ends the test only when a transfer is the result you expect, such as when you validate escalation. If a group's event never happens, the test run fails. So if your test reaches the expected outcome without a transfer, a group that observes the transfer fails the run.

The scenario and persona appear in the Scenario and persona panel on the left of the designer, with an Enabled toggle at the top. Choose Edit next to Scenario or Persona to change either one. To script every customer input yourself instead, turn off Enabled.

The test designer with the synthetic customer enabled, showing the scenario and persona summary in the left panel.

How do interaction groups work with a synthetic customer?

The expected outcome tells you whether the conversation achieved its goal. Interaction groups tell you whether your experience did the right things along the way. In a test case that uses a synthetic customer, interaction groups are optional. Add them when you need a precise check that a conversation transcript alone can't confirm.

Observe block

Watch for an event, such as a message, a flow action, or an AI agent tool call. See Observe block.

Check block

Validate values, such as the queue the contact reached or the result an AI agent tool returned. See Check block.

Action block

Mock a resource or AI agent tool so the test doesn't touch live systems, or send a scripted input that takes over from the synthetic customer for one turn. See Override system behavior actions and Send instruction actions.

Connections

Connect interaction groups to validate the order of events, such as an AI agent looking up a reservation before it rebooks. A connected group starts watching only after the group before it matches, so a tool called out of order isn't matched and the group fails. Unconnected groups watch for the whole test, and every active group that observes the same event matches it, including tool calls, Lambda functions, Amazon Lex bots, and queues. Keep groups that mock a tool unconnected, so the mock applies whenever the AI agent calls the tool, in any order. If a mock group is connected and the agent calls the tool before that group starts watching, the mock isn't applied.

What runs for real during a simulation?

A synthetic customer runs against your actual flow, so the resources it reaches run for real unless you mock them. Review this before you run test cases against flows that call production systems.

Resources during a synthetic customer test run
Resource During the test run How to control it
Lambda functions Invoked as in production Lambda function override
Amazon Lex bots Run as in production Lex bot override
AI agent tools Called as in production AI agent tool override
Hours of operation Checked against the actual schedule Hours of operation override
Queue transfers Transfer as in production and can reach a live agent. The synthetic customer might ask for a human agent when the expected outcome can't be met Substitute a test queue on Test started
Important

If a tool or Lambda function writes data, such as creating a booking, issuing a refund, or updating a profile, a test run that reaches it can change real records. Mock those calls, or point your test case at a test environment, before you run it.