> ## 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.

# Install Contact Lens collection

> Deploy the Contact Lens Summary and Operata Rules CloudFormation stacks and confirm Contact Lens analytics appear in Operata within 15 minutes.

Deploy the Contact Lens Summary stack — and, optionally, the Operata Rules stack — so Amazon Connect Contact Lens analytics flow into Operata and appear in Playbook 9 (Experience Insights) within 15 minutes of contact close.

## Before you start

* An [Amazon Connect integration](/docs/integrations-amazon-connect-overview)
  already streaming Contact Trace Records to Operata.
* An [Operata account](/docs/get-started-overview) with Admin role and
  your Operata Group ID.
* [Contact Lens enabled](https://aws.amazon.com/connect/contact-lens/)
  on the contact flows you want to analyze.
* AWS [IAM permissions](/docs/iam-policies) to deploy CloudFormation,
  or a CloudFormation service role as documented in the
  [AWS guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html).
* The [Contact Lens overview](/docs/contact-lens) read end to end — this
  page is the deployment runbook for what that page describes.

## Steps

### 1. Send Operata the three install details

Operata returns two quick-create CloudFormation links once you send:

* **`ConnectRecordingsBucketName`** — the call-recordings S3 bucket,
  bucket name only. For example, send `call.recordings`, not
  `call.recordings/connect/acme-prod`.
* **Lambda VPC details** — VPC ID and private subnet IDs. 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`.

If you encrypt call recordings with a customer-managed KMS key, the
Contact Lens Lambda needs allow-list access. See [KMS encryption](/docs/kms-encryption).

### 2. Deploy the Contact Lens Summary stack

Open the Summary quick-create link Operata sent. AWS opens the
[CloudFormation console](https://console.aws.amazon.com/cloudformation)
with every parameter pre-filled except the API key.

Paste an Operata API token into the **API key** parameter. Create the
token in the Operata console under **Settings → Config → API** and
label it `CL_Integration`. See the
[Operata help article](https://help.operata.com/en/articles/5542797-how-do-i-create-view-change-and-revoke-api-tokens)
for the full token lifecycle.

Acknowledge the IAM resource creation, then **Create stack**. The stack
reaches `CREATE_COMPLETE` in around five minutes.

### 3. (Optional) Deploy the Operata Rules stack

To get the Operata pre-built rule pack, open the second quick-create
link and deploy the same way. The Rules stack creates one EventBridge
Rule that captures any Contact Lens event whose `actionName` starts with
`operata_` and forwards it 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.

### 4. Place a test contact

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 contact close. Confirm:

* The [Agent Experience Collector](/docs/collector-overview) extension
  is installed in the agent's browser.
* The CCP URL matches the Amazon Connect instance you deployed the
  stack against.

### 5. (Optional) Tag the new resources

Apply your cost-allocation and ownership tags. See [Tag your AWS
resources](/docs/aws-tagging) for the tag set Operata expects on the
deployed stack.

## Verify

In the [Operata console](https://app.operata.io), open **Playbook 9
(Experience Insights)** and find your test contact.

* The contact shows sentiment scores, words-per-minute, and talk and
  silence ratios within 15 minutes of contact close.
* If you deployed the Rules stack, any triggered Operata rule appears
  on the contact's timeline.

Contact Lens summary data can take up to 15 minutes to appear because
Amazon Connect writes the summary file to S3 after post-call analysis
completes. If nothing appears after 15 minutes, see [Troubleshooting](/docs/aws-troubleshooting).

## Related

* [Contact Lens charges](/docs/contact-lens-charges) — the AWS cost components and an example bill.
* [Contact Lens data reference](/docs/contact-lens-data) — the fields Operata stores for each contact.
* [Concept: Cloud Collector](/docs/concepts-cloud-collector) — the runtime the Contact Lens stacks deliver into.
* [Troubleshoot the AWS integration](/docs/aws-troubleshooting) — missing summaries, S3 trigger failures, and IAM debugging.
