# yaml-language-server: $schema=../references/diagram.schema.json
title: Omnichannel contact center on Amazon Connect
subtitle: Amazon Connect hands each contact to a self-service bot, a CRM screen pop or a live agent, and streams it to Contact Lens analytics
direction: down
layout: { spacing: compact }

legend:
  solid: Contact path
  dashed: Follow-up

groups:
  cloud: { type: aws:cloud }
  region: { type: aws:region, label: us-east-1, in: cloud }
  selfservice: { type: zone, label: Self-service, in: region }
  crm: { type: zone, label: CRM screen pop, in: region }
  agents: { type: zone, label: Agents, in: region }
  analytics: { type: zone, label: Contact Lens, in: region }

nodes:
  voice: { icon: aws:mobile-client, label: Voice, note: Phone calls }
  chat: { icon: aws:chat, label: Web chat }
  app: { icon: aws:user, label: Web and app }
  connect: { icon: aws:connect, label: Amazon Connect, note: Contact flows, in: region }
  lex: { icon: aws:lex, label: Amazon Lex, note: Intent bot, in: selfservice }
  polly: { icon: aws:polly, label: Amazon Polly, note: Speech, in: selfservice }
  lookup: { icon: aws:lambda, label: AWS Lambda, note: Customer lookup, in: crm }
  profiles: { icon: aws:dynamodb, label: Amazon DynamoDB, note: Customer 360, in: crm }
  staff: { icon: aws:users, label: Live agents, note: Agent workspace, in: agents }
  messaging: { icon: aws:end-user-messaging, label: AWS End User Messaging, note: Outbound SMS, in: agents }
  # The analytics chain folds into a U: Transcribe beside Kinesis, Quick Sight beside Comprehend.
  stream: { icon: aws:kinesis-data-streams, label: Amazon Kinesis Data Streams, note: Contact events, in: analytics }
  transcribe: { icon: aws:transcribe, label: Amazon Transcribe, note: Speech to text, in: analytics, align: stream }
  dashboards: { icon: aws:quick, label: Amazon Quick Sight, note: Supervisor dashboards, in: analytics, align: comprehend }
  comprehend: { icon: aws:comprehend, label: Amazon Comprehend, note: Sentiment, in: analytics }

edges:
  - voice -> connect: PSTN
  - chat -> connect: WebSocket
  - app -> connect: WebRTC
  # Each hand-off is a column under Connect, and the analytics band is the last one.
  - connect -> lex: bot
  - connect -> lookup: screen pop
  - connect -> staff: route
  - connect -> stream: stream
  - lex -> polly
  - lookup -> profiles
  - staff --> messaging
  - stream -> transcribe -> comprehend -> dashboards
