How amazon-connect/touchpoint works
Touchpoint is a browser-embeddable conversational UI and SDK for Amazon Connect Customer. A caller creates a widget (or mounts the custom element); the UI selects chat, full-screen voice, or voice-mini, while the Connect adapter obtains contact details and manages the conversation. Messages, prompts, and modality-specific content are presented in the widget. Optional Live Sync gathers page context and applies assistant actions to the page. The playground configures and launches the widget. Some subsystem links are documented capabilities rather than inspected call sites; those are marked dashed.
Main entry points: src/App.tsx Conversation controller · playground/App.tsx Playground configuration · index.ts Connect adapter · index.tsx SDK and element API
Components 21
SDK entry
- SDK and element API
src/index.tsx
Conversation UI
- Conversation controller
src/App.tsx - Theme and providers
src/ProviderStack.tsx - Chat transcript
src/components/Messages.tsx - Chat input
src/components/Input.tsx - Guides and announcements
src/components/Announcements.tsx - Rich modalities
src/components/defaultModalities - Voice experiences
src/components/FullscreenVoice.tsx - Voice mini
src/components/VoiceMini.tsx
Connect runtime
- Connect adapter
src/connect/index.ts - Conversation runtime
src/connect/conversation.ts - Connect view renderer
src/connect/viewRenderer.ts - Live Sync connection
src/connect/liveSync.ts
Live Sync
- Page context gathering
src/liveSync/automaticContext.ts - Page form analysis
src/liveSync/analyzePageForms.ts - Page action handler
src/liveSync/actionHandler.ts
Playground
- Playground configuration
src/playground/App.tsx - Widget launch hook
src/playground/useTouchpoint.ts - Playground routes
src/playground/Router.tsx
Other components
- Widget integrator
- Playground user
Connections 18
- Widget integrator → SDK and element API: creates or mounts
src/index.tsx - SDK and element API → Conversation controller: renders
src/index.tsx - Conversation controller → Theme and providers: uses
src/App.tsx - Conversation controller → Chat transcript: renders
src/App.tsx - Conversation controller → Chat input: renders
src/App.tsx - Conversation controller → Guides and announcements: renders
src/App.tsx - Conversation controller → Rich modalities: selects
src/App.tsx - Conversation controller → Voice experiences: renders
src/App.tsx - Conversation controller → Voice mini: renders
src/App.tsx - Connect adapter → Conversation runtime: creates
src/connect/index.ts - Connect adapter → Connect view renderer: uses
src/connect/index.ts - Conversation runtime → Live Sync connection: uses
src/connect/conversation.ts - Page context gathering → Page form analysis: analyzes forms
src/liveSync/automaticContext.ts - Page context gathering → Connect adapter: uses
src/liveSync/automaticContext.ts - Playground user → Playground configuration: configures
src/playground/App.tsx - Playground configuration → Widget launch hook: launches
- Widget launch hook → SDK and element API: creates widget
src/playground/useTouchpoint.ts - Playground configuration → Playground routes: routes pages
src/playground/Router.tsx