Qontak | CRM | Consistent Deal & Ticket Creation Experience — Phase 1: Bot & AI Creation Parity
HEADER BLOCK
| Field | Value |
|---|---|
| PM | Alma Syafira |
| PRD Version | 1.2 |
| Status | DRAFT |
| PRD Type | PHASE |
| Epic | QON-16681 |
| Squad | CRM |
| RFC Link | TBD — to be created after PRD is finalised |
| Figma Master | N/A — no new design; follows existing deal/ticket preview design patterns |
| Anchor | AI Agent Commercialization — ANCHOR · Create Deal in CRM via Chatbot UI — ANCHOR |
| Labels | epic:[26Q3 Consistent Deal & Ticket Creation Experience] | module:[Deal and ticket from Chatbot and Agentic AI] | feature:[Create deal and ticket from omnichannel features] |
| Last Updated | 2026-06-30 |
Table of Contents
- HEADER BLOCK
- CONDITIONAL BLOCK: PHASE CONTEXT
- 1. One-liner + Problem
- 2. What Happens If We Don't Ship This Phase
- 3. Target Users + Persona Context
- 4. Non-Goals
- 5. Constraints
- 6. Feature Changes
- 7. New Features
- 8. API & Webhook Behavior
- 9. System Flow + User Stories + ACs
- 10. Rollout
- 11. Observability
- 12. Success Metrics
- 13. Launch Plan & Stage Gates
- 14. Dependencies
- 15. Key Decisions + Alternatives Rejected
- 16. Open Questions
- PRD CHANGELOG
CONDITIONAL BLOCK: PHASE CONTEXT
| Field | Detail |
|---|---|
| Anchor PRD(s) | Primary: Create Deal in CRM via Chatbot UI — ANCHOR · Contributing initiative: AI Agent Commercialization — ANCHOR |
| Phase Number | Phase 1 |
| Phase Goal | Enable a consistent deal and ticket creation experience for records created by Chatbot and Agentic AI, providing the same visibility, navigation, and contextual traceability available for manually-created records. |
| Prior phases | N/A — this is Phase 1. The Chatbot deal creation foundation (Create Deal in CRM via Chatbot UI) is a prerequisite dependency, not a prior phase — see ANCHOR PRD. |
| This phase | Delivers: (1) Deal & Ticket section/tab in the Omnichannel conversation room (container provided by Omnichannel, feature-flagged); (2) CRM-embedded component rendering deal/ticket preview, navigation, and all related UI within that section for chatbot/AI-created records; (3) automatic contact association at creation time; (4) chat history timeline log in the CRM deal/ticket detail; (5) creator label ("Bot"/"AI") on system-generated records; (6) real-time refresh of the CRM embedded component when chatbot/AI creates or deletes a record. |
| Deferred to next | Multiple deals/tickets per room display; source granularity in creator label (e.g. specific chatbot flow name or Agentic AI agent name); historical backfill of pre-phase chatbot/AI-created records; persistent empty-state panel with a bot-specific "Create Deal" CTA. |
| Cross-phase deps | The payload fields introduced in this phase (room_id, contact_id, creator_flag) form a stable API contract between Chatbot/Agentic AI and CRM. Changes to these fields require a new phase PRD. |
1. One-liner + Problem
One-liner: Enable Sales and CS Agents to see a consistent deal and ticket experience — with preview, context, and navigation — regardless of whether the record was created manually, by chatbot, or by Agentic AI.
Problem: Deals and tickets created by chatbot or Agentic AI do not produce the same agent-visible outcome as those created manually: no preview appears in the Omnichannel infobar, no contact is automatically linked, and no timeline log exists in the CRM record to show how the deal originated. The inconsistency forces agents to manually search for records they cannot see, reduces trust in automated workflows, and undermines the traceability value of chatbot and Agentic AI deal creation.
For full initiative context, see the primary ANCHOR PRD: Create Deal in CRM via Chatbot UI.
2. What Happens If We Don't Ship This Phase
- Agents continue to see the "Create Deal" CTA in their inbox even when chatbot or Agentic AI has already created a deal — leading to confusion, duplicate deal creation attempts, and eroded trust in automation.
- Agentic AI deal creation — a key part of the AI Agent Commercialization commercial track — ships without visible evidence of its work in the agent's primary workspace (the chat inbox). This risks perceived value of Agentic AI by users and reduces adoption.
- CRM records for bot/AI-created deals remain incomplete (no contact, no conversation context, no creator attribution), increasing manual investigation time for Sales Managers auditing deal pipelines.
3. Target Users + Persona Context
| Persona | Role | Goal | Pain | Workaround |
|---|---|---|---|---|
| Primary — Sales Agent / CS Agent | Frontline agent handling active conversations in Omnichannel | Immediately understand whether a conversation already has an associated deal or ticket and navigate to it without interrupting the chat session | The infobar continues to show "Create Deal" even after chatbot/AI created a deal, so the agent cannot tell if a record already exists. Navigating to CRM manually to check breaks their conversation flow. | Manually searches CRM for the deal or ticket by customer name or phone number; checks auto-create logs if available. |
| Secondary — Sales Manager / Team Lead | Team lead auditing pipeline quality and deal origin | Ensure chatbot/AI-created deals have complete context and are correctly attributed, so that reports and audits reflect accurate deal origin data | Chatbot/AI-created deals show no creator attribution, no conversation link, and no contact — making it impossible to distinguish automated from manual deals during pipeline reviews. | Manually cross-references the chatbot flow logs and CRM records; often raises internal support requests to trace deal origin. |
(Full persona background: see primary ANCHOR PRD — Create Deal in CRM via Chatbot UI)
4. Non-Goals
- Multiple deals/tickets per room — displaying more than one deal or one ticket preview in the conversation infobar is out of scope for this phase. One room = one deal preview, one ticket preview (latest wins). Future: may surface as CRM history view.
- Changes to existing manual deal/ticket creation flows — the "Create Deal" CTA and manual creation workflow in Omnichannel are unchanged by this phase.
- Changes to existing auto-create deal/ticket logic — auto-create behavior is already consistent and is not in scope.
- Historical backfill — chatbot/AI-created deals and tickets that exist before this phase ships will not be retroactively updated with timeline logs, contact associations, or room links.
- Source granularity in creator label — the Creator field will show "Bot" or "AI" only. Specific chatbot flow names, bot names, or Agentic AI agent names are deferred to a future phase.
- Changes to chatbot qualification or decision-making logic — what triggers chatbot/Agentic AI to create a deal or ticket is explicitly out of scope.
- Mobile app support — this phase is web-only.
5. Constraints
| Field | Value |
|---|---|
| Platform | Web only |
| Performance | Rendering the deal/ticket preview in the conversation infobar must not introduce noticeable degradation to room loading performance. Engineering to define specific latency threshold during RFC. |
| Data limits | One deal preview and one ticket preview per chat room. Timeline log retained for a maximum of 1 year per CRM log retention policy (system-managed purge; not configurable by agents). |
| Plan scope | Applies only to deals and tickets created by Chatbot and Agentic AI. Feature is available to any plan that includes Chatbot or Agentic AI access. Manually-created and auto-created deals are not affected. |
| Feature flag | TBD during implementation — to be defined by Engineering during RFC. Default: OFF. Enabled per account. Provided by Omnichannel. |
| Read/write | Deal & Ticket Section/Tab (Omnichannel): All agents with Omnichannel inbox access can view the Deal & Ticket section/tab. All display, permissions, and business logic within the section are owned by CRM's embedded component. Clicking the deal/ticket name with no CRM permission → CRM's embedded component handles access (403 behavior managed by CRM). Timeline Log (CRM): All agents with CRM deal/ticket access can view the log. Cannot be deleted or edited by any user role. Room Association: System-managed only. Cannot be manually created or unlinked by agents. |
5.1 Data Lifecycle
| Artifact Type | Retention Period | Cleanup Trigger | User-Visible Effect |
|---|---|---|---|
| Chat history timeline log entry (CRM deal/ticket) | 1 year from creation | CRM log retention policy auto-purge (system-managed) | Timeline entry disappears after 1 year; deal/ticket record remains. No in-app notification to agents. |
| Room-deal/ticket association | Indefinite (until overwritten by a newer record) | A newer chatbot/AI-created deal/ticket for the same room triggers replacement — system-managed. | The Deal & Ticket section updates to show the most recently created record (CRM embedded component refreshed). Previous association is overwritten, not archived. |
6. Feature Changes
Change ID: CHG-001 — Omnichannel Conversation Room: Deal & Ticket Section/Tab
| Field | Detail |
|---|---|
| Change Type | New component — Deal & Ticket section/tab added to Omnichannel conversation room (container provided by Omnichannel); CRM embedded component renders all preview, navigation, and UI within the section |
| Page | Omnichannel conversation room |
| Page Intent | Agent manages and responds to an active customer conversation |
| Before | When chatbot or Agentic AI creates a deal/ticket, the conversation room shows no record — the "Create Deal" CTA persists as if nothing exists. No deal/ticket preview is rendered. Omnichannel receives no events from CRM for bot/AI-created records. |
| After | Omnichannel provides a Deal & Ticket section/tab (container only, feature-flagged). CRM's embedded component renders deal/ticket preview within the section. When chatbot or Agentic AI creates a deal/ticket, CRM fires a dedicated event to Omnichannel, triggering a real-time refresh of the embedded component. The embedded component renders preview (Name, ID, Stage/Status, Pipeline for deals) and handles navigation and empty state. |
| Element | Before | After |
|---|---|---|
| Deal & Ticket section/tab in conversation room | Does not exist | Omnichannel provides the container/tab (feature-flagged); CRM embedded component renders all content within it |
| Deal & Ticket section — no deal/ticket exists | N/A | CRM embedded component renders empty state within the section |
| Deal & Ticket section — chatbot/AI deal exists | N/A — no preview rendered | CRM embedded component renders: Deal Name (clickable), Deal ID, Stage, Pipeline |
| Deal & Ticket section — chatbot/AI ticket exists | N/A — no preview rendered | CRM embedded component renders: Ticket Name (clickable), Ticket ID, Status |
| Deal & Ticket section — record deleted in CRM | N/A | CRM embedded component reverts to empty state after receiving deletion event from CRM |
Scope note — Omnichannel owns: (1) Deal & Ticket section/tab container. (2) Feature flag for rollout.
Not in scope for Omnichannel: Any Deal/Ticket UI, display component, preview card, form, validation, permissions, or business logic — fully owned and rendered by CRM's embedded component.
Figma: N/A — no new design; CRM embedded component follows existing deal preview design pattern.
Change ID: CHG-002 — CRM Deal/Ticket Detail: Creator Attribution
| Field | Detail |
|---|---|
| Change Type | Modified field — Creator field on deal/ticket detail page |
| Page | CRM deal detail page · CRM ticket detail page |
| Page Intent | Agent or manager reviews, edits, or audits a specific deal or ticket record |
| Before | Creator field for chatbot/AI-created records shows no value or an incorrect system user label. |
| After | Creator field displays "Bot" for chatbot-created records and "AI" for Agentic AI-created records, based on the creator_flag passed in the creation payload. Records without a creator_flag retain existing behavior. |
| Element | Before | After |
|---|---|---|
| Creator field — chatbot-created deal/ticket | Blank or incorrect system user | "Bot" |
| Creator field — Agentic AI-created deal/ticket | Blank or incorrect system user | "AI" |
| Creator field — manually created or auto-create | [Existing behavior] | Unchanged |
Figma: N/A
7. New Features
Feature: CRM Timeline Log — Chat History Entry for Bot/AI-Created Records
| Field | Detail |
|---|---|
| Location | CRM deal detail page → Timeline section · CRM ticket detail page → Timeline section |
| Access | All agents/managers with CRM deal or ticket view access |
Component Tree:
| Component | Parent | Purpose |
|---|---|---|
| TimelineSection | DealDetailPage / TicketDetailPage | Existing container for all timeline events |
| BotCreationTimelineEntry | TimelineSection | New entry type: auto-created when chatbot/AI creates a deal/ticket with room_id |
| ChatHistoryPreview | BotCreationTimelineEntry | Displays truncated chat history reference retrieved via Chat Panel API |
| ChatRoomDeeplink | BotCreationTimelineEntry | Clickable link navigating to the originating chat room (new tab) |
| CreatorBadge | BotCreationTimelineEntry | Displays "Bot" or "AI" per creator_flag value |
📊 Component Tree — CRM Bot Creation Timeline Entry
graph TD
A[DealDetailPage / TicketDetailPage] --> B[TimelineSection]
B --> C[BotCreationTimelineEntry<br>New — auto-created for bot/AI records]
C --> D[ChatHistoryPreview<br>Truncated history from room_id]
C --> E[ChatRoomDeeplink<br>Opens originating room in new tab]
C --> F[CreatorBadge<br>Bot or AI label]
UI States:
| Component | State | Description |
|---|---|---|
| BotCreationTimelineEntry | Loading | Timeline section shows existing loading skeleton while entries are fetched |
| BotCreationTimelineEntry | Empty | No entry shown if room_id was not provided at creation time. Deal/ticket still created successfully. |
| BotCreationTimelineEntry | Error (chat history) | Entry created with ChatRoomDeeplink and CreatorBadge visible; ChatHistoryPreview absent if Chat Panel API fails to retrieve content. No agent-facing error shown. |
| BotCreationTimelineEntry | Success | Full entry: CreatorBadge ("Bot" or "AI") + ChatHistoryPreview (truncated) + ChatRoomDeeplink |
| ChatRoomDeeplink | Error | Error message shown in CRM if originating chat room is deleted or agent lacks Omnichannel access. Navigation blocked. |
📊 UI State Diagram — BotCreationTimelineEntry
stateDiagram-v2
[*] --> Loading : Deal/Ticket detail opened
Loading --> Empty : room_id absent at creation
Loading --> Error_ChatHistory : room_id present; Chat Panel API fails
Loading --> Success : room_id present; chat history retrieved
Error_ChatHistory --> Success : Entry rendered with deeplink only; preview absent
Success --> [*]
Empty --> [*]
Figma: N/A
8. API & Webhook Behavior
| # | Behavior | Entity Affected | Triggered By | Expected Behavior | Failure Behavior |
|---|---|---|---|---|---|
| 1 | Chatbot/AI → CRM: Create deal with extended payload | Deal record (CRM) | Chatbot or Agentic AI triggers deal creation | CRM receives room_id, contact_id, creator_flag in addition to existing deal fields. CRM creates deal, associates contact (if contact_id valid), stores room_id, sets creator label from creator_flag, creates timeline log entry with chat history preview. Notifies Omnichannel via API. | room_id absent → deal created, no timeline log, no embedded component refresh. contact_id invalid → deal created, no contact association, error logged internally. creator_flag absent/unrecognised → default creator behavior. |
| 2 | Chatbot/AI → CRM: Create ticket with extended payload | Ticket record (CRM) | Chatbot or Agentic AI triggers ticket creation | Same as #1 for ticket object. CRM receives room_id, crm_ticket_name, crm_ticket_id, crm_unique_ticket_id, creator_flag. Notifies Omnichannel via API. | Same failure modes as #1. |
| 3 | CRM → Omnichannel: Deal creation event | Deal preview (CRM embedded component in Omnichannel Deal & Ticket section) | CRM deal created with room_id | CRM calls dedicated Omnichannel deal creation API with external_id (Deal ID), external_url (Deal URL), room_id. Omnichannel triggers real-time refresh of the CRM embedded component for the specified room; CRM's embedded component renders the deal preview. | API call fails → embedded component does not refresh. CRM logs the failure. No retry defined in this phase. |
| 4 | CRM → Omnichannel: Deal update event | Deal preview (CRM embedded component in Omnichannel Deal & Ticket section) | CRM deal Name, Stage, or Pipeline is updated | CRM sends update event to Omnichannel with latest field values. Omnichannel triggers refresh of the CRM embedded component, which re-renders with latest values. | API call fails → embedded component remains stale. No agent-facing error. CRM logs the failure. |
| 5 | CRM → Omnichannel: Ticket creation event | Ticket preview (CRM embedded component in Omnichannel Deal & Ticket section) | CRM ticket created with room_id | CRM calls dedicated Omnichannel ticket creation API with room_id, crm_ticket_name, crm_ticket_id, crm_unique_ticket_id. Omnichannel triggers refresh of the CRM embedded component; embedded component renders the ticket preview. | Same as #3. |
| 6 | CRM → Omnichannel: Ticket update event | Ticket preview (CRM embedded component in Omnichannel Deal & Ticket section) | CRM ticket Name or Status updated | CRM sends update event to Omnichannel with latest values. Omnichannel triggers refresh of the CRM embedded component, which re-renders with latest values. | Same as #4. |
| 7 | CRM → Omnichannel: Deal/Ticket deletion event | Deal/Ticket preview (CRM embedded component in Omnichannel Deal & Ticket section) | Deal or ticket is deleted in CRM | CRM calls dedicated Omnichannel deletion API. Omnichannel triggers refresh of the CRM embedded component, which reverts to empty state. | Deletion event delivery fails → embedded component remains visible for a deleted record. Stale state until next sync or room reload. |
| 8 | CRM: Chat history retrieval | ChatHistoryPreview (CRM timeline entry) | Deal/Ticket creation event received with valid room_id | CRM calls existing Chat Panel → CRM API using room_id to retrieve conversation history. Stores reference for timeline entry. | API fails → timeline entry created with ChatRoomDeeplink only; ChatHistoryPreview absent. Error logged internally. |
| 9 | Actor type filter: CRM → Omnichannel event scope | Event routing | Any CRM event (create/update/delete) | An actor type mechanism determines which CRM events are propagated to Omnichannel — not every CRM event triggers an embedded component refresh. Only events originating from Chatbot or Agentic AI (identified by creator_flag) are sent via the dedicated APIs in this phase. | Actor type absent or unrecognised → event not propagated to Omnichannel. CRM logs the gap. |
Claude to resolve during RFC: HTTP method, path, request/response JSON schema, error codes, retry policy.
9. System Flow + User Stories + ACs
9.1 System Flow
Flow: Bot/AI Deal & Ticket Creation → Agent Visibility & Navigation · Type: API Sequence
📊 System Flow — Consistent Deal & Ticket Creation (Bot & AI)
sequenceDiagram
participant Customer
participant Chatbot_AI as Chatbot / Agentic AI
participant CRM_Backend as CRM Backend
participant CRM_ChatAPI as Chat Panel API
participant Omnichannel as Omnichannel Backend
participant Agent as Sales Agent
Customer->>Chatbot_AI: Sends inbound message
Chatbot_AI->>Chatbot_AI: Evaluate trigger / qualification
alt Qualified → Create Deal or Ticket
Chatbot_AI->>CRM_Backend: POST Create Deal/Ticket (room_id, contact_id, creator_flag, source)
CRM_Backend->>CRM_Backend: Create deal/ticket record
CRM_Backend->>CRM_Backend: Associate contact (if contact_id valid)
CRM_Backend->>CRM_Backend: Store room association
CRM_Backend->>CRM_Backend: Set creator label (Bot / AI)
CRM_Backend->>CRM_ChatAPI: GET chat history (room_id)
alt Chat history retrieved
CRM_ChatAPI-->>CRM_Backend: Chat history preview
CRM_Backend->>CRM_Backend: Create timeline log (history preview + room deeplink)
else Chat history unavailable
CRM_Backend->>CRM_Backend: Create timeline log (room deeplink only)
end
CRM_Backend->>Omnichannel: POST Deal/Ticket creation event (external_id, external_url, room_id)
Omnichannel->>Omnichannel: Trigger refresh of CRM embedded component in Deal & Ticket section
Agent->>Omnichannel: Opens chat room
Omnichannel-->>Agent: Deal & Ticket section shows preview (Name, ID, Stage/Status, Pipeline) — rendered by CRM embedded component
Agent->>Omnichannel: Clicks Deal/Ticket Name in Deal & Ticket section
Omnichannel-->>Agent: CRM embedded component opens Deal/Ticket detail in new tab
Agent->>CRM_Backend: Views timeline log entry
Agent->>CRM_Backend: Clicks Chat Room deeplink
CRM_Backend-->>Agent: Opens originating chat room in new tab
else Not qualified
Chatbot_AI-->>Customer: No deal/ticket created
end
alt Deal/Ticket updated in CRM
CRM_Backend->>Omnichannel: PUT Deal/Ticket update event (latest Name/Stage/Status)
Omnichannel->>Omnichannel: Trigger refresh of CRM embedded component with latest values
end
alt Deal/Ticket deleted in CRM
CRM_Backend->>Omnichannel: DELETE/dedicated deletion event
Omnichannel->>Omnichannel: Trigger refresh → CRM embedded component reverts to empty state
end
9.2 User Stories
| User Story | Importance | Mockup / Technical Notes | Acceptance Criteria |
|---|---|---|---|
| CDTC-S01 — Deal/Ticket Preview in Chat Room As a Sales Agent, I want to see a deal/ticket preview in the conversation Deal & Ticket section when chatbot or Agentic AI has created a deal or ticket for my conversation, so that I can immediately identify whether the room already has an associated CRM record without manually searching. | Must Have Core value prop — without this story, the feature does not exist. Directly addresses the "Create Deal CTA persists after bot/AI creation" pain. | Figma: N/A — follows existing deal preview design pattern. Data Fields: • deal_id / ticket_id (string) — CRM• deal_name / ticket_name (string) — CRM• stage / status (string) — CRM• pipeline (string) — CRM, deal only• room_id (string) — association key• external_url (string) — deal/ticket detail URLBefore: No deal/ticket preview was rendered for chatbot/AI-created records; the "Create Deal" CTA persisted as if no record existed. After: The Deal & Ticket section in the conversation (container provided by Omnichannel) shows the deal/ticket preview rendered by CRM's embedded component once CRM fires the creation event. Ownership: Omnichannel owns the Deal & Ticket section/tab container and feature flag only. CRM's embedded component owns all preview rendering, empty state, permissions, and business logic within the section. Note: CRM must fire dedicated events to Omnichannel for create, update, AND delete events. Actor type mechanism determines which events are propagated. CRM's embedded component handles real-time refresh and rendering on each event. | Happy Path • AC-1: Given a Sales Agent is viewing a chat room, when chatbot or Agentic AI creates a deal and CRM fires the creation event to Omnichannel, then the Deal & Ticket section displays a deal preview rendered by CRM's embedded component (Deal Name, Deal ID, Stage, Pipeline). • AC-2: Same for ticket — when chatbot/AI creates a ticket and CRM fires the event, the Deal & Ticket section shows Ticket Name, Ticket ID, Status rendered by CRM's embedded component. • AC-3: Given a preview is already showing, when chatbot/AI creates a second deal/ticket for the same room, then the CRM embedded component updates to display the most recently created record (latest wins). • AC-4: Given a deal/ticket preview is displayed, when Deal Name, Stage, Pipeline, Ticket Status, or other displayed fields are updated in CRM, then the CRM embedded component re-renders the preview with the latest values after receiving the update event. Error • ERR-1: Given a preview is showing, when CRM fires a deletion event to Omnichannel, then the CRM embedded component reverts to empty state within the Deal & Ticket section. • ERR-2: Given Omnichannel cannot reach CRM, when the CRM embedded component attempts to display the preview, then it shows an error state within the Deal & Ticket section; the main conversation view is unaffected. Permission Model • CAN: Any agent with Omnichannel inbox access sees the Deal & Ticket section/tab. The CRM embedded component determines display content based on CRM permissions. • CANNOT: Room-deal/ticket association cannot be manually unlinked by agents — system-managed only. • CANNOT: Preview cannot be manually dismissed by an agent. • Unauthorized: Clicking the deal/ticket name without CRM permissions → CRM's embedded component handles access (403 behavior managed by CRM). UI States • Loading: CRM embedded component shows skeleton/spinner within the Deal & Ticket section. • Empty: CRM embedded component renders empty state — no deal/ticket exists yet for this room. • Error: CRM embedded component shows error state within the Deal & Ticket section; chat unaffected. • Success: CRM embedded component renders Deal/Ticket preview (Name, ID, Stage/Status, Pipeline) within the Deal & Ticket section. |
| 🧪 CDTC-S01 — Test Coverage | — | — | Boundary values ⚠️ TBD — QA: room with no deal (empty state shown by CRM embedded component), room receiving deletion immediately after creation, second creation event for same room. State transitions ✅ defined — AC-1/2 cover empty→preview; AC-3 covers preview→preview (latest wins); ERR-1 covers preview→empty (deletion). Data validation ⚠️ TBD — QA: deal name with special characters; ticket preview without pipeline field. Concurrency ⚠️ TBD — QA: two creation events within milliseconds for same room — confirm timestamp ordering mechanism. Network/timeout ⚠️ partial — ERR-2 covers CRM unreachable; stale preview on update failure not tested. |
| CDTC-S02 — Navigate from Chat Room Deal & Ticket Section to Deal/Ticket Detail As a Sales Agent, I want to click the deal/ticket name in the Deal & Ticket section and open the deal/ticket detail in a new tab, so that I can review or update the CRM record without losing my active conversation context. | Must Have Completes the bidirectional navigation loop. Without this, the preview is visible but not actionable. | Figma: N/A — follows existing new-tab navigation pattern (consistent with how Qontak opens CRM objects from Omnichannel today). Data Fields: • external_url (string) — deal detail URL• ticket_url (string) — ticket detail URLBoth provided by CRM in the creation API payload. Before: No deal/ticket preview existed for chatbot/AI-created records, so no navigation was possible. After: Clicking the deal/ticket name in the Deal & Ticket section (rendered by CRM's embedded component) opens the detail in a new browser tab. Navigation is rendered and handled by CRM's embedded component. Ownership: CRM's embedded component renders the clickable deal/ticket name and handles the navigation action. Omnichannel provides the container only. | Happy Path • AC-1: Given a deal/ticket preview is displayed in the Deal & Ticket section (rendered by CRM's embedded component), when I click the Deal Name or Ticket Name, then the deal/ticket detail opens in a new browser tab. • AC-2: Given the detail has opened in a new tab, when I return to the Omnichannel tab, then my chat room session is active and unchanged. Error • ERR-1: Given a preview is displayed, when I click the name and the CRM record no longer exists (deleted), then CRM's embedded component shows an error notification within the Deal & Ticket section and does not navigate to a broken page. Permission Model • CAN: Agents with access to both the chat room and the CRM record can open the deal/ticket detail via CRM's embedded component. • CANNOT: Navigation action does not affect the room-deal/ticket association. • Unauthorized: Agents without CRM permissions see the preview; clicking → CRM's embedded component handles access (403 behavior managed by CRM). No additional Omnichannel error handling required. UI States • Loading: CRM embedded component renders clickable deal/ticket name link; brief browser tab open transition. • Empty: N/A — no preview, no navigation available. • Error: CRM embedded component shows error notification within the Deal & Ticket section if CRM record is inaccessible/deleted. • Success: Deal/Ticket detail opens in a new browser tab. |
| 🧪 CDTC-S02 — Test Coverage | — | — | Boundary values ⚠️ TBD — QA: external_url is malformed or empty string.State transitions ✅ defined — AC-1 covers preview→new tab; AC-2 covers return to original tab; ERR-1 covers deleted record. Data validation ⚠️ TBD — QA: clicking deal name should not navigate if CRM embedded component is in loading/error state. Concurrency ⚠️ TBD — QA: agent has deal detail open in new tab; deal is deleted in CRM — what does the stale open tab show? Network/timeout ⚠️ partial — ERR-1 covers deleted record navigation. Browser-level 403 redirect (CRM-managed) not tested from Omnichannel side. |
| CDTC-S03 — Auto-Associate Conversation Contact at Bot/AI Deal/Ticket Creation As a Sales Agent, I want the conversation contact to be automatically linked to deals and tickets created by chatbot or Agentic AI, so that the CRM record has the same contact context as a manually-created record without requiring manual linking. | Must Have Contact association is table stakes for CRM record quality. A deal/ticket without a contact is incomplete and requires manual intervention from agents. | Figma: N/A — CRM backend process; no new agent-facing UI element. Data Fields: • contact_id (string) — passed by chatbot in creation payload; auto-identified by Agentic AI.Before: Chatbot-created deals/tickets were not linked to the conversation contact — agents had to manually search and link. After: Contact association is performed at creation time using contact_id from the chatbot/AI payload. | Happy Path • AC-1: Given a chatbot creates a deal/ticket and includes a valid contact_id, when CRM processes the request, then the conversation contact is automatically associated with the created record.• AC-2: Given Agentic AI creates a deal/ticket, when CRM processes the request, then the Agentic AI's auto-identified contact is associated without agent input. Error • ERR-1: Given a chatbot creates a deal/ticket without providing a contact_id, when CRM processes the request, then the record is created with no contact association and the contact field remains empty. No agent-facing error.• ERR-2: Given a chatbot provides an invalid or non-existent contact_id, when CRM processes the request, then the record is created without contact association; the error is logged internally.Permission Model • CAN: System (chatbot/Agentic AI) associates the contact at creation time. • CANNOT: Agents cannot trigger or re-trigger the auto-association after creation — standard CRM contact management applies for any post-creation changes. • CANNOT: Auto-association does not override an already-associated contact if one exists on the record. UI States • Loading: N/A — backend process. • Empty: Contact field empty when chatbot provides no contact_id.• Error: Record created; contact field empty; error logged internally only. • Success: Contact field populated immediately after creation. |
| 🧪 CDTC-S03 — Test Coverage | — | — | Boundary values ⚠️ TBD — QA: contact_id = 0, null string, valid but soft-deleted contact.State transitions ✅ defined — AC-1/2 cover successful association; ERR-1 covers absent contact_id; ERR-2 covers invalid contact_id.Data validation ⚠️ partial — ERR-2 covers invalid contact_id. QA: contact exists in Omnichannel but not yet synced to CRM.Concurrency ⚠️ TBD — QA: Agentic AI and chatbot both create deals for same room simultaneously — independent contact associations? Network/timeout ⚠️ TBD — QA: CRM contact lookup times out during deal creation — deal still created? Contact field empty? |
| CDTC-S04 — Chat History Timeline Log in Deal/Ticket Detail As a Sales Agent, I want to see a timeline entry in the deal/ticket detail with a chat history preview and a link to the originating chat room, so that I can trace how the deal/ticket was created and understand the conversation context without leaving the CRM record. | Must Have Enables traceability from CRM back to the conversation. Without this, managers cannot audit bot/AI-created records or understand their origin. | Figma: N/A — new entry type in existing CRM timeline log component. Data Fields: • room_id (string) — passed by chatbot/AI in creation payload• creator_flag (string: "bot" | "agentic_ai") — passed in creation payload• chat_history_preview (reference) — retrieved by CRM via existing Chat Panel API using room_idBefore: Chatbot/AI-created deals/tickets had no timeline entry referencing the originating conversation. After: A timeline log entry is auto-created at deal/ticket creation time containing a chat history preview reference and a link to the originating chat room. | Happy Path • AC-1: Given a chatbot or Agentic AI creates a deal/ticket with a valid room_id, when CRM processes the request, then a timeline log entry is auto-created containing (1) a chat history preview reference and (2) a clickable link to the originating chat room.• AC-2: Given the timeline log entry exists, when I view the deal/ticket detail, then the creator is displayed as "Bot" for chatbot-created records and "AI" for Agentic AI-created records. Error • ERR-1: Given chatbot/AI creates a deal/ticket without a room_id, when CRM processes the request, then the record is created successfully but no timeline log entry is generated.• ERR-2: Given a valid room_id is provided but CRM cannot retrieve chat history via Chat Panel API, when the timeline log entry is created, then the entry is created with the room link and creator label but no chat history preview content.Permission Model • CAN: Any agent with CRM deal/ticket view access can view the timeline log entry. • CANNOT: The timeline log entry cannot be deleted or edited by agents — it is system-generated and permanent from the agent's perspective. • CANNOT: Timeline log is retained for a maximum of 1 year per CRM log retention policy; auto-purge is system-managed and cannot be extended or prevented by agents. UI States • Loading: Timeline section shows existing loading state while entries are fetched. • Empty: No timeline log entry if room_id was not provided at creation. Record created successfully.• Error: Entry created with room link and creator label only; chat history preview absent. No agent-facing error. • Success: Creator label ("Bot"/"AI") + chat history preview reference + room navigation deeplink. |
| 🧪 CDTC-S04 — Test Coverage | — | — | Boundary values ⚠️ TBD — QA: timeline log at creation time (immediate) vs. after 1-year retention expiry; room_id present but chat room has 0 messages.State transitions ✅ defined — AC-1 covers entry creation; ERR-1 covers absent room_id; ERR-2 covers chat history API failure (entry with link only).Data validation ⚠️ partial — AC-2 covers creator label. QA: creator_flag = unrecognised string — what creator label is shown?Concurrency ⚠️ TBD — QA: two creation events for same room arrive simultaneously — two timeline entries created, or deduplicated? Network/timeout ⚠️ partial — ERR-2 covers Chat Panel API failure. QA: partial response from Chat Panel API — entry created with partial content? |
| CDTC-S05 — Navigate from Deal/Ticket Timeline to Originating Chat Room As a Sales Agent, I want to click the chat room link in the deal/ticket timeline log and open the originating conversation in a new tab, so that I can review the full chat context without leaving the deal/ticket detail. | Must Have Completes the bidirectional navigation: Omnichannel → CRM (S02) and CRM → Omnichannel (this story). Both directions are needed for the traceability loop to be useful. | Figma: N/A — new-tab pattern, consistent with CDTC-S02. Data Fields: • room_deeplink (string) — generated by CRM Backend from room_id; depends on Chat Room Deeplink Support (CRM Backend).Before: This navigation capability does not exist for chatbot/AI-created records. After: The timeline log entry contains a clickable link that opens the originating chat room in a new browser tab. Note: Depends on CDTC-S04 — timeline log must exist first. | Happy Path • AC-1: Given a deal/ticket has a timeline log entry containing a chat room deeplink, when I click the link, then the originating chat room opens in a new browser tab. • AC-2: Given the chat room has opened in a new tab, when I return to the CRM tab, then my position in the deal/ticket detail is preserved. Error • ERR-1: Given a deal/ticket has a timeline log with a room deeplink, when the originating chat room is no longer accessible (deleted or permissions removed), then the system displays an error message and does not navigate to a broken page. Permission Model • CAN: Agents with access to both the CRM deal/ticket AND the originating chat room can navigate to the chat room. • CANNOT: Agents without Omnichannel access to the originating room see an access error when clicking the deeplink. • CANNOT: The room deeplink in the timeline cannot be edited, replaced, or removed by agents. UI States • Loading: Brief browser tab transition. • Empty: No room link shown if room_id was not provided at deal/ticket creation.• Error: Error message in CRM if chat room is inaccessible or deleted. • Success: Originating chat room opens in a new browser tab. |
| 🧪 CDTC-S05 — Test Coverage | — | — | Boundary values ⚠️ TBD — QA: deeplink for a chat room that has been archived vs. hard-deleted. State transitions ✅ defined — AC-1 covers success; ERR-1 covers inaccessible room; Empty state covers absent room_id.Data validation ⚠️ TBD — QA: deeplink URL format — confirm room_id is correctly encoded and resolves to the right conversation.Concurrency ⚠️ TBD — QA: agent clicks deeplink; room is reassigned to another agent between click and load — what does agent see? Network/timeout ⚠️ TBD — QA: deeplink URL resolves but Omnichannel takes >5s to load — is there a timeout UX? |
| CDTC-S06 — Creator Label "Bot" / "AI" on System-Generated Records As a Sales Manager, I want to see "Bot" or "AI" displayed as the creator on deals and tickets generated by chatbot or Agentic AI, so that I can distinguish automated records from manually-created or auto-create records during audits and investigations. | Should Have Enables audit-grade traceability. Not blocking for Phase 1 launch, but significantly reduces manual investigation effort for managers. | Figma: N/A — existing Creator field in deal/ticket detail; new display value only. Data Fields: • creator_flag (string: "bot" | "agentic_ai") — passed in chatbot/AI creation payload; stored by CRM.Before: Chatbot/AI-created deals/tickets showed no creator or an incorrect system user label. After: Creator field displays "Bot" or "AI" based on creator_flag passed at creation time.Note: No source granularity beyond "Bot"/"AI" in this phase. | Happy Path • AC-1: Given a chatbot creates a deal/ticket with creator_flag: "bot", when CRM processes the creation, then the Creator field displays "Bot."• AC-2: Given Agentic AI creates a deal/ticket with creator_flag: "agentic_ai", when CRM processes the creation, then the Creator field displays "AI."• AC-3: Given a deal/ticket is created without a creator_flag, when CRM processes the request, then the Creator field displays the existing default behavior (unchanged).Error • ERR-1: N/A — if creator_flag is absent or unrecognised, default creator behavior applies. No agent-facing error.Permission Model • CAN: Any agent or manager with CRM deal/ticket view access can see the Creator field. • CANNOT: Creator field cannot be manually edited by agents. • CANNOT: Source granularity (specific chatbot flow name or Agentic AI agent name) is out of scope for this phase. UI States • Loading: N/A — creator label is set at creation time. • Empty: Default creator behavior if creator_flag not provided.• Error: Default creator behavior; no agent-facing error. • Success: "Bot" or "AI" displayed in the Creator field. |
| CDTC-NEG-01 — Single Deal/Ticket per Room (Latest Wins) (Guard Rail — Non-Goal #1: multiple deals/tickets per room) | Guard Rail | — | • NEG-1: Given a room already has a deal/ticket preview in the Deal & Ticket section, when chatbot or Agentic AI creates a second deal/ticket for the same room, then CRM's embedded component only displays the most recently created record — the previous preview is replaced, not shown alongside it. |
| CDTC-NEG-02 — Manual/Auto-Create Deal Flow Unchanged (Guard Rail — Non-Goal #2: changes to existing manual or auto-create flows) | Guard Rail | — | • NEG-2: Given an agent manually creates a deal from the Omnichannel chat room, when the deal creation flow is triggered, then the existing manual creation behavior is preserved unchanged. This phase does not modify the manual creation entry point or flow. |
| CDTC-NEG-03 — Chatbot Source Value Preserved (Guard Rail — from Open Question #4: source not overridden if already provided) | Guard Rail | — | • NEG-3: Given a chatbot creates a deal/ticket and the payload already includes a source value, when CRM processes the request, then the provided source value is preserved and is not overridden by the conversation channel source. |
Edge Cases
| # | Edge Case | Why it matters |
|---|---|---|
| E1 | Agentic AI and Chatbot both create a deal for the same room within a short time window | Only the latest deal shows (latest wins). Engineering needs a deterministic ordering mechanism — timestamp at CRM creation, not Omnichannel receipt time. CRM's embedded component renders the winner. |
| E2 | Deal/ticket is deleted in CRM while agent has the chat room open | The Deal & Ticket section must update to empty state after CRM fires the deletion event. If the event is delayed, CRM's embedded component may still show preview for a deleted record temporarily. |
| E3 | Chatbot creates a deal/ticket without providing room_id | Deal/ticket created in CRM; no creation event sent to Omnichannel; CRM embedded component does not refresh. Deal is invisible from the chat room — same as pre-phase behavior for that record. |
| E4 | CRM chat history retrieval API fails at timeline log creation | Timeline log entry created with room deeplink and creator label only; chat history preview absent. No retry in this phase. |
| E5 | Agent has the "old" deal detail open in a new tab when the CRM embedded component updates to a newer deal (latest-wins replacement) | Agent's open tab still shows the original deal. No forced sync required — acceptable per confirmed "latest wins" design. |
| E6 | Deal/ticket is deleted in CRM while agent is actively viewing the deal detail in a new tab | Stale/deleted record view persists in the open tab. Standard CRM error handling for deleted records applies — out of scope for this phase. |
10. Rollout
| Field | Detail |
|---|---|
| Feature flag | TBD — to be defined during RFC. Default: OFF. Enabled per account. Provided by Omnichannel (container-level flag). |
| Rollout | Stage 1 → Internal QA: Qontak internal accounts (CRM + Omnichannel + Chatbot/Agentic AI enabled). Stage 2 → Closed Beta: selected chatbot and Agentic AI customers (CSM-nominated). Stage 3 → GA: all accounts with Chatbot or Agentic AI plan access, after GA criteria met. |
| Backward compat | Yes — existing manual and auto-create deal/ticket behavior is unchanged. Agents without chatbot/Agentic AI deals in their rooms see no change to their infobar experience. The Deal & Ticket section/tab is only visible when the feature flag is enabled. |
| Migration | None required. Historical chatbot/AI-created records are not backfilled (Non-Goal #4). |
11. Observability
Key Events:
| Event Name | Trigger | Properties |
|---|---|---|
bot_deal_created | Chatbot triggers deal creation via CRM API | room_id, creator_flag: "bot", contact_id_present (bool), source, timestamp |
ai_deal_created | Agentic AI triggers deal creation via CRM API | room_id, creator_flag: "agentic_ai", contact_id_present (bool), timestamp |
bot_ticket_created | Chatbot triggers ticket creation via CRM API | room_id, creator_flag: "bot", contact_id_present (bool), timestamp |
ai_ticket_created | Agentic AI triggers ticket creation via CRM API | room_id, creator_flag: "agentic_ai", contact_id_present (bool), timestamp |
deal_preview_displayed | CRM embedded component renders deal preview within the Omnichannel Deal & Ticket section for a bot/AI-created deal | room_id, deal_id, creator_source ("bot"|"agentic_ai"), timestamp |
ticket_preview_displayed | CRM embedded component renders ticket preview within the Omnichannel Deal & Ticket section for a bot/AI-created ticket | room_id, ticket_id, creator_source, timestamp |
deal_preview_clicked | Agent clicks Deal Name in Deal & Ticket section → opens deal detail | room_id, deal_id, agent_id, timestamp |
ticket_preview_clicked | Agent clicks Ticket Name in Deal & Ticket section → opens ticket detail | room_id, ticket_id, agent_id, timestamp |
deal_timeline_chatroom_clicked | Agent clicks Chat Room deeplink in CRM timeline | deal_id, room_id, agent_id, timestamp |
ticket_timeline_chatroom_clicked | Agent clicks Chat Room deeplink in CRM ticket timeline | ticket_id, room_id, agent_id, timestamp |
timeline_log_creation_failed | CRM fails to create timeline log entry (e.g. Chat Panel API error) | deal_id / ticket_id, room_id, error_reason, timestamp |
Dashboard owner: CRM Squad (primary — embedded component events + timeline events) · Omnichannel Squad (section/tab availability)
Alerts:
timeline_log_creation_failed> 5% ofbot_deal_created + bot_ticket_created + ai_deal_created + ai_ticket_createdin any 1-hour window → Alert CRM Engineering on-call.deal_preview_displayed/ticket_preview_displayedrate drops to 0 whilebot_deal_created/bot_ticket_created/ai_deal_created/ai_ticket_createdis non-zero for > 15 minutes → Alert CRM Engineering on-call and Omnichannel Engineering on-call (CRM embedded component not refreshing, or CRM creation events not reaching Omnichannel).
11.1 Post-Launch Monitoring Cadence
| Field | Detail |
|---|---|
| Review cadence | Weekly for the first 4 weeks post-GA, then monthly |
| Owner | Alma Syafira (PM) + CRM Squad |
| Review scope | Preview display success rate; navigation click-through rates; timeline log creation failure rate; no significant room loading latency increase |
| Trigger thresholds | • Timeline log creation failure rate > 5% for 2 consecutive days → Engineering investigation within 24 hours. • Preview display success rate < 90% of bot/AI deal creations for 1 week → PM review within 48 hours. • Room loading latency increase > baseline + 200ms P95 post-rollout → Rollback consideration. |
| Rollback consideration | If room loading latency increases significantly (> 200ms P95 over pre-rollout baseline) and is unresolved within 48 hours, PM to evaluate feature flag rollback with Engineering lead. |
12. Success Metrics
Adoption & Usage:
| Metric | Definition | Baseline | Target |
|---|---|---|---|
| ⭐ % of bot/AI-created deals and tickets successfully displayed as preview in Omnichannel Deal & Ticket section | deal_preview_displayed / bot_deal_created + ai_deal_created · ticket_preview_displayed / bot_ticket_created + ai_ticket_created | N/A — new capability | ≥ 95% within 4 weeks post-GA |
| Room → Deal/Ticket navigation rate | deal_preview_clicked + ticket_preview_clicked / deal_preview_displayed + ticket_preview_displayed | N/A | Establish baseline in beta; target improvement from beta to GA |
| Deal/Ticket → Room navigation rate (timeline deeplink) | deal_timeline_chatroom_clicked + ticket_timeline_chatroom_clicked / all bot/AI-created deals with timeline logs | N/A | Establish baseline in beta |
Quality & Traceability:
| Metric | Definition | Baseline | Target |
|---|---|---|---|
| % of bot/AI-created records with full context | Records that have (1) contact associated, (2) creator label set, (3) room association, AND (4) timeline log | N/A | ≥ 90% within 4 weeks post-GA |
| Timeline log creation failure rate | timeline_log_creation_failed / bot_deal_created + ai_deal_created + bot_ticket_created + ai_ticket_created | N/A | < 5% sustained |
Operational Impact:
| Metric | Definition | Baseline | Target |
|---|---|---|---|
| Reduction in support tickets related to chatbot/AI-created deal visibility | Count of support tickets/reported issues referencing chatbot deal invisibility per month | TBD — to be established from support data at GA | Measurable reduction at 60 days post-GA |
| Room loading performance | P95 latency of Omnichannel conversation room load after Deal & Ticket section is enabled | TBD — to be measured pre-rollout | No statistically significant increase vs. pre-rollout baseline |
Trust in automated workflows to be validated through customer feedback/adoption metrics at 60–90 days post-GA.
13. Launch Plan & Stage Gates
| Stage | Audience | Duration | Success Gate to Advance | Owner |
|---|---|---|---|---|
| Internal Alpha | Qontak internal accounts with Chatbot + Agentic AI + CRM + Omnichannel enabled | 1–2 weeks | All 9 dependencies delivered and integrated. Bidirectional navigation working correctly in both directions. No critical defects. Timeline log generated for ≥ 95% of test deal/ticket creations. CRM embedded component rendering correctly within the Omnichannel Deal & Ticket section. | PM + QA |
| Closed Beta | CSM-nominated chatbot and Agentic AI customers (5–10 accounts) | 2 weeks | Preview display success rate ≥ 95%. No critical defects in beta. No significant room loading latency degradation. Agent feedback: no reported confusion from preview or navigation. | PM + CSM |
| GA | All accounts with Chatbot or Agentic AI plan access | Ongoing | All Closed Beta gates sustained for ≥ 2 weeks. PMM approval received. | PM + PMM |
14. Dependencies
| Dependency | Owning Team | Deliverable Needed | Blocking? |
|---|---|---|---|
| Chatbot deal/ticket creation payload enhancement | Chatbot Squad | Chatbot includes room_id, contact_id, creator_flag in Create Deal/Ticket API payload | YES |
| Agentic AI deal/ticket creation payload enhancement | Agentic AI Squad | Agentic AI includes room_id, contact_id (auto-identified), creator_flag in Create Deal/Ticket API payload | YES |
| Room ↔ Deal/Ticket association support | CRM & Omnichannel | CRM stores room_id on deal/ticket record; Omnichannel provides the Deal & Ticket section/tab container that hosts the CRM embedded component | YES |
| Timeline log generation for bot/AI-created records | CRM Backend | Auto-creates timeline log entry with chat history preview reference and room deeplink when room_id is provided | YES |
| Contact association during bot/AI deal/ticket creation | Chatbot Squad | Chatbot passes contact_id in creation payload; Agentic AI auto-identifies contact | YES |
| Deal/Ticket embedded component in Omnichannel Deal & Ticket section | CRM Frontend | CRM owns the embedded Deal/Ticket preview, empty state, and navigation UI rendered inside the Omnichannel Deal & Ticket section/tab. Includes all display logic, permissions handling, and business logic within the section. | YES |
| Deal/Ticket detail navigation from Deal & Ticket section (new tab) | CRM Frontend | Navigation from the Deal/Ticket preview to the record detail (open in new tab) is rendered and handled by CRM's embedded component within the Omnichannel Deal & Ticket section. | YES |
| Deal & Ticket section/tab container in Omnichannel | Omnichannel Frontend | Omnichannel provides the Deal & Ticket section/tab within the conversation room (container only). All UI inside owned by CRM's embedded component. | YES |
| Feature flag for rollout | Omnichannel | Feature flag controlling visibility of the Deal & Ticket section/tab. Default OFF, enabled per account. | YES |
| Chat room deeplink support | CRM Backend | CRM generates a deeplink URL from room_id for use in the timeline log entry | YES |
| Creator label support ("Bot", "AI") | CRM Frontend | Creator field on deal/ticket detail renders "Bot" or "AI" based on stored creator_flag value | YES |
| Dedicated APIs for deal/ticket creation and deletion events | CRM Backend | CRM provides dedicated APIs to notify Omnichannel of deal/ticket creation and deletion events (triggered by chatbot/AI), enabling real-time refresh of the embedded component | YES |
15. Key Decisions + Alternatives Rejected
15a — Decisions Made
| Date | Decision | Rationale |
|---|---|---|
| 2026-06-19 | Chat history preview (lightweight reference + deeplink) rather than full transcript embed in CRM timeline | Keeps deal timeline readable; encourages navigation back to source conversation for full context; reduces CRM page weight. Full embed deferred if Sales Managers later require full context inline. |
| 2026-06-19 | Always-new-tab navigation for both chat room → deal detail and deal timeline → chat room | Consistent with existing Qontak pattern (CRM navigations from Omnichannel already open in new tab). Preserves active conversation context for agents. |
| 2026-06-19 | Conditional deal/ticket preview (appears only after creation; no new empty-state CTA for bot context) | Deal creation remains owned by chatbot/Agentic AI flow. This phase focuses on surfacing already-created records, not adding a new manual creation entry point. Existing "Create Deal" CTA handles the no-deal state unchanged. |
| 2026-06-19 | Latest-wins for multiple deal/ticket creation events per room | 1 room = 1 deal = 1 ticket constraint. If multiple events arrive, CRM's embedded component displays the most recently created record. Engineering to use CRM creation timestamp (not Omnichannel receipt time) for ordering. |
| 2026-06-19 | Simple creator labels ("Bot", "AI") without source granularity | Sufficient for audit and traceability in Phase 1. Source granularity (flow name, agent name) deferred to avoid additional payload complexity and UI changes in this phase. |
| 2026-06-19 | CRM must notify Omnichannel for create, update, AND delete events (not only create and delete) | Update synchronisation required so that the CRM embedded component reflects latest deal/ticket state. Agents should not see stale Name, Stage, or Pipeline after a CRM edit. |
| 2026-06-30 | CRM owns the embedded Deal/Ticket component; Omnichannel owns the container/tab and feature flag only | Clear ownership boundary: Omnichannel provides the section/tab shell and rollout control; all Deal/Ticket UI, validation, permissions, and business logic inside the section are owned and rendered by CRM. This reduces cross-team coupling and ensures CRM has full control over the preview experience. |
15b — Alternatives Rejected
| Alternative | Why Rejected | Date |
|---|---|---|
| Full chat transcript embed in CRM deal/ticket timeline | Makes the deal timeline heavy and duplicates content already viewable in Omnichannel. Encourages navigation back to source rather than embedding the full conversation in CRM. | 2026-06-19 |
| In-place navigation (same-tab) for chat room → deal detail | Inconsistent with existing Qontak CRM navigation pattern (already new-tab). Would close the active conversation view, forcing agents to re-open the chat room — higher effort, lower consistency. | 2026-06-19 |
| Persistent empty-state panel with "Create by Bot" CTA when no deal exists | Out of scope: deal creation is owned by chatbot/Agentic AI flow. Introducing a manual bot-creation entry point would expand scope, add a new UX pattern, and risk agents bypassing the automated flow. Deferred as a future enhancement if adoption data warrants it. | 2026-06-19 |
| Omnichannel Frontend owns the deal/ticket preview rendering | Rejected in v1.2 scope realignment. Placing preview/navigation UI in Omnichannel creates tight cross-team coupling and splits the Deal/Ticket product surface across two squads. CRM ownership of the embedded component gives one team full control over the deal/ticket experience within Omnichannel. | 2026-06-30 |
16. Open Questions
| # | Type | Question | Owner | Deadline |
|---|---|---|---|---|
| 1 | Open Question | What does an agent see if they have Omnichannel inbox access but no CRM deal/ticket permissions and they view the Deal & Ticket section? The current assumption is CRM's embedded component handles the 403 behavior — confirm exact UX and how the embedded component communicates this to the agent. | Engineering (CRM + Omnichannel) | Before RFC sign-off |
| 2 | Open Question | If the contact does not yet exist in Qontak CRM (brand-new customer) when Agentic AI creates a deal, does Agentic AI create the contact first, or is the deal created without a contact association? | Agentic AI Squad + CRM Engineering | Before RFC sign-off |
| 3 | Open Question | What is the specific latency threshold (P95) for the Deal & Ticket section rendering that defines "no noticeable degradation to room loading"? Engineering to propose a threshold during RFC based on pre-rollout measurement. | Engineering (CRM + Omnichannel) | During RFC |
| 4 | Open Question | Feature flag name — to be defined by Engineering during RFC. Default OFF, enabled per account. Owned by Omnichannel. | Engineering | During RFC |
| 5 | Assumption | CRM and Omnichannel integration is already connected. The Company Token mechanism is available for the create/update/delete event flow. | Engineering (CRM) | Confirm before development starts |
| 6 | Assumption | The existing Chat Panel → CRM API can retrieve conversation history using room_id with sufficient reliability for timeline log generation. | Engineering (CRM) | Confirm before development starts |
| 7 | Risk | If chatbot or Agentic AI squads do not deliver the enhanced payload fields (room_id, contact_id, creator_flag) on schedule, this phase cannot ship — 5 of the dependencies are owned by those squads. Mitigation: include payload requirements in the RFC and align on delivery timelines during sprint planning. | Chatbot Squad + Agentic AI Squad | Align before sprint start |
| 8 | Open Question | For the update synchronisation event (AC-4 in CDTC-S01): which specific CRM fields should trigger an Omnichannel event and CRM embedded component refresh? Current assumption: Deal Name, Stage, Pipeline; Ticket Name, Status. Confirm full list with CRM Engineering. | Engineering (CRM) | During RFC |
| 9 | Open Question | What is the integration mechanism between the CRM embedded component and the Omnichannel Deal & Ticket section/tab container? (e.g. micro-frontend, iframe, SDK, widget API) To be defined during RFC — affects how CRM's component receives room context and how Omnichannel triggers refreshes. | Engineering (CRM + Omnichannel) | During RFC |
PRD CHANGELOG
| Version | Date | By | Section | Type | Summary |
|---|---|---|---|---|---|
| 1.0 | 2026-06-19 | Claude | All | CREATED | Phase 1 PRD created from grooming session with Alma Syafira. Full grooming completed: Phase A (all pre-answered), Phase B (design + competitor alignment), Phase C (product details), Phase D (stories + edge cases). 6 stories generated (4 Must Have, 1 Must Have upgraded from Should Have, 1 Should Have) + 3 Guard Rails. |
| 1.1 | 2026-06-19 | Claude | §9.2 | FORMAT | Reformatted user stories for readability: test coverage matrices moved from separate ### blocks into inline table rows directly under each respective story. Story cell layout updated to follow screenshot format (cleaner separation of Story / Importance / Notes / AC). Content unchanged. |
| 1.2 | 2026-06-30 | Claude | §PHASE CONTEXT, §5, §6, §8, §9.1, §9.2, §11, §12, §13, §14, §15, §16 | SCOPE | CRM/Omnichannel ownership realignment. Omnichannel scope reduced to: (1) Deal & Ticket section/tab container; (2) feature flag. CRM scope expanded to include: (7) dedicated APIs for creation and deletion events to Omnichannel; (8) real-time refresh of CRM embedded component; (9) all preview, navigation, and UI within the section. Not in scope for Omnichannel: any Deal/Ticket UI, display component, preview card, form, validation, permissions, or business logic. Dependencies updated: "Deal/Ticket preview component" and "Deal/Ticket detail navigation" both moved from Omnichannel Frontend to CRM Frontend. New decision recorded in §15a. New open question added (§16 Q9: embedded component integration mechanism). |