> ## Documentation Index
> Fetch the complete documentation index at: https://docs.operata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contact Lens for Amazon Connect

> Deploy two CloudFormation stacks to stream Amazon Connect Contact Lens analytics into Operata alongside your existing Contact Trace Record data.

Deploy two CloudFormation stacks to bring Amazon Connect Contact Lens analytics into Operata — sentiment scores, talk ratios, keyword detections, and rule-triggered events — correlated with the Contact Trace Records (CTRs) the Cloud Collector already streams.

## Before you start

* An [Operata account](/docs/get-started-overview) with Admin role.
* An [Amazon Connect integration](/docs/integrations-amazon-connect-overview)
  already streaming Contact Trace Records to Operata. Contact Lens layers
  onto the same data path.
* [Contact Lens enabled](https://aws.amazon.com/connect/contact-lens/) in
  your Amazon Connect instance and on the contact flows you want to
  analyze.
* AWS [IAM permissions](/docs/iam-policies) to deploy CloudFormation in
  the region hosting your Amazon Connect instance.
* A current Operata subscription that includes Playbook 9 (Experience
  Insights).

<Warning>
  Operata never receives Contact Lens transcripts. The integration
  forwards summary metrics and rule-triggered events only. Transcripts
  stay in your AWS account.
</Warning>

## Steps

### 1. Pick which Contact Lens stack to deploy

Operata ships two independent CloudFormation stacks for Contact Lens.
Deploy one or both.

| Stack                      | What it collects                                                                                                         | Use when                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| Contact Lens Summary       | Sentiment scores, words-per-minute, talk and silence ratios, keyword detection, rule outcomes (real-time and post-call). | You want post-call analytics on every contact.                             |
| Operata Contact Lens Rules | Events from Operata-defined detection rules — for example, escalation phrases or compliance keywords.                    | You want pre-built rule packs without writing your own Contact Lens rules. |

Both stacks deliver into the same Operata account and correlate with
the Contact Trace Records the Cloud Collector already ships.

### 2. Send Operata the install details

Operata builds custom CloudFormation templates once you provide:

* **`ConnectRecordingsBucketName`** — the S3 bucket holding your
  Amazon Connect call recordings. Use the bucket name only, up to the
  first `/`. Find it in the AWS console under **Amazon Connect → Data
  storage**.
* **Lambda VPC details** — the VPC ID and private subnet IDs the
  Contact Lens Lambda needs. Skip this if you do not require VPC
  deployment.
* **Amazon Connect instance ARN** — for example,
  `arn:aws:connect:ap-southeast-2:083560123456:instance/8f3b9a12-2b6b-4a07-8d33-c6f7b21a4ab0`.

Operata responds with two quick-create links and your Operata Group ID.

### 3. Deploy the Summary stack

Open the Summary quick-create link Operata sent. Paste your Operata API
token into the **API key** parameter — create one under **Settings →
Config → API** in the Operata console and label it `CL_Integration`.
Acknowledge the IAM resource creation, then **Create stack**.

The stack takes around five minutes. CloudFormation creates the Kinesis
stream that backs the integration, the EventBridge Pipe, the
S3-to-Kinesis processor Lambda, the API destination, the Secrets
Manager secret, and the IAM roles. See [IAM policies](/docs/iam-policies)
for the role contract.

### 4. Deploy the Operata Rules stack

If you also want the Operata rule pack, open the second quick-create
link. The Rules stack creates one EventBridge Rule that watches for
Contact Lens events whose `actionName` is prefixed with `operata_` and
forwards them to your Operata account.

Any Contact Lens rule you author later whose name starts with
`operata_` flows through this same EventBridge Rule — no additional
deploy needed.

### 5. Place a test call

Make or receive a call through your Amazon Connect CCP. **Close the
contact** when the call ends — Contact Lens summary data is only
generated on close. Confirm the [Agent Experience Collector](/docs/collector-overview)
extension is installed in the agent's browser and that the CCP URL
matches the instance you installed the stacks against.

## Verify

In the [Operata console](https://app.operata.io), open **Playbook 9
(Experience Insights)**. Your test contact appears with Contact Lens
sentiment, words-per-minute, and any triggered rules within 15 minutes
of contact close.

If nothing appears after 15 minutes, check the EventBridge Pipe and the
S3-to-Kinesis Lambda in CloudWatch Logs, then work through
[Troubleshooting](/docs/aws-troubleshooting).

## Related

* [Install Contact Lens collection](/docs/contact-lens-installation) — the per-stack deployment runbook with parameters and post-deploy checks.
* [Contact Lens charges](/docs/contact-lens-charges) — the AWS cost components and an example bill at 1 million contacts per month.
* [Contact Lens data reference](/docs/contact-lens-data) — the fields Operata stores for each contact.
* [Tag your AWS resources](/docs/aws-tagging) — apply cost-allocation tags to the Contact Lens stacks.
