

# Patient engagement agents
<a name="patient-engagement-overview"></a>

Amazon Connect Health provides two AI agents for patient engagement: the Patient verification agent and the Appointment management agent. These agents handle routine patient interactions through voice calls via Amazon Connect. They integrate with Epic EHR systems in real time through FHIR R4 APIs and support intelligent escalation to human agents with full context preservation.

## Communication channels
<a name="communication-channels"></a>

Amazon Connect Health patient engagement agents currently support the voice channel only through Amazon Connect. Web chat, SMS, and other digital channels are not supported in the current release.

**Topics**

# Configuring and testing patient engagement agents
<a name="configuring-testing-pe-agents"></a>

This section is intended for administrative and clinical staff who configure and test patient engagement agents.

After your administrator completes the steps in [Setting up Amazon Connect Health](setting-up.md), you can explore the AI agents, test them with your own EHR environment, and customize their behavior in the Amazon Connect Health application.

**Topics**
+ [Agent demo and testing](#cta-agent-demo)
+ [Agent customization](#cta-agent-customization)
+ [Sample contact flow for testing](#cta-sample-contact-flow)
+ [Communication channel support](#cta-channel-support)
+ [Next steps](#cta-next-steps)

## Agent demo and testing
<a name="cta-agent-demo"></a>

The Amazon Connect Health application home page provides two ways to experience the patient engagement AI agents:
+  **Hear Healthcare Agents in action** – Play a recorded conversation between a patient and the Amazon Connect Health agents. The demo shows how the agents verify a patient’s identity and schedule an appointment through natural conversation with contextual understanding. You can play the audio directly from the home page without prior configuration.
+  **Test your agent** – Experience a live conversation with the Amazon Connect Health agents integrated with your own EHR and Amazon Connect environment by calling your Amazon Connect provisioned number. This option becomes available after you complete EHR integration. Until then, you are prompted to configure your EHR setup.

## Agent customization
<a name="cta-agent-customization"></a>

After exploring the demo, you can tailor agent behavior to match your organization’s workflows.

1. On the home page, choose **Customize** on the Agent setup card.

1. Enable or disable scheduling capabilities – **Schedule**, **Reschedule**, **Cancel Appointments**, and **Verify Insurance**. Unchecked tasks are routed to a representative.

1. Configure three sequential identity verification steps by selecting required patient inputs, such as phone number or medical record number (MRN), date of birth, and zip code or last four Social Security number (SSN) digits.

1. Choose **Publish** to apply the updates.

For more information about customization options, see [Agent customization](agent-customization.md).

## Sample contact flow for testing
<a name="cta-sample-contact-flow"></a>

Amazon Connect Health provides a pre-built sample contact flow (`connect-health-{DOMAIN_ID}-inbound-flow`) for testing and operationalizing appointment management conversations powered by AI agents. The flow simulates a typical appointment scheduling conversation, including patient identity verification. You can use this flow to validate end-to-end agent behavior – including EHR data lookup, insurance verification, and escalation routing – before moving to production.

The sample flow is deployed automatically at domain creation, whether Amazon Connect Health creates a new Amazon Connect instance or you use an existing one.

For instructions on locating, using, and customizing the sample contact flow, see [Sample contact flow](contact-flow-setup.md).

## Communication channel support
<a name="cta-channel-support"></a>

Amazon Connect Health currently supports the voice channel through Amazon Connect. Web chat, SMS, and other digital channels are not supported in the current release.

## Next steps
<a name="cta-next-steps"></a>

After you configure and test your agents, explore the following topics:
+  [Patient engagement agents](patient-engagement-overview.md) – Learn about the patient verification and appointment management agents.
+  [Point of care agents](point-of-care-overview.md) – Learn about agents for clinical workflows.

# Patient verification agent
<a name="patient-verification-agent"></a>

The Patient verification agent provides secure, conversational identity verification through real-time EHR integration and configurable multi-attribute authentication such as date of birth and phone number. It provides patient profile lookup based on incoming call number and eliminates manual lookup by contact center staff. This agent collects and verifies patient identity through self service for caregivers on behalf of a patient.

The Patient verification agent eliminates time-consuming manual EHR lookups by automating the identity verification process. It queries Epic FHIR APIs in real time to match and verify patient records during the call.

**Topics**
+ [Capabilities](#pv-capabilities)
+ [Customization options](#pv-customization)
+ [Consent and patient notification](#pv-consent)

## Capabilities
<a name="pv-capabilities"></a>

The Patient verification agent provides the following capabilities:
+  **Real-time patient identity verification** – Verifies patient identity through Epic FHIR APIs.
+  **Configurable multi-factor authentication** – Supports verification using phone number, medical record number (MRN), date of birth, zip code, and Social Security number (SSN).
+  **LLM-based safety guardrails** – Detects safety concerns, frustrated patients, and complex requests.
+  **Intelligent escalation to human agents** – Escalates to human agents with full verification context.
+  **24/7 availability** – Provides around-the-clock availability for routine verification tasks.

## Customization options
<a name="pv-customization"></a>

You can configure the Patient verification agent to match your organization’s verification requirements. To customize the agent, choose **Customize** on the Agent setup card in the Amazon Connect Health console.

You can configure the following settings.

Verification attributes  
Choose which factors are required for authentication, such as MRN, date of birth, zip code, or last four digits of SSN.

After you configure the settings, choose **Publish** to apply the changes.

## Consent and patient notification
<a name="pv-consent"></a>

Amazon Connect Health patient engagement uses AI to capture and transcribe conversations in real time. Because this feature records spoken communications that may contain protected health information (PHI), customers and their downstream integrators are responsible for complying with all applicable consent, recording, and privacy laws. This includes obtaining all legally required consents before enabling ambient documentation for any patient encounter.

AWS’s patient engagement agent provides the following language at the outset of each interaction:

"Hi, I’m your AI assistant. This call may be monitored and recorded by your health care provider and its service providers to improve their services."

# Appointment management agent
<a name="appointment-management-agent"></a>

The appointment management agent handles appointment scheduling, rescheduling, cancellations, and lookup through natural conversation integrated with real-time provider availability in EHR.

The appointment management agent handles full scheduling tasks from finding available slots across a provider’s locations to booking, rescheduling, and canceling appointments within a single intelligent conversation. With optional real-time insurance eligibility verification and copay transparency built into the booking flow, the agent reduces administrative friction for both patients and staff while ensuring care continuity. When specialized needs are detected, the agent escalates immediately to human staff with a complete summary including appointment details, patient preferences, and verification status, so no context is lost in the handoff.

**Topics**
+ [Capabilities](#am-capabilities)
+ [Configuration options](#am-configuration)

## Capabilities
<a name="am-capabilities"></a>

The Appointment management agent provides the following capabilities.
+  **New appointment scheduling with real-time provider availability lookup** – Finds available slots across a provider’s locations and books appointments within a single conversation.
+  **Appointment rescheduling and cancellation** – Retrieves the current appointment, presents available alternatives for rescheduling, or processes cancellations and provides confirmation to the patient.
+  **Appointment lookup and status confirmation** – Retrieves and confirms upcoming appointment details for the patient.
+  **Optional real-time insurance eligibility (RTE) verification** – Verifies insurance eligibility before confirming a booking. This feature requires a customer-managed AWS Lambda function.
+  **Copay transparency prior to appointment confirmation** – Provides copay information to the patient before the appointment is confirmed, so there are no surprises at the time of the visit.

## Configuration options
<a name="am-configuration"></a>

You can configure the following settings for the Appointment management agent.


| Setting | Description | 
| --- | --- | 
|  Enabled capabilities  |  Choose which appointment actions are available to patients: schedule, reschedule, cancel, and lookup. Unchecked tasks are routed to a human representative.  | 
|  Insurance verification  |  Enable or disable real-time insurance eligibility verification. When enabled, the agent invokes a customer-managed Lambda function to check eligibility and retrieve copay information. For more information, see [Insurance verification integration](insurance-verification.md).  | 
|  AI Autonomy  |  Configure whether the appointment is fully self-serviced or preferences are collected and shared with staff for final action.  | 

# Patient profile
<a name="patient-profile"></a>

The patient profile is a unified view displayed in the Amazon Connect Agent Workspace that provides human agents with complete context when they are connected with a caller. Whether the call is transferred after successful patient verification or escalated during appointment management, this profile reduces the need for patients to repeat information and reduces cognitive burden on contact center staff.

![\[Patient Profile feature in Amazon Connect Agent Workspace.\]](http://docs.aws.amazon.com/connecthealth/latest/userguide/images/patient-profile-workspace.png)


**Topics**
+ [Patient information displayed](#pp-patient-info)
+ [Appointment intent and details](#pp-appointment-intent)
+ [Verification status](#pp-verification-status)
+ [Escalation information](#pp-escalation-info)
+ [Self-service summary](#pp-self-service-summary)
+ [Error scenarios](#pp-error-scenarios)

## Patient information displayed
<a name="pp-patient-info"></a>

The patient profile displays the following demographic and clinical information:
+ Full name, date of birth, and medical record number (MRN)
+ Contact information, including phone number and address
+ Primary care provider and care team

## Appointment intent and details
<a name="pp-appointment-intent"></a>

When a call involves appointment management, the profile displays:
+ Appointment type, date, time, and location
+ Provider name and department
+ Scheduling intent captured during the AI interaction

## Verification status
<a name="pp-verification-status"></a>

The profile shows the outcome of the identity verification process:
+ Verification outcome: verified, partially verified, or failed
+ Factors that were successfully verified
+ Number of verification attempts

## Escalation information
<a name="pp-escalation-info"></a>

When a call is escalated from an AI agent, the profile includes:
+ Reason for escalation, such as a safety concern, complex request, patient frustration, or verification failure
+ Escalation timestamp and originating flow

## Self-service summary
<a name="pp-self-service-summary"></a>

The profile provides a summary of actions completed by the AI agent before the escalation:
+ Actions completed or attempted during the self-service interaction
+ Appointment changes made or confirmed
+ Insurance verification outcome, if applicable

## Error scenarios
<a name="pp-error-scenarios"></a>

When patient verification was incomplete or failed, the patient profile displays all information collected from the caller during the verification attempt. This ensures that human agents can see which verification factors were already provided and which ones failed or were missing, eliminating the need to ask patients to repeat information they have already shared.

# Agent customization
<a name="agent-customization"></a>

After exploring the demo, you can tailor agent behavior to match your organization’s workflows. The customization page lets you configure scheduling capabilities, insurance verification, and identity verification steps.

The following table summarizes the customization areas available for each agent.


| Setting | Description | 
| --- | --- | 
|  Scheduling capabilities  |  Select which appointment actions (schedule, reschedule, cancel, lookup) are available to patients. For more information, see [Appointment management agent](appointment-management-agent.md).  | 
|  Insurance verification  |  Enable or disable real-time insurance eligibility verification through customer-owned Lambda functions. For more information, see [Insurance verification integration](insurance-verification.md).  | 
|  AI autonomy  |  Configure whether the appointment is fully self-serviced or preferences are collected and shared with staff for final action. For more information, see [Appointment management agent](appointment-management-agent.md).  | 
|  Verification attributes  |  Select which factors (for example, medical record number (MRN), date of birth, zip code) are required for authentication. For more information, see [Patient verification agent](patient-verification-agent.md).  | 

## To customize agent settings
<a name="ac-customize-procedure"></a>

1. Open the Amazon Connect Health console and choose **Customize** on the Agent setup card.

1. In the customization page, enable or disable scheduling capabilities:
   + Schedule appointments
   + Reschedule appointments
   + Cancel appointments
   + Verify insurance

     Unchecked tasks are routed to a representative.

1. Configure three sequential identity verification steps by selecting the required patient inputs:
   +  **Step 1** – Phone number or MRN
   +  **Step 2** – Date of birth
   +  **Step 3** – Zip code or last four digits of Social Security number (SSN)

1. Choose **Publish** to apply the updates.

### Expected results
<a name="expected-results"></a>

After you choose **Publish**, the updated configuration takes effect. The agent uses your selected scheduling capabilities and verification steps when handling patient interactions.

# Sample contact flow
<a name="contact-flow-setup"></a>

Amazon Connect Health provides a pre-built sample contact flow for testing and operationalizing appointment management conversations powered by AI agents. The flow simulates a typical appointment scheduling conversation including patient identity verification. You can use it to validate end-to-end agent behavior before moving to production.

The sample flow is deployed automatically at domain creation, whether Amazon Connect Health creates a new Amazon Connect instance or you use an existing one.

**Topics**
+ [Locate the sample flow](#cf-locate-flow)
+ [Provisioned resources](#cf-provisioned-resources)
+ [Session attributes](#cf-session-attributes)
+ [Lambda function](#cf-lambda-function)
+ [Amazon Lex bot](#cf-lex-bot)
+ [Customize the contact flow](#cf-customization)

## Locate the sample flow
<a name="cf-locate-flow"></a>

To find the sample contact flow:

1. Sign in to your Amazon Connect instance.

1. In the navigation pane, choose **Routing**, then choose **Contact flows**.

1. Search for `connect-health-{DOMAIN_ID}-inbound-flow`, where `{DOMAIN_ID}` is your Amazon Connect Health domain identifier.

You can assign this flow to your preferred phone number if the provisioned number doesn’t fit your workflows.

![\[Sample Connect Health Contact Flow\]](http://docs.aws.amazon.com/connecthealth/latest/userguide/images/sample-contact-flow.png)


## Provisioned resources
<a name="cf-provisioned-resources"></a>

**Sample Connect Health contact flow**  
Amazon Connect Health provisions the following resources as part of the sample contact flow deployment:


| Resource | Naming pattern | 
| --- | --- | 
|  Amazon Connect instance (if created by Amazon Connect Health)  |   `connect-health-{DOMAIN_ID}`   | 
|  Sample contact flow  |   `connect-health-{DOMAIN_ID}-inbound-flow`   | 
|  Lambda function  |   `connect-health-{DOMAIN_ID}-lambda`   | 
|  Lambda function role  |   `connect-health-{DOMAIN_ID}-lambda-role`   | 
|  Amazon Lex bot  |   `connect-health-{DOMAIN_ID}-bot`   | 
|  Amazon Lex bot role  |   `connect-health-{DOMAIN_ID}-lex-bot-role`   | 

## Session attributes
<a name="cf-session-attributes"></a>

Session attributes are key-value pairs passed between contact flow blocks and Lambda functions during a voice call. Amazon Connect administrators configure session attributes to carry patient context — such as verification status, appointment intent, and escalation reason — across flow transitions.

The sample contact flow includes the following session attributes for the AI agent identifiers:
+  `patient_agent_id` – The identifier for the Patient verification agent.
+  `appointment_agent_id` – The identifier for the Appointment management agent.

To view or modify session attributes, open the sample flow in the Amazon Connect flow editor and inspect the **Set contact attributes** block.

## Lambda function
<a name="cf-lambda-function"></a>

The pre-built Lambda function (`connect-health-{DOMAIN_ID}-lambda`) handles EHR lookups, insurance verification, and session attribute processing during each patient call. The associated IAM execution role (`connect-health-{DOMAIN_ID}-lambda-role`) provides the required permissions. The Lambda function currently includes `"appointmentType": {"id": "1004", "type": "External"}` and can be updated to handle other appointment types you have.

You can extend or replace this function with your own implementation to support custom integrations or business logic.

## Amazon Lex bot
<a name="cf-lex-bot"></a>

The Amazon Lex bot (`connect-health-{DOMAIN_ID}-bot`) enables natural language understanding and supports patient conversation segments beyond the scope of the Amazon Connect Health agents, such as initial greetings and intent routing.

## Customize the contact flow
<a name="cf-customization"></a>

Amazon Connect Health provisions a sample Amazon Connect contact flow that demonstrates how Amazon Connect Health agents are invoked within a call routing sequence, but it is intentionally generic. Customize the sample contact flow to align with your operational processes, queue structures, escalation policies, and patient communication standards (including privacy and consent practices) before production deployment.

Customization typically includes the following tasks:
+  **Queue assignments and routing profiles** — Reassign contact flow branches to your existing queues and agent routing profiles configured in your Amazon Connect instance.
+  **Call flow logic** — Update branching conditions and agent handoff sequences to reflect your department processes.
+  **IVR integration** — Integrate the sample flow with existing IVR menus or self-service flows so that Amazon Connect Health agents are reachable within your broader telephony environment.
+  **Localization** — Replace default audio with organization-approved recordings or text-to-speech content that reflects your communication standards.

For guidance on building and modifying contact flows, see [Use the flow designer in Amazon Connect to create flows](https://docs.aws.amazon.com/connect/latest/adminguide/create-contact-flow.html) in the *Amazon Connect Administrator Guide*.

# Insurance verification integration
<a name="insurance-verification"></a>

Real-time insurance eligibility (RTE) verification is an optional feature of the Appointment management agent. When enabled, the agent verifies a patient’s insurance eligibility and retrieves copay information prior to confirming an appointment. This feature is recommended for organizations that want to provide copay transparency before scheduling or rescheduling appointments.

**Topics**
+ [Overview](#iv-overview)
+ [How it works](#iv-how-it-works)
+ [Lambda input and output schema](#iv-lambda-schema)
+ [Lambda resource policy](#iv-resource-policy)
+ [Setup steps](#iv-setup-steps)

## Overview
<a name="iv-overview"></a>

Customers are responsible for creating and maintaining their Lambda function. AWS provides sample Lambda code that customers must update with their vendor-specific API integration details and authentication logic. Customers must deploy the Lambda to their AWS account, configure it with vendor credentials (using AWS Secrets Manager recommended), and add a resource policy allowing health-agent.amazonaws.com service principal to invoke the function.

### When to use insurance verification
<a name="iv-when-to-use"></a>

Use insurance verification integration when you want to:
+ Provide copay transparency to patients before confirming appointments
+ Integrate with your preferred RTE vendor (such as Experian Health or Waystar)

You don’t need RTE Lambda if:
+ Post-booking insurance verification through Epic’s private APIs is sufficient for your workflow
+ You prefer to handle insurance verification through existing staff processes

## How it works
<a name="iv-how-it-works"></a>

Insurance verification involves a setup phase and a runtime phase.

### Setup phase
<a name="iv-setup-phase"></a>

The customer deploys a Lambda function that connects to their preferred RTE vendor (for example, Experian Health or Waystar). The Lambda function is registered with Amazon Connect Health and granted invocation permissions.

### Runtime phase
<a name="iv-runtime-phase"></a>

When a patient schedules or reschedules an appointment, the Appointment management agent invokes the customer’s Lambda function with patient and appointment details. The Lambda function queries the RTE vendor and returns eligibility status and copay information to the agent, which presents the results to the patient before confirming the appointment.

## Lambda input and output schema
<a name="iv-lambda-schema"></a>

AWS provides sample Lambda code for patient insurance verification. You update the sample code with your vendor-specific integration details and deploy to your production account.

For the sample Lambda code, see [sample-healthcare-realtime-eligibility](https://github.com/aws-samples/sample-healthcare-realtime-eligibility) on GitHub.

### Input schema
<a name="iv-input-schema"></a>

The Appointment management agent provides the following information to your Lambda function.


| Field | Description | 
| --- | --- | 
|  CoverageDetails.identifier  |  Payer code identifying the insurance company  | 
|  CoverageDetails.groupNumber  |  Insurance group number  | 
|  CoverageDetails.insuranceName  |  Free-text insurance name  | 
|  CoverageDetails.memberNumber  |  Subscriber’s member ID  | 
|  subscriber.identifier  |  System identifier for the subscriber (optional)  | 
|  subscriber.name  |  Subscriber name (optional)  | 
|  subscriber.dateOfBirth  |  Subscriber date of birth (optional)  | 
|  subscriber.relationshipToPatient  |  Relationship to the patient, for example "Self" (optional)  | 
|  patientIdentifier  |  Patient identifier  | 
|  requestPeriodStart  |  Service date start  | 
|  requestPeriodEnd  |  Service date end  | 
|  providerNPI  |  Provider’s 10-digit NPI  | 
|  providerLastName  |  Provider last name (optional)  | 
|  departmentNPI  |  Department NPI (optional)  | 

### Output schema
<a name="iv-output-schema"></a>

Your Lambda function must return the following information to the Appointment management agent.


| Field | Type | Description | 
| --- | --- | --- | 
|  eligibilityStatus  |  String  |  One of: `eligible`, `ineligible`, or `unknown`   | 
|  copayAmount  |  Number (optional)  |  Estimated copay in USD  | 
|  coverageDetails  |  String (optional)  |  Free-text summary of coverage  | 
|  errorMessage  |  String (optional)  |  Error description if verification failed  | 

## Lambda resource policy
<a name="iv-resource-policy"></a>

The customer must attach a resource-based policy to their Lambda function granting the Amazon Connect Health service principal invocation permissions. The policy must include:
+  **Effect**: Allow
+  **Principal Service**: `health-agent.amazonaws.com` 
+  **Action**: `lambda:InvokeFunction` 
+  **Resource**: Your Lambda function ARN
+  **Condition**: `ArnLike` with `AWS:SourceArn` matching `arn:aws:health-agent:<region>:<aws-account-id>:*` 

See [Granting Lambda function access to AWS services](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-services.html) for reference.

For the complete policy template, see the sample Lambda code at https://github.com/aws-samples/sample-healthcare-realtime-eligibility.

## Setup steps
<a name="iv-setup-steps"></a>

1. Download the sample Lambda code from https://github.com/aws-samples/sample-healthcare-realtime-eligibility.

1. Update the sample code with your RTE vendor’s API integration details and authentication logic.

1. Deploy the Lambda function to your AWS account.

1. Configure the Lambda function with vendor credentials using AWS Secrets Manager (recommended).

1. Attach the resource policy to grant Amazon Connect Health permission to invoke the function. For more information, see [Granting Lambda function access to AWS services](https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-services.html) in the *AWS Lambda Developer Guide*.

1. In the Amazon Connect Health console, configure the Lambda function ARN in the domain settings under **Integration function**.

1. Test the integration in a non-production environment before enabling in production.