Series: Building Quorentra CRM from Zero — A Modular, ChatGPT-Native AI CRM
Building conversational meeting scheduling with participants, dates, agendas, CRM relationships, conflict detection, confirmation, cancellation, completion, and follow-up workflows.

1. Introduction
Quorentra now has five important CRM primitives:
CompanyContactOpportunityActivityTask
Together, these answer several fundamental CRM questions.
Company→ Who are we doing business with?Contact→ Who are we talking to?Opportunity→ What are we trying to sell?Activity→ What happened?Task→ What needs to happen next?
In Part 23, we introduced conversational Task management.
A user can now say:
Remind me to call Sarah Johnson at Adventure Works Friday about the revised Azure migration pricing.
Quorentra can transform that request into a governed Task associated with the correct Company, Contact, and Opportunity.
But not every future action is a Task.
Consider:
Schedule a meeting with Sarah Johnson at Adventure Works next Tuesday at 2 PM to review the Azure migration proposal.
This contains significantly more structure.
We need:
MeetingStart TimeEnd TimeDurationParticipantsOrganizerCompanyOpportunityAgendaStatus
Trying to represent all of this as a generic Task would weaken the domain model.
Therefore Part 24 introduces a dedicated:
Meeting Management module
The goal is not yet to integrate Outlook, Google Calendar, Teams, Zoom, or Google Meet.
Instead, we first build Quorentra’s authoritative internal Meeting domain.
External calendar platforms can be added later as adapters.
2. Our Target Interaction
The user says:
Schedule a meeting with Sarah Johnson at Adventure Works next Tuesday at 2 PM to review the Azure migration proposal.
ChatGPT identifies:
Intent:Schedule MeetingParticipant:Sarah JohnsonCompany:Adventure WorksOpportunity:Azure MigrationDate:Next TuesdayTime:14:00Agenda:Review the Azure migration proposal.
Quorentra resolves those references.
The user sees:
┌──────────────────────────────────────────────┐│ QUORENTRA ││ Schedule Meeting ││ ││ Azure Migration Proposal Review ││ ││ Tuesday, 11 August 2026 ││ 14:00 – 14:30 ││ ││ Participant ││ Sarah Johnson ││ Adventure Works ││ ││ Opportunity ││ Azure Migration ││ ││ Agenda ││ Review the Azure migration proposal. ││ ││ [Cancel] [Schedule Meeting] │└──────────────────────────────────────────────┘
Only after confirmation is the Meeting created.
3. Meeting Versus Task
This distinction is important.
A Task represents:
Something that needs to be done
A Meeting represents:
A scheduled interaction between participants
Compare:
Call Sarah Tuesday→ Task
with:
Meet Sarah Tuesday at 14:00→ Meeting
The second requires calendar-like semantics.
4. Meeting Versus Activity
We must also distinguish future Meetings from historical Meeting Activities.
Meeting next Tuesday→ MeetingMet Sarah yesterday→ Activity
This gives us a clear temporal model:
TIME
Past Future
│ │
▼ ▼
Activity Task / Meeting
A completed Meeting can later produce a Meeting Activity.
5. Why Meetings Need Their Own Domain
A Meeting has properties that generic Tasks do not naturally represent:
StartEndDurationParticipantsOrganizerLocationMeeting LinkAgendaMeeting Status
It also has lifecycle semantics.
For example:
Scheduled │ ├───────────────┐ ▼ ▼Completed Cancelled
That deserves a dedicated entity.
6. Keep the First Meeting Module Small
It is tempting to immediately implement:
Microsoft OutlookGoogle CalendarTeamsZoomGoogle MeetAutomatic InvitationsICS FilesMeeting RoomsRecurring MeetingsTranscriptionRecordingMeeting AI
Do not do that yet.
The MVP needs:
Create MeetingRead MeetingSearch MeetingsCancel MeetingComplete Meeting
That is enough to establish the domain.
7. Starting Checkpoint
Before implementing Part 24, verify Part 23.
Run:
cd backendpython -m pytest
Then:
cd ..\chatgpt-uinpm run build
Test:
Remind me to call Sarah Johnson at Adventure Works Friday about the revised Azure migration pricing.
Verify:
Task Draft ↓Entity Resolution ↓Date Resolution ↓Preparation ↓Confirmation ↓Task Creation ↓My Tasks
Part 24 will reuse much of this infrastructure.
8. Meeting Permissions
Introduce:
meetings.readmeetings.createmeetings.cancelmeetings.complete
Later we can add:
meetings.updatemeetings.reschedulemeetings.manage_participants
For the MVP, four permissions are enough.
9. Example Role Matrix
| Role | Read | Create | Cancel | Complete |
|---|---|---|---|---|
| Viewer | ✓ | — | — | — |
| Member | ✓ | ✓ | ✓ | ✓ |
| Manager | ✓ | ✓ | ✓ | ✓ |
| Admin | ✓ | ✓ | ✓ | ✓ |
| Owner | ✓ | ✓ | ✓ | ✓ |
Later cancellation rules can consider Meeting ownership.
10. Define Meeting Status
Start with:
class MeetingStatus(str, Enum): SCHEDULED = "scheduled" COMPLETED = "completed" CANCELLED = "cancelled"
Do not add unnecessary states yet.
11. Why These Three States?
They answer the essential lifecycle question.
Has not happened yet→ ScheduledHappened→ CompletedWill not happen→ Cancelled
Later we may introduce:
TentativeNo ShowRescheduled
if required.
12. Define the Meeting Domain
Our first Meeting model might contain:
idorganization_idtitleagendastart_atend_attimezonestatusorganizer_user_idcompany_idopportunity_idlocationmeeting_urlcreated_by_user_idcompleted_atcompleted_by_user_idcancelled_atcancelled_by_user_idversioncreated_atupdated_at
Participants deserve their own relationship.
13. Meeting Participants
A Meeting can have:
1 participant5 participants20 participants
Therefore do not add:
contact_id
directly to the Meeting table as the only participant.
Instead introduce:
MeetingParticipant
14. Meeting Participant Model
Conceptually:
MeetingParticipant├── id├── organization_id├── meeting_id├── contact_id├── user_id├── participant_type├── created_at└── updated_at
A participant may be:
External ContactInternal User
This allows Meetings to include both customer contacts and Quorentra users.
15. Participant Type
Introduce:
class MeetingParticipantType(str, Enum): CONTACT = "contact" USER = "user"
Later external guests who are not CRM Contacts could be supported.
For the MVP, require participants to resolve to known Contacts or organization Users.
16. Why Not Store Email Addresses Directly?
Suppose ChatGPT sends:
sarah.johnson@adventure-works.com
If Sarah already exists as a Contact, we should link:
contact_id
rather than create a disconnected email string.
This preserves CRM relationships.
17. Minimum Meeting Requirements
For creation, require:
titlestart_atend_atorganizer_user_idat least one participant
and at least one CRM relationship:
company_idORopportunity_idORparticipant contact relationship
Usually the Company can be derived from the Contact.
18. Agenda Is Optional
User:
Schedule a meeting with Sarah Tuesday at 2 PM.
That is enough.
We should not force the user to provide an agenda.
But when the user says:
to review the Azure migration proposal
store that as:
agenda
19. Location Is Optional
The Meeting might eventually be:
OfficeCustomer SitePhoneMicrosoft TeamsGoogle MeetZoom
But location should not be required for the MVP.
20. Meeting URL Is Optional
Similarly:
meeting_url
can remain null.
Later calendar or conferencing integrations can populate it.
21. Default Duration
User:
Schedule a meeting with Sarah Tuesday at 2 PM.
No duration is provided.
We need a deterministic default.
For the MVP:
DEFAULT_MEETING_DURATION =30 minutes
Therefore:
start_at =14:00end_at =14:30
22. Explicit Duration
User:
Schedule a one-hour meeting with Sarah Tuesday at 2 PM.
Resolve:
start_at =14:00end_at =15:00
Explicit user input overrides the default.
23. Explicit End Time
User:
Schedule Sarah from 2 PM to 3:30 PM Tuesday.
Resolve:
start_at =14:00end_at =15:30
Do not also apply the default duration.
24. Validate Meeting Time
Require:
end_at > start_at
Reject:
start_at =15:00end_at =14:00
with a structured validation error.
25. Timezone Strategy
As with Activities and Tasks:
User input ↓Local timezone ↓Resolved timestamp ↓UTC storage
Example:
User timezone:Europe/AmsterdamMeeting:11 August 202614:00Stored:UTC equivalent
Display remains localized.
26. Never Store “Next Tuesday”
The Meeting must persist:
start_at =authoritative timestamp
not:
start_at ="next Tuesday"
Relative expressions are temporary conversational inputs.
27. Define Field Ownership
| Field | Source |
|---|---|
id | System |
organization_id | TenantContext |
title | User / conservative derivation |
agenda | User |
start_at | Server-resolved |
end_at | Server-resolved |
timezone | User/org context |
status | System |
organizer_user_id | Server-resolved |
company_id | Entity resolution |
opportunity_id | Entity resolution |
location | User |
meeting_url | User/integration |
created_by_user_id | Authentication |
version | System |
Again, ChatGPT does not own authoritative identity.
28. Organizer
For:
Schedule a meeting with Sarah Tuesday.
default:
organizer_user_id =current authenticated user
This is the simplest useful policy.
29. Explicit Organizer
Later:
Schedule a meeting for Michael with Sarah Tuesday.
can resolve:
Michael ↓Organization Membership ↓organizer_user_id
But the organizer must belong to the active tenant.
30. Never Accept Organizer IDs from ChatGPT
ChatGPT may provide:
organizer_reference ="Michael"
but not:
organizer_user_id =UUID(...)
The server resolves authoritative IDs.
31. Introduce MeetingDraft
Reuse our draft architecture.
Conceptually:
MeetingDraft├── id├── organization_id├── user_id│├── title├── agenda│├── start_expression├── duration_minutes├── end_expression├── start_at├── end_at├── timezone│├── organizer_reference├── organizer_user_id│├── company_reference├── company_id│├── opportunity_reference├── opportunity_id│├── participant_references├── resolved_participants│├── location├── meeting_url│├── status├── field_sources├── dependency_status├── workflow_id├── expires_at├── created_at└── updated_at
Again:
MeetingDraft ≠ Meeting
32. Why Use a Draft?
User:
Schedule a meeting with Sarah next week about the Azure migration.
We know:
Participant:SarahOpportunity:Azure MigrationTopic:Azure migration
But:
Which Sarah?Which day?What time?
may still be unresolved.
The MeetingDraft preserves partial intent.
33. Meeting Draft Status
Reuse:
incompletecompletepreparedcancelledexpiredconverted
No new draft lifecycle is necessary.
34. Create Meeting Draft Tool
Introduce:
create_meeting_draft
Conceptually:
class CreateMeetingDraftInput(BaseModel): title: str | None = None agenda: str | None = None start_expression: str | None = None end_expression: str | None = None duration_minutes: int | None = None organizer_reference: str | None = None participant_references: list[str] = [] company_reference: str | None = None opportunity_reference: str | None = None location: str | None = None meeting_url: str | None = None
35. What the Tool Does Not Accept
It does not accept authoritative:
organization_idorganizer_user_idcompany_idopportunity_idcontact_idsuser_idsstatusversion
Those belong to Quorentra.
36. Draft Creation Flow
Receive Explicit Facts ↓Interpret Meeting Intent ↓Resolve Date and Time ↓Resolve Duration ↓Resolve Organizer ↓Resolve Company ↓Resolve Opportunity ↓Resolve Participants ↓Cross-Validate Relationships ↓Check Required Fields ↓Check Scheduling Conflicts ↓Create MeetingDraft ↓Return Structured Result
No Meeting is created yet.
37. Participant Resolution
User:
Schedule a meeting with Sarah Johnson at Adventure Works.
Resolve Company first:
Adventure Works ↓company_id
Then:
Sarah JohnsonWHERE company_id = AdventureWorks.id
This is the same scoped resolution pattern used in Activities and Tasks.
38. Multiple Participants
User:
Schedule a meeting with Sarah Johnson and Lisa Chen at Adventure Works Tuesday at 2 PM.
Resolve:
Adventure Works ↓Sarah JohnsonLisa Chen
Both become MeetingParticipants.
39. Internal Participants
User:
Schedule a meeting with Sarah and Michael Tuesday.
If Michael is an internal organization User:
Sarah→ CONTACTMichael→ USER
The Meeting can contain both.
40. Ambiguous Participants
Suppose there are two Sarah Johnsons.
Do not choose one.
Return:
PARTICIPANT_AMBIGUOUS
with candidate information sufficient for clarification.
41. Missing Participant
If:
Sarah Johnson
cannot be found, do not silently create a new Contact.
Instead return:
CONTACT_NOT_FOUND
Later workflow composition can offer:
Sarah Johnson does not exist yet. Would you like to create her first?
That uses our existing Contact creation workflow.
42. Dependency Workflow
The flow becomes:
Schedule Meeting ↓Resolve Sarah ↓Contact Missing ↓Create Contact ↓Resume Meeting Draft ↓Schedule Meeting
This is another example of modular workflow composition.
43. Company Derivation
If Sarah uniquely belongs to Adventure Works:
Sarah Johnson ↓Adventure Works
then:
company_id
can be derived.
Do not ask the user for the Company unnecessarily.
44. Opportunity Resolution
User:
Meet Sarah Tuesday about the Azure migration.
Once Sarah resolves to Adventure Works, search:
Azure MigrationWHERE company_id = AdventureWorks.id
This produces a coherent CRM graph.
45. Relationship Conflict
Suppose:
Sarah Johnson→ Adventure WorksContoso Renewal→ Contoso
The user references both in one Meeting.
Return:
ENTITY_RELATIONSHIP_CONFLICT
Do not schedule the Meeting.
46. Meeting Title
User:
Schedule a meeting with Sarah Tuesday to review the Azure migration proposal.
A conservative title might be:
Azure Migration Proposal Review
or:
Meeting with Sarah Johnson
depending on available explicit context.
47. Do Not Over-Generate Meeting Titles
Avoid:
Strategic Executive Azure Cloud TransformationCommercial Alignment Workshop
unless the user actually provided those concepts.
Meeting titles should be concise and grounded.
48. Agenda Extraction
User:
…to review the Azure migration proposal.
Store:
agenda =Review the Azure migration proposal.
Do not expand this into an invented agenda containing:
Budget reviewArchitecture decisionsMigration timelineRisk analysisProcurement
unless supplied.
49. Field Provenance
Example:
{ "field_sources": { "title": "model_structured_from_user", "agenda": "user", "start_at": "server_resolved_relative_time", "end_at": "server_default_duration", "timezone": "user_context", "organizer_user_id": "server_current_user", "company_id": "server_entity_resolution", "opportunity_id": "server_entity_resolution", "participants": "server_entity_resolution" }}
This gives us traceability.
50. Missing Fields
User:
Schedule a meeting with Sarah.
Known:
Participant:Sarah
Missing:
DateTime
Potentially also participant identity if Sarah is ambiguous.
Return structured missing-field information.
51. Multi-Turn Completion
ChatGPT asks:
When should the meeting happen?
User:
Tuesday at 2 PM.
The draft is updated.
If Sarah is still ambiguous:
Which Sarah do you mean?
Once all required information is resolved, the draft becomes complete.
52. One-Shot Completion
User:
Schedule a meeting with Sarah Johnson at Adventure Works next Tuesday at 2 PM to review the Azure migration proposal.
Everything required is available.
Do not ask unnecessary questions.
Proceed to conflict detection and preparation.
53. Meeting Conflict Detection
Before scheduling, check whether the organizer already has another active Meeting during:
start_at→end_at
For the MVP, organizer conflicts are sufficient.
54. Overlap Rule
Two scheduled Meetings overlap when:
existing.start_at < proposed.end_atANDexisting.end_at > proposed.start_at
This standard interval-overlap rule catches partial and complete overlaps.
55. Example Conflict
Existing:
Tuesday14:00 – 15:00Contoso Review
Proposed:
Tuesday14:30 – 15:00Adventure Works
Conflict:
true
56. Conflict Result
Return something like:
{ "code": "MEETING_TIME_CONFLICT", "conflicts": [ { "title": "Contoso Review", "start_at": "...", "end_at": "..." } ]}
ChatGPT can explain the conflict.
57. Do Not Automatically Move the Meeting
Never silently decide:
14:00 unavailable→ schedule at 15:00
That changes user intent.
Instead ask whether the user wants a different time.
58. Participant Conflict Detection
Longer-term, we can also check internal participant calendars.
For the MVP:
Organizer conflict detection
is sufficient.
External Contact availability is generally unknown without calendar integrations.
59. Conflict Detection Is Not Calendar Free/Busy
At this stage, Quorentra only knows Meetings stored inside Quorentra.
It does not yet know:
Outlook calendarGoogle CalendarPersonal appointmentsExternal meetings
Be explicit about this boundary.
60. Update Meeting Draft
Introduce:
update_meeting_draft
Conceptually:
class UpdateMeetingDraftInput(BaseModel): draft_id: UUID title: str | None = None agenda: str | None = None start_expression: str | None = None end_expression: str | None = None duration_minutes: int | None = None organizer_reference: str | None = None participant_references: list[str] | None = None company_reference: str | None = None opportunity_reference: str | None = None location: str | None = None meeting_url: str | None = None
Updates rerun relevant resolution and conflict detection.
61. Correcting the Time
User:
Actually make it 3 PM.
Update:
start_atend_at
and rerun:
Conflict Detection
If a prepared MutationRequest already exists, invalidate it.
62. Correcting Participants
User:
Add Lisa Chen too.
Update participant references.
Resolve Lisa.
Revalidate Company relationships.
Reprepare before creation.
63. Prepare Meeting Creation
Introduce:
prepare_meeting_creation
Input:
{ "draft_id": "..."}
64. Preparation Flow
Load MeetingDraft ↓Verify Tenant ↓Verify User ↓Verify meetings.create ↓Verify Draft Not Expired ↓Revalidate Organizer ↓Revalidate Participants ↓Revalidate Company ↓Revalidate Opportunity ↓Revalidate Relationships ↓Revalidate Date/Time ↓Check Conflicts Again ↓Create MutationRequest ↓Mark Draft Prepared ↓Return Confirmation
Still:
0 Meeting rows created
65. Mutation Type
Use:
mutation_type =meeting.create
Example proposed values:
{ "title": "Azure Migration Proposal Review", "agenda": "Review the Azure migration proposal.", "start_at": "2026-08-11T12:00:00Z", "end_at": "2026-08-11T12:30:00Z", "timezone": "Europe/Amsterdam", "organizer_user_id": "...", "company_id": "...", "opportunity_id": "...", "participants": [ { "type": "contact", "id": "..." } ]}
66. Meeting Confirmation Widget
Create:
chatgpt-ui/src/meetings/└── MeetingCreationConfirmation.tsx
Render:
┌──────────────────────────────────────────────┐│ QUORENTRA ││ Schedule Meeting ││ ││ Azure Migration Proposal Review ││ ││ Tuesday, 11 August 2026 ││ 14:00 – 14:30 ││ ││ Participants ││ Sarah Johnson ││ ││ Company ││ Adventure Works ││ ││ Opportunity ││ Azure Migration ││ ││ Agenda ││ Review the Azure migration proposal. ││ ││ [Cancel] [Schedule Meeting] │└──────────────────────────────────────────────┘
67. Show Resolved Absolute Time
The user said:
next Tuesday at 2 PM
The widget shows:
Tuesday, 11 August 202614:00
This lets the user confirm the actual interpretation.
68. Show Timezone When Useful
For distributed teams, show:
14:00 Europe/Amsterdam
or a localized equivalent.
Timezone ambiguity can cause serious scheduling errors.
69. Show Participants
Every resolved participant should be visible before creation.
For example:
ParticipantsSarah JohnsonIT Director · Adventure WorksLisa ChenProcurement Manager · Adventure Works
This allows resolution errors to be caught.
70. Execute Meeting Creation
Introduce:
create_meeting
Input:
{ "mutation_request_id": "..."}
Again, execution accepts no arbitrary Meeting fields.
71. Execution Flow
Load MutationRequest ↓Verify Tenant ↓Verify User ↓Verify meetings.create ↓Verify Pending ↓Verify Not Expired ↓Load MeetingDraft ↓Verify Draft Matches ↓Revalidate Organizer ↓Revalidate Participants ↓Revalidate CRM Relationships ↓Revalidate Time ↓Check Conflict Again ↓Create Meeting ↓Create MeetingParticipants ↓Create AuditEvent ↓Mark Mutation Executed ↓Mark MeetingDraft Converted ↓Commit
72. Why Check Conflicts Again?
Because another Meeting may have been scheduled between:
Prepare
and:
Execute
The execution step must operate on current state.
73. Transaction Boundary
Use:
BEGINcreate Meetingcreate MeetingParticipantscreate AuditEventmark MutationRequest executedmark MeetingDraft convertedCOMMIT
On failure:
ROLLBACK
74. Initial Meeting State
New Meeting:
status =scheduledversion =1completed_at =NULLcancelled_at =NULL
75. Meeting Audit Event
Use:
action =meeting.created
Store appropriate metadata:
organization_idactor_user_idmeeting_idnew_valuesmutation_request_idworkflow_idinvocation_sourcecreated_at
76. Authoritative Result
After successful commit:
{ "success": true, "meeting": { "id": "...", "title": "Azure Migration Proposal Review", "status": "scheduled", "start_at": "...", "end_at": "...", "timezone": "Europe/Amsterdam", "participants": [ { "type": "contact", "name": "Sarah Johnson" } ], "company": { "id": "...", "name": "Adventure Works" }, "opportunity": { "id": "...", "name": "Azure Migration" }, "agenda": "Review the Azure migration proposal.", "version": 1 }}
Only now can ChatGPT say:
The meeting has been scheduled.
77. Meeting Success Widget
┌──────────────────────────────────────────────┐│ QUORENTRA ││ Meeting Scheduled ││ ││ Azure Migration Proposal Review ││ ││ Tue, 11 Aug ││ 14:00 – 14:30 ││ ││ Sarah Johnson ││ Adventure Works ││ ││ [View Meeting] [Upcoming Meetings] │└──────────────────────────────────────────────┘
78. Read Meeting
Introduce:
get_meeting
This returns authoritative Meeting details.
It supports:
Show me the meeting with Sarah next Tuesday.
Search first if needed, then retrieve the resolved Meeting.
79. Search Meetings
Introduce:
search_meetings
Useful filters:
statusorganizerparticipantcompany_referenceopportunity_referencestart_fromstart_tolimit
80. Upcoming Meetings
User:
What meetings do I have coming up?
Query:
organization_id =active tenantorganizer_user_id =current userstatus =scheduledstart_at >= now
Order:
start_at ASC
81. Today’s Meetings
User:
What meetings do I have today?
Use the user’s local timezone to calculate today’s boundaries.
Do not use UTC calendar dates directly.
82. Example Meeting List
TODAY10:00 – 10:30Contoso Renewal ReviewContoso14:00 – 14:30Azure Migration Proposal ReviewAdventure WorksSarah Johnson
83. Company Meetings
User:
What meetings are scheduled with Adventure Works?
Resolve Company and query scheduled Meetings.
This creates another useful Company view.
84. Contact Meetings
User:
When am I meeting Sarah Johnson?
Resolve the Contact.
Query MeetingParticipant relationships.
Return future scheduled Meetings.
85. Opportunity Meetings
User:
What meetings are scheduled for the Azure Migration opportunity?
Resolve Opportunity and query Meetings.
This helps sales users understand upcoming deal interactions.
86. Meeting List Widget
Create:
chatgpt-ui/src/meetings/├── MeetingList.tsx├── MeetingCard.tsx├── MeetingDetail.tsx├── MeetingCreationConfirmation.tsx├── MeetingCancellationConfirmation.tsx└── MeetingCompletionConfirmation.tsx
87. Meeting Card
Example:
┌────────────────────────────────────────────┐│ Azure Migration Proposal Review ││ ││ Tue 11 Aug ││ 14:00 – 14:30 ││ ││ Sarah Johnson ││ Adventure Works ││ ││ Scheduled │└────────────────────────────────────────────┘
88. Meeting Detail
Meeting detail might show:
Azure Migration Proposal ReviewTuesday, 11 August 202614:00 – 14:30OrganizerBenParticipantsSarah JohnsonCompanyAdventure WorksOpportunityAzure MigrationAgendaReview the Azure migration proposal.StatusScheduled
89. Cancelling a Meeting
User:
Cancel the meeting with Sarah next Tuesday.
This changes authoritative state.
Therefore cancellation follows the governed mutation pattern.
90. Resolve Meeting
Search by:
participantdatecompanyopportunitystatus = scheduled
If one Meeting matches strongly, resolve it.
If multiple Meetings match, require clarification.
91. Prepare Meeting Cancellation
Introduce:
prepare_meeting_cancellation
Input:
{ "meeting_id": "...", "expected_version": 1}
The server checks:
TenantPermissionStatusVersion
92. Cancellation Confirmation
┌──────────────────────────────────────────────┐│ QUORENTRA ││ Cancel Meeting ││ ││ Azure Migration Proposal Review ││ ││ Tuesday, 11 August 2026 ││ 14:00 – 14:30 ││ ││ Sarah Johnson ││ Adventure Works ││ ││ Cancel this meeting? ││ ││ [Keep Meeting] [Cancel Meeting] │└──────────────────────────────────────────────┘
93. Execute Cancellation
Introduce:
cancel_meeting
Input:
{ "mutation_request_id": "..."}
Execution:
Load MutationRequest ↓Verify Tenant ↓Verify Permission ↓Verify Expected Version ↓Verify Meeting Scheduled ↓Set CANCELLED ↓Set cancelled_at ↓Set cancelled_by_user_id ↓Increment Version ↓Create AuditEvent ↓Execute MutationRequest ↓Commit
94. Cancelled Meeting State
After cancellation:
status =cancelledcancelled_at =server timestampcancelled_by_user_id =authenticated userversion =2
95. Cancellation Audit Event
Use:
action =meeting.cancelled
Cancellation does not delete the Meeting.
That is important.
The historical scheduling record remains available.
96. Why Not Delete Cancelled Meetings?
Deleting would remove useful history:
Meeting was scheduledMeeting was cancelledWho cancelled itWhen it was cancelled
A CRM should generally preserve that evidence.
97. Completing a Meeting
After the Meeting occurs, the user might say:
Mark the Sarah meeting complete.
This moves:
scheduled ↓completed
Again, use a governed mutation.
98. Prepare Meeting Completion
Introduce:
prepare_meeting_completion
Input:
{ "meeting_id": "...", "expected_version": 1}
99. Completion Confirmation
┌──────────────────────────────────────────────┐│ QUORENTRA ││ Complete Meeting ││ ││ Azure Migration Proposal Review ││ ││ Sarah Johnson ││ Adventure Works ││ ││ Mark this meeting as completed? ││ ││ [Cancel] [Complete Meeting] │└──────────────────────────────────────────────┘
100. Execute Meeting Completion
Introduce:
complete_meeting
Execution:
Load MutationRequest ↓Verify Tenant ↓Verify Permission ↓Verify Version ↓Verify Meeting Scheduled ↓Set COMPLETED ↓Set completed_at ↓Set completed_by_user_id ↓Increment Version ↓Create AuditEvent ↓Execute MutationRequest ↓Commit
101. Meeting Completion Audit Event
Use:
action =meeting.completed
102. Completion Does Not Automatically Create an Activity
This is the same principle we used for Tasks.
Marking a Meeting completed tells us:
The Meeting happened
but not:
What was discussed?What was decided?What did the customer say?
Therefore do not automatically invent a Meeting Activity summary.
103. Conversational Meeting Outcome
Instead, the user can say:
The meeting with Sarah is finished. She approved the technical approach but wants revised pricing by Friday.
This contains several operations.
104. Decompose the Intent
"The meeting is finished." ↓Complete Meeting"She approved the technical approachbut wants revised pricing." ↓Create Meeting Activity"by Friday" ↓Create Follow-Up Task
Now our existing modules can be composed.
105. Composed Workflow
User │ ▼ChatGPT │ ▼Workflow │ ├── Complete Meeting │ ├── Record Meeting Activity │ └── Create Follow-Up Task
Each remains an independent domain operation.
106. Why This Architecture Matters
A monolithic CRM might implement:
finish_meeting_and_generate_followup()
But that couples:
MeetingsActivitiesTasks
too tightly.
Instead, Quorentra has reusable primitives:
meeting.completeactivity.createtask.create
ChatGPT can compose them according to conversational intent.
This is exactly what a modular, ChatGPT-native CRM should do.
107. Shared Workflow ID
All related mutations can share:
workflow_id
Example:
Workflow:Azure Migration Proposal Review├── meeting.completed├── activity.created└── task.created
This gives us end-to-end traceability.
108. Future Composite Confirmation
Later Quorentra could render:
┌──────────────────────────────────────────────┐│ Meeting Follow-Up ││ ││ This will: ││ ││ ✓ Complete Azure Migration Proposal Review ││ ││ ✓ Record meeting outcome ││ Technical approach approved. ││ Revised pricing requested. ││ ││ ✓ Create task ││ Send revised pricing ││ Due Friday ││ ││ [Cancel] [Confirm All] │└──────────────────────────────────────────────┘
But a general composite mutation framework is not required yet.
109. Meeting Draft Tests
Test:
create draftupdate draftcancel draftexpire draftconvert drafttenant isolationuser ownershipworkflow correlation
110. Status Tests
Verify:
new Meeting→ scheduledscheduled → completed✓scheduled → cancelled✓completed → cancelled✗cancelled → completed✗
The state machine must be explicit.
111. Date Resolution Tests
Use a fixed test clock.
Test:
tomorrow at 2 PMnext Tuesday at 14:0011 August at 2 PMTuesday from 2 to 3Tuesday at 2 for one hour
Verify exact timestamps.
112. Default Duration Test
Input:
Tuesday at 14:00
without duration.
Expected:
14:00 – 14:30
if the configured default is 30 minutes.
113. Explicit Duration Test
Input:
Tuesday at 14:00 for 60 minutes
Expected:
14:00 – 15:00
114. Invalid Time Test
Input:
start =15:00end =14:00
Expected:
INVALID_MEETING_TIME_RANGE
115. Timezone Tests
Test local resolution for:
Europe/AmsterdamAmerica/New_YorkAsia/Tokyo
especially around daylight-saving transitions.
116. Participant Resolution Tests
Test:
unique ContactCompany-scoped Contactmultiple Contactsmissing Contactinternal Userambiguous Usercross-tenant Contactcross-tenant User
117. Multiple Participant Test
Input:
Sarah JohnsonLisa ChenMichael Brown
Expected:
3 MeetingParticipant rows
with correct types.
118. Company Derivation Test
Input:
Sarah Johnson
Sarah belongs to Adventure Works.
Expected:
company_id =AdventureWorks.id
119. Opportunity Resolution Test
Input:
Sarah JohnsonAzure Migration
Expected Opportunity resolution scoped through Adventure Works where possible.
120. Relationship Conflict Test
Input references:
Sarah Johnson→ Adventure WorksContoso Renewal→ Contoso
Expected:
ENTITY_RELATIONSHIP_CONFLICT
No Meeting created.
121. Conflict Detection Tests
Existing:
14:00 – 15:00
Test proposed:
13:30 – 14:00→ no overlap13:30 – 14:30→ overlap14:00 – 14:30→ overlap14:30 – 15:30→ overlap15:00 – 15:30→ no overlap
Boundary behavior must be deterministic.
122. Cancelled Meetings Do Not Conflict
Existing Meeting:
status =cancelled14:00 – 15:00
Proposed:
14:00 – 14:30
Expected:
no conflict
123. Completed Historical Meetings Do Not Block Future Scheduling
Conflict detection should normally consider:
status =scheduled
not completed historical Meetings.
124. Missing Field Tests
Input:
Schedule a meeting with Sarah.
Expected missing:
start_at
assuming Sarah resolves and default duration is available.
125. One-Shot Workflow Test
User:
Schedule a meeting with Sarah Johnson at Adventure Works next Tuesday at 2 PM to review the Azure migration proposal.
Expected:
Participant resolvedCompany resolvedOpportunity resolvedStart resolvedEnd derivedOrganizer resolvedAgenda extractedDraft completeConflict check performedPreparation available
No unnecessary questions.
126. Multi-Turn Workflow Test
User:
Schedule a meeting with Sarah.
ChatGPT:
When should the meeting happen?
User:
Tuesday at 2.
Expected:
draft complete
assuming Sarah resolves uniquely.
127. Correction Test
User:
Actually make it 3 PM.
Expected:
start_at updatedend_at recalculatedconflict detection rerunold preparation invalidated
128. Participant Addition Test
User:
Add Lisa Chen too.
Expected:
Lisa resolvedparticipant set updatedrelationships revalidatedold preparation invalidated
129. Permission Tests
Viewer:
create_meeting_draft→ deniedprepare_meeting_creation→ deniedcreate_meeting→ denied
Authorized Member:
allowed
according to the role matrix.
130. Permission Change Test
Prepare Meeting.
Remove:
meetings.create
before execution.
Expected:
create_meeting→ denied
No Meeting created.
131. Creation Transaction Test
Successful creation atomically:
creates Meetingcreates MeetingParticipantscreates AuditEventexecutes MutationRequestconverts MeetingDraft
132. Creation Idempotency Test
Execute the same MutationRequest twice.
Expected:
1 Meetingcorrect participant count1 logical AuditEvent
133. Race Condition Conflict Test
User A prepares Meeting:
14:00 – 14:30
Before execution, another Meeting is created:
14:00 – 15:00
Execution must recheck conflicts.
Expected:
MEETING_TIME_CONFLICT
134. Cancellation Tests
Verify:
scheduled → cancelled✓completed → cancelled✗cancelled → cancelledhandled idempotently
135. Completion Tests
Verify:
scheduled → completed✓cancelled → completed✗completed → completedhandled safely
136. Optimistic Concurrency Tests
Prepare cancellation/completion with:
expected_version = 1
Change Meeting to:
version = 2
Attempt old mutation.
Expected:
VERSION_CONFLICT
137. Upcoming Meetings Query Test
Ensure results include only:
scheduledfuturecorrect tenantcorrect organizer
unless broader access is explicitly requested.
138. Today’s Meetings Test
Use timezone-aware local day boundaries.
Verify meetings around midnight are classified correctly.
139. Company Meeting Query Test
Adventure Works Meetings appear only under Adventure Works.
140. Contact Meeting Query Test
Meetings containing Sarah as MeetingParticipant appear in Sarah’s Meeting view.
141. Opportunity Meeting Query Test
Azure Migration Meetings appear in the Opportunity view.
142. Logging
Useful structured fields:
meeting_draft_idmeeting_idorganization_iduser_idorganizer_user_idparticipant_countworkflow_idmutation_request_idmutation_typeresultduration_ms
Avoid ordinary logs containing:
full agendacustomer discussion detailsparticipant personal data
unless necessary.
143. Metrics
Useful metrics include:
meeting_drafts_created_totalmeetings_created_totalmeetings_cancelled_totalmeetings_completed_totalmeeting_conflicts_totalmeeting_creation_failures_totalmeeting_confirmation_cancellations_total
144. Database Indexes
Useful indexes include:
organization_id, organizer_user_id, status, start_atorganization_id, company_id, status, start_atorganization_id, opportunity_id, status, start_atmeeting_id, contact_idmeeting_id, user_id
These support common Meeting queries.
145. Version Update
Part 24 introduces:
Meeting DomainMeeting ParticipantsMeeting DraftsMeeting SchedulingMeeting Conflict DetectionMeeting CancellationMeeting CompletionUpcoming Meeting Views
Update:
app/core/constants.py
from:
APP_VERSION = "0.10.0"
to:
APP_VERSION = "0.11.0"
146. Quorentra 0.11.0
Our modular MVP now looks like:
Platform├── FastAPI ✓├── PostgreSQL ✓├── SQLAlchemy ✓└── Alembic ✓Identity├── Organizations ✓├── Users ✓├── Memberships ✓├── Authentication ✓└── JWT ✓Security├── TenantContext ✓├── Tenant Isolation ✓├── RBAC ✓├── Read Permissions ✓├── Create Permissions ✓└── Update Permissions ✓CRM├── Companies ✓├── Contacts ✓├── Opportunities ✓├── Activities ✓├── Tasks ✓└── Meetings ✓Activities├── Calls ✓├── Emails ✓├── Meetings ✓└── Notes ✓Tasks├── Open Tasks ✓├── Due Dates ✓├── Priorities ✓├── Assignments ✓├── Overdue Detection ✓└── Completion ✓Meetings├── Scheduling ✓├── Participants ✓├── Organizer ✓├── Agenda ✓├── Duration ✓├── Conflict Detection ✓├── Cancellation ✓└── Completion ✓Sales├── Pipeline ✓├── Opportunity Stages ✓├── Probability ✓└── Weighted Pipeline ✓Interfaces├── REST ✓├── MCP ✓└── ChatGPT ✓ChatGPT UI├── Pipeline ✓├── Company Detail ✓├── Contact Detail ✓├── Opportunity Detail ✓├── Activity Timeline ✓├── Task List ✓├── Meeting List ✓├── Meeting Detail ✓├── Mutation Confirmation ✓├── Company Creation ✓├── Contact Creation ✓├── Opportunity Creation ✓├── Activity Creation ✓├── Task Creation ✓├── Task Completion ✓├── Meeting Creation ✓├── Meeting Cancellation ✓└── Meeting Completion ✓Mutation Governance├── Mutation Requests ✓├── Confirmation ✓├── Expiry ✓├── Cancellation ✓├── Idempotency ✓├── Transactions ✓├── Optimistic Concurrency ✓└── Audit Events ✓Conversational Operations├── Company Drafts ✓├── Contact Drafts ✓├── Opportunity Drafts ✓├── Activity Drafts ✓├── Task Drafts ✓├── Meeting Drafts ✓├── Entity Resolution ✓├── Participant Resolution ✓├── Member Resolution ✓├── Relative Time Resolution ✓├── Relationship Validation ✓├── Conflict Detection ✓├── Missing-Field Detection ✓├── Field Provenance ✓├── Multi-Turn Completion ✓└── Safe Execution ✓CRM Memory├── Company Timeline ✓├── Contact Timeline ✓├── Opportunity Timeline ✓└── Activity History ✓CRM Work Management├── My Tasks ✓├── Today's Tasks ✓├── Overdue Tasks ✓└── Follow-Ups ✓CRM Scheduling├── Upcoming Meetings ✓├── Today's Meetings ✓├── Company Meetings ✓├── Contact Meetings ✓└── Opportunity Meetings ✓Workflow Composition├── Company → Contact ✓├── Company → Opportunity ✓├── Contact → Activity ✓├── Opportunity → Activity ✓├── Company → Task ✓├── Contact → Task ✓├── Opportunity → Task ✓├── Contact → Meeting ✓├── Opportunity → Meeting ✓├── Workflow Correlation ✓└── Multi-Mutation Composition ◐ChatGPT CRM Operations├── Read Pipeline ✓├── Read Companies ✓├── Read Contacts ✓├── Read Opportunities ✓├── Read Activities ✓├── Read Tasks ✓├── Read Meetings ✓├── Create Company ✓├── Create Contact ✓├── Create Opportunity ✓├── Update Opportunity Stage ✓├── Record Activity ✓├── Create Task ✓├── Complete Task ✓├── Schedule Meeting ✓├── Cancel Meeting ✓└── Complete Meeting ✓External Calendar Integration -AI Intelligence -
147. Acceptance Criteria
Part 24 is complete when:
✓ Part 23 regression suite remains green✓ meetings.read exists✓ meetings.create exists✓ meetings.cancel exists✓ meetings.complete exists✓ permissions are rechecked at execution✓ Meeting model exists✓ MeetingParticipant model exists✓ migrations apply successfully✓ Meeting is tenant-scoped✓ MeetingParticipant is tenant-scoped✓ SCHEDULED exists✓ COMPLETED exists✓ CANCELLED exists✓ new Meetings start SCHEDULED✓ title is required✓ start_at is required✓ end_at is required✓ organizer is required✓ at least one participant is required✓ agenda is optional✓ location is optional✓ meeting_url is optional✓ end_at must be after start_at✓ default duration is deterministic✓ explicit duration overrides default✓ explicit end time overrides default duration✓ relative date resolution works✓ relative time resolution works✓ timezone handling works✓ UTC storage works✓ absolute resolved date/time is shown before confirmation✓ organizer defaults to current user✓ named organizer can resolve within tenant✓ cross-tenant organizer cannot resolve✓ ChatGPT cannot provide authoritative organizer ID✓ Contact participants resolve✓ internal User participants resolve✓ Company-scoped Contact resolution works✓ multiple participants work✓ ambiguous participant requires clarification✓ missing Contact does not silently create Contact✓ cross-tenant participants never resolve✓ Company can be derived from Contact✓ Opportunity resolution works✓ Opportunity can be Company-scoped✓ entity relationships are cross-validated✓ relationship conflicts are rejected✓ MeetingDraft exists✓ MeetingDraft is tenant-scoped✓ MeetingDraft is user-scoped✓ MeetingDraft supports expiry✓ MeetingDraft supports cancellation✓ MeetingDraft supports conversion✓ MeetingDraft supports workflow_id✓ create_meeting_draft exists✓ update_meeting_draft exists✓ draft tools create no Meeting✓ missing-field detection works✓ multi-turn completion works✓ complete one-shot requests do not trigger unnecessary questions✓ corrections update draft✓ corrections invalidate old preparation✓ organizer conflict detection exists✓ overlap rule is correct✓ cancelled Meetings do not conflict✓ conflict detection runs before preparation✓ conflict detection runs again during execution✓ Quorentra does not silently move conflicting Meetings✓ prepare_meeting_creation exists✓ preparation creates no Meeting✓ meeting.create MutationRequest exists✓ confirmation expiry works✓ Meeting creation confirmation widget exists✓ title is visible✓ absolute date is visible✓ start/end time is visible✓ timezone is visible when appropriate✓ participants are visible✓ Company is visible✓ Opportunity is visible when present✓ agenda is visible when present✓ Cancel creates no Meeting✓ create_meeting accepts mutation_request_id only✓ execution rechecks tenant✓ execution rechecks user✓ execution rechecks permission✓ execution rechecks participants✓ execution rechecks relationships✓ execution rechecks conflicts✓ Meeting creation is transactional✓ MeetingParticipants are transactional✓ AuditEvent is transactional✓ MutationRequest becomes executed✓ MeetingDraft becomes converted✓ duplicate Meeting creation execution is idempotent✓ failed Meeting transaction rolls back✓ get_meeting exists✓ search_meetings exists✓ Upcoming Meetings query works✓ Today's Meetings query works✓ Company Meetings query works✓ Contact Meetings query works✓ Opportunity Meetings query works✓ Meeting queries are tenant-scoped✓ Meeting lists are bounded and paginated✓ prepare_meeting_cancellation exists✓ cancellation requires confirmation✓ cancel_meeting is transactional✓ cancellation sets CANCELLED✓ cancelled_at is set✓ cancelled_by_user_id is set✓ version increments✓ meeting.cancelled AuditEvent exists✓ cancelled Meeting is not deleted✓ prepare_meeting_completion exists✓ completion requires confirmation✓ complete_meeting is transactional✓ completion sets COMPLETED✓ completed_at is set✓ completed_by_user_id is set✓ version increments✓ meeting.completed AuditEvent exists✓ optimistic concurrency protects cancellation✓ optimistic concurrency protects completion✓ invalid state transitions are rejected✓ completing a Meeting does not invent an Activity✓ architecture supports Meeting → Activity composition✓ architecture supports Meeting → Task composition✓ related operations can share workflow_id✓ operational logging minimizes CRM content✓ Meeting metrics exist✓ Quorentra reports version 0.11.0
Most importantly:
A user can now describe a future customer meeting naturally, allow Quorentra to resolve its participants, CRM context, date, time, duration, and organizer, check for scheduling conflicts, review the exact structured Meeting, explicitly confirm it, and manage that Meeting through cancellation or completion.
148. What We Have Achieved
Quorentra can now understand:
Schedule a meeting with Sarah Johnson at Adventure Works next Tuesday at 2 PM to review the Azure migration proposal.
and transform it into:
Natural Language ↓Meeting Intent ↓Resolve Sarah Johnson ↓Resolve Adventure Works ↓Resolve Azure Migration ↓Resolve Next Tuesday ↓Resolve 14:00 ↓Apply Duration ↓Resolve Organizer ↓Check Conflicts ↓Meeting Draft ↓Prepare ↓Confirmation ↓Create Meeting ↓Audit ↓Upcoming Meetings
This is another substantial step toward the MVP.
149. Quorentra’s Temporal Model
We can now model customer work across time more clearly:
TIME
PAST FUTURE
│ │
▼ ▼
Activity ┌───────┴───────┐
│ │
▼ ▼
Task Meeting
Something to do Interaction to attend
This separation matters.
150. The Customer Workspace Is Becoming Complete
Adventure Works can now have:
Adventure Works│├── Contacts│ ├── Sarah Johnson│ └── Lisa Chen│├── Opportunities│ └── Azure Migration│├── Recent Activity│ ├── Call│ ├── Email│ └── Meeting│├── Open Tasks│ ├── Send revised pricing│ └── Prepare architecture diagram│└── Upcoming Meetings └── Azure Migration Proposal Review
This is beginning to provide a coherent operational view of the customer relationship.
151. ChatGPT Can Now Answer a Better Morning Question
The user can ask:
What do I have today?
Quorentra can retrieve:
Today's Tasks+Today's Meetings
and ChatGPT can present a unified daily work view.
For example:
TODAY09:00Send Contoso proposal11:00Review Fabrikam pricing14:00Meeting with Sarah JohnsonAdventure WorksAzure Migration16:00Follow up with Northwind
That is much closer to a practical daily CRM assistant.
152. But We Should Not Build AI Intelligence Yet
At this point it may be tempting to jump immediately to:
Opportunity risk scoringNext-best-actionAI summariesAutomatic follow-upsPredictive salesDeal recommendations
But one important capability is still missing from the operational MVP:
Unified CRM search and contextual retrieval.
We now have multiple modules:
CompaniesContactsOpportunitiesActivitiesTasksMeetings
ChatGPT needs a reliable way to retrieve relevant records across them.
153. The Problem with Separate Search Tools
Today we could expose:
search_companiessearch_contactssearch_opportunitiessearch_activitiessearch_taskssearch_meetings
That works.
But consider:
What is happening with Adventure Works?
Answering this may require:
CompanyContactsOpen OpportunitiesRecent ActivitiesOpen TasksUpcoming Meetings
The model should not need to improvise six unrelated queries every time.
154. Introduce the CRM Context Concept
What ChatGPT often needs is not one record.
It needs a bounded:
CRM Context Package
For example:
Adventure Works Context│├── Company│├── Key Contacts│├── Open Opportunities│├── Recent Activities│├── Open Tasks└── Upcoming Meetings
This becomes a much better foundation for grounded AI interaction.
155. Context Must Remain Server-Owned
We should not simply:
dump entire customer database ↓ChatGPT
Instead:
User Intent ↓Resolve Entity ↓Server-Side Context Builder ↓Permission Filtering ↓Tenant Filtering ↓Recency Filtering ↓Result Limits ↓Structured Context Package ↓ChatGPT
This keeps context:
RelevantBoundedAuthorizedTraceable
156. Why Context Retrieval Comes Before AI Intelligence
Future questions such as:
What should I do next with Adventure Works?
depend on evidence.
That evidence includes:
Opportunity stateRecent conversationsOpen TasksUpcoming MeetingsContacts
Before building sophisticated AI reasoning, we need a reliable mechanism for assembling that evidence.
157. Next Article
Building the CRM Context Layer for ChatGPT — Unified Search, Entity Resolution, and Customer Context Retrieval
We will introduce:
crm.searchcrm.context.readUnified CRM SearchSearch Result Types├── Company├── Contact├── Opportunity├── Activity├── Task└── MeetingCRM Context BuilderCompany Context├── Company├── Contacts├── Opportunities├── Activities├── Tasks└── MeetingsContact Context├── Contact├── Company├── Opportunities├── Activities├── Tasks└── MeetingsOpportunity Context├── Opportunity├── Company├── Contacts├── Activities├── Tasks└── MeetingsPermission-Aware RetrievalTenant-Aware RetrievalResult RankingRecency WindowsResult LimitsContext BudgetsStructured Context PackagesContext ProvenanceChatGPT Context WidgetsGrounded CRM Answers
Our target interaction will be:
User:"What's happening with Adventure Works?"
Instead of improvising, ChatGPT will request:
get_crm_context( entity = "Adventure Works")
Quorentra will resolve the Company and construct:
CRM Context│├── Adventure Works│├── Sarah Johnson│├── Lisa Chen│├── Azure Migration — €90,000│├── Recent Activities│ ├── Customer requested revised pricing│ └── Architecture workshop completed│├── Open Tasks│ └── Send revised proposal Friday│└── Upcoming Meetings └── Proposal Review Tuesday
ChatGPT can then answer:
Adventure Works has one active €90,000 Azure Migration opportunity. Sarah Johnson recently requested revised pricing, and you have a follow-up task to send the revised proposal by Friday. A proposal review meeting is also scheduled for Tuesday.
The key architectural property is that every statement can be grounded in authoritative Quorentra data.
That will move us from:
ChatGPT as conversational CRM interface
toward:
ChatGPT +Structured CRM Context +Grounded Reasoning
And that is the foundation we need before introducing genuine AI CRM intelligence into Quorentra — A Modular, ChatGPT-Native AI CRM.