Troubleshooting
Troubleshoot scheduling workflows — Contact and Engagement Platform
Diagnose scheduling workflow failures by tracing private meeting requests, sender-portal permissions, meeting status transitions, time-zone validation, Microsoft Teams links, and calendar synchronization. This developer troubleshooting guide provides reproducible diagnostics, controlled recovery procedures, and evidence-based verification of reminders, cancellations, and participant privacy.
Application: Contact and Engagement Platform
Component: Scheduling Workflows, Microsoft Teams & Calendar Coordination
Source-reviewed plugin: 2.0.2; workflow schema 1.3.0; calendar schema 1.0.1
Guide type: Technical troubleshooting and safe recovery
Verification status: Source reviewed; deployed configuration and end-to-end tests pending
Estimated reading time: 17–21 minutes
The platform uses review-first scheduling: a sender may request a meeting, but public intake does not expose the internal calendar or book an event automatically. Authorized staff create meeting offers, the sender responds within a protected portal, and final Teams or Graph coordination is a separate controlled step. Diagnose problems by identifying the first failed boundary among request, portal access, offer state, civil time, Teams link, reminder, or remote calendar synchronization. Do not replay operations until prior effects have been reconciled.
Goal
Restore a trustworthy meeting state while keeping internal availability, organizer and participant identities, links, credentials, and engagement notes private. The acceptance condition is that every offered or scheduled meeting is attached to the intended inquiry and authorized portal access; only an accepted time is finalized; calendar dates and time zones are unambiguous; reminders have attributable delivery evidence; and cancellation closes sender-visible links independently of the remote Graph event lifecycle.
Requirements
- Use an authorized staging installation and synthetic accounts for write-path, authorization, time-change, link-revocation, or Microsoft Graph tests. An administrator may perform read-only production diagnostics if approved.
- Capture the installed plugin build, deployed code hash, WordPress and PHP versions, calendar schema and migration state, configured tenant/mailbox scope, caching/CDN behavior, relevant cron health, and a private incident reference. Do not equate repository 2.0.2 with the deployed artifact.
- Use separate unauthorized, sender-portal, and staff test identities. For mutation tests, verify actual WordPress capabilities and nonce/confirmation requirements. Do not assume an administrator interface role implies every Graph capability.
- Keep inquiry narratives, participant addresses, Teams links, Graph tokens, raw error payloads, Graph event IDs, and stored URLs out of public tickets. Use synthetic object IDs and sanitized event types.
- Back up the relevant database and verify recovery before attempting any repair that changes meeting state, reminders, or remote events. The accompanying WP-CLI diagnostic is read-only and must remain outside the webroot.
Symptoms
| Observed symptom | First reliable check | Likely boundary |
|---|---|---|
| Meeting request received but no offer is visible | Private inquiry reference, portal access, meeting-offer state and expiry | Staff review, portal invitation or unpublished draft |
| Sender sees expired or contradictory times | Offer state, expires_at, slots_json, selected UTC interval and row_version |
Expired/superseded offer or concurrent update |
| Accepted slot is not scheduled | accepted_pending_link versus scheduled; Teams link readiness |
Human finalization or Graph join URL reconciliation |
| Time changes by one hour | IANA zone and local-to-UTC conversion; DST gap/overlap | Ambiguous civil-time input or client formatting |
| Two meeting records appear to exist | Offer IDs, published/superseded history, Graph transaction ID | Offer duplication or remote Graph retry |
| Reminder sent automatically or without a message record | Reminder status and linked outbound communication | Improper delivery state or unauthorized automation |
| Canceled meeting still has a join link | Local status, sender snapshot, cached projection and remote Graph state | Link revocation, cache, or separately pending remote cancellation |
| Sender sees organizer or participant information | Sender-projection keys and private-route HTTP status | Permission boundary or secondary data leak |
| Microsoft Graph operation keeps retrying | Queue status, request hash, transaction ID, Retry-After and error class | Authentication, permission, throttle or remote/local divergence |
| Reschedule appears saved but reminders are stale | Previous/new UTC times, reschedule count, reminder regeneration and rollback events | Partial compensating operation |
| Meeting marked complete but no follow-up exists | Lifecycle task, post-meeting notice and workflow event | Partial completion or notification failure |
Cause
Separate inquiry scheduling state (requested, under_review, times_proposed, scheduled and related labels) from the canonical meeting-offer state (draft, offered, accepted_pending_link, scheduled, completed, canceled, expired or superseded). These are not equivalent fields and can momentarily differ during multi-record updates. A private portal status and a Graph synchronization status form additional, independent dimensions.
The most common failure classes are: an invalid/expired portal invitation, a missing offer, an expired slot, a stale row_version, missing or malformed Teams link, ambiguous local time, a reminder without delivery evidence, a conditional calendar permission mismatch, an unprocessed Graph operation, or a stale sender-facing projection. The reviewed code supports these hypotheses; it does not prove that they have occurred in production.
Source-reviewed scheduling architecture
SC_EI_Workflow_Repository::create_meeting_offer() requires an existing, non-erased inquiry and active/invited sender-portal access. Draft offers are not automatically published; an authorized publish operation changes a draft to offered. The sender may accept an offered slot, request an alternative, or decline within the protected portal. Acceptance yields scheduled when a valid Teams URL is already present; otherwise it yields accepted_pending_link until human link finalization or a separately authorized Graph operation. There is no general anonymous calendar-availability or automatic public booking API in this source baseline.
Scheduling is implemented through WordPress admin action handlers and private portal workflows, with dedicated repositories for meeting offers, reminders and optional Microsoft Graph operations. The canonical meeting record remains local even when a remote Graph event exists. Graph event creation is human-triggered; the background worker processes previously authorized queued operations rather than discovering meetings to create by itself.
Object and state contract
| Record | Important source fields | Diagnostic invariant |
|---|---|---|
| Private inquiry | id, meeting_request, calendar_invite_consent, scheduling_status, privacy_status |
Record is not publicly readable; conditional authorizations checked before relevant invitations |
| Sender portal | Access ID, linked inquiry_id, invitation/session state |
An offer is published only after valid portal access is established for that inquiry |
| Meeting offer | offer_number, status, slots_json, selected_start_utc, selected_end_utc, timezone, row_version |
Legal transition, unambiguous interval and conflict-aware update |
| Coordination | teams_url, previous_start_utc, reschedule_count, join_url_revoked_at |
Scheduled link valid; reschedule history retained; closed links removed from sender projection |
| Meeting reminder | reminder_type, status, due_at, idempotency_key, communication_id |
Sent status requires reviewed outbound communication for the same inquiry |
| Graph operation | operation_type, status, idempotency_key, request_hash, attempt_count |
Created through authorized action, retries preserve operation identity, remote result reconciled |
Troubleshooting
- Determine which object is actually failing: inquiry request, meeting offer, portal session, staff operation, reminder, or Graph queue. Record the synthetic case ID and first unexpected status.
- Confirm deployed version and effective settings. Source fields alone cannot establish installed capabilities, Graph credentials or cache policy.
- Inspect the canonical meeting status before looking at the inquiry-level scheduling label. Reconcile offer expiration and superseded history; do not promote a draft to approved automatically.
- Verify portal access belongs to the same inquiry and that private-list/detail endpoints deny anonymous and low-privilege actors. Check CDN bypass, cache headers and alternate export paths separately.
- Check the selected UTC interval against local time and an IANA zone; reject an invalid, nonexistent or ambiguous civil time instead of applying a silent one-hour correction.
- For link issues, verify the approved Microsoft Teams host, the sender snapshot, and whether the local meeting is already closed. Do not expose the full link in diagnostic logs.
- For missed or premature reminders, inspect their eligibility, status and linked outbound communication. Background processing may mark records ready for review but must not send automatically.
- For Graph failures, reconcile the current remote event with the local transaction ID, operation status, request hash and time. Preserve idempotency keys on retry and never reset linkage speculatively.
- Compare historical workflow/audit evidence with the current row; record which side effects were completed, rolled back or remain unknown before changing anything.
Identify the failing transition
The reviewed meeting lifecycle uses these transitions, not a generic “pending / approved / published” taxonomy:
draft --staff publishes--> offered
offered --sender accepts a slot without link--> accepted_pending_link
offered --sender accepts with valid Teams link--> scheduled
accepted_pending_link --authorized Teams/Graph finalization--> scheduled
offered --sender requests alternative--> alternative_requested
offered --sender declines--> declined
offered --expires or replaced--> expired / superseded
scheduled --authorized completion--> completed
active meeting --authorized cancellation--> canceled
A meeting-offer write is guarded with row_version. A conflict means the stored record changed between reading and writing; do not forcibly overwrite it. Re-read the current offer, compare changed fields, confirm sender choice, then repeat only a safe authorized operation. Separate the accepted_pending_link state from a failed appointment: acceptance may be valid while Teams link creation is still outstanding.
Check capability and confirmation boundaries
Staff coordination, reschedule, completion and cancellation handlers require sc_intake_finalize_meetings and check a WordPress nonce. High-impact actions additionally require a typed phrase such as RESCHEDULE <OFFER-NUMBER>, COMPLETE <OFFER-NUMBER> or CANCEL <OFFER-NUMBER>. Marking a reminder sent requires sc_intake_send_communications. Graph create, reconcile and cancel have distinct capabilities: sc_intake_create_graph_events, sc_intake_reconcile_graph_events and sc_intake_cancel_graph_events. A nonce is not a substitute for a capability check.
Use different test identities: anonymous requester, authorized sender portal session, staff reviewer, and staff member without Graph permissions. Positive and negative results must be evaluated for each route that can access data, including exports, snapshots, caches, and redirects; absence of a public calendar widget is not sufficient proof that no private data leaks.
Diagnose local time and daylight-saving transitions
SC_EI_Teams::parse_local_datetime() accepts a supported local date and time plus an IANA zone. It rejects nonexistent spring-forward civil times and ambiguous repeated fall-back hours. These are deliberate failures, not defects to bypass. For example, 2027-03-14 02:30 does not exist in America/Chicago, and 2027-11-07 01:30 occurs twice. A valid 2027-07-15 10:30 America/Chicago corresponds to 2027-07-15 15:30:00 UTC.
# Offline fixture examples (no WordPress writes).
cd scheduling_workflows_troubleshooting
python3 -m unittest discover -s tests -v
python3 tools/check_schedule_case.py fixtures/valid.json
python3 tools/check_schedule_case.py fixtures/invalid.json || test "$?" -eq 2
Compare the selected start and end in UTC, the sender’s intended local time, stored IANA time zone, and the sender-facing formatted date. Treat conversion mismatches as investigation findings. In staging, test both DST transitions, leap days, alternate time zones and a date crossing midnight after conversion.
Diagnose Microsoft Teams URL failures
Source-accepted Teams hosts include teams.microsoft.com, teams.live.com and teams.cloud.microsoft (including genuine subdomains), subject to the installed sc_ei_teams_url_hosts filter. A lookalike host, open redirect or unsupported link must not be treated as an approved meeting. Do not paste actual join URLs into shared reports or public QA fixtures.
Source-review limitation: SC_EI_Teams::is_teams_url() checks the parsed host against the allowed hosts, but does not itself require the https scheme. The independent offline checker applies a stricter HTTPS-only rule as an additional security test. Verify scheme enforcement on the installed code and links before treating host validation as sufficient; a proposed hardening rule must not be misreported as deployed behavior.
If an accepted meeting remains accepted_pending_link, inspect the authorized finalization process and Graph queue. If it is scheduled but the sender sees no link, compare the canonical offer with the sender snapshot and cache layer. For a canceled, expired or superseded meeting, the sender projection must not expose any active Teams or Graph join URL.
Check sender-facing data minimization
The reviewed SC_EI_Calendar_Repository::sender_snapshot() publishes only an allowlist of meeting fields including status, title, selected time, time zone, valid link, agenda, preparation requests and permitted sender summaries. It does not include organizer name/email, participant-address lists, private notes, Graph internals, decisions or internal follow-up ownership. Do not reuse the internal export_for_inquiry() record as a public portal response; its purpose and contents differ from the sender snapshot.
Run an anonymous private-read denial test and inspect the allowed fields with a synthetic sender. Never use real inquiry exports as fixtures. A successful anonymous read of an internal meeting object is an incident, even if the front-end page has no visible calendar.
Diagnose reminder lifecycle and delivery evidence
Reminders may be pending, ready_for_review, sent, canceled, failed or skipped. Pre-meeting reminders apply to scheduled meetings; cancellation reminders apply only after cancellation, and post-meeting reminders only after completion. Background processing moves eligible due reminders to ready_for_review. It does not automatically send a message.
SC_EI_Calendar_Repository::mark_reminder_sent() requires a linked communication that belongs to the same inquiry, has direction outbound and status accepted or recorded. If a reminder is labeled sent without that evidence, preserve the row and audit history, review the communication state and correct the underlying transition; do not fabricate a sent timestamp or a message.
Reminder records use idempotency keys. After a reschedule, old open reminders should be canceled and new records generated for the new interval. A failed regeneration triggers a compensating reschedule attempt and reliability event; a failed compensation remains an operator incident, not a reason to blindly regenerate communications.
Diagnose Microsoft Graph synchronization
Microsoft Graph is an optional, human-triggered calendar connector. The reviewed integration uses Microsoft Graph v1.0 with application-only authentication to one configured organizer context. It requires appropriate tenant configuration and mailbox-scoped application permission; that environment is not verified here. Do not add broad mail or chat permissions merely to fix a calendar issue.
Creating a Graph event requires a meeting in accepted_pending_link, appropriate capability, nonce and a typed GRAPH <OFFER-NUMBER> confirmation. The operation queue stores a stable transaction ID, idempotency key and canonical payload hash. A successful remote create can precede the Teams join URL becoming available; the system then requires a separate GET reconciliation. Retried operations should reuse their existing identity rather than generate an unrelated second event.
| Graph symptom | Safe response |
|---|---|
429 or transient 5xx |
Respect Retry-After, bounded backoff and circuit breaker; inspect scheduled retry, not rapid manual replay |
| Event ID exists but join URL absent | Reconcile event and onlineMeeting.joinUrl; retain local accepted_pending_link until valid link available |
| Local time changed, remote time did not | Compare UTC time and graph_sync_status; request authorized reconciliation |
| Local meeting canceled, remote event still exists | Keep sender link revoked; separately review authorized remote deletion and possible attendee notifications |
| Duplicate event suspected | Preserve transaction ID, inspect remote organizer calendar, reconcile before any linkage reset |
| Credential or mailbox permission invalid | Disable/repair connector through approved secrets and Exchange RBAC process; do not expose tokens in QA |
Cancel or reschedule without creating divergence
Reschedule: capture an authorized reason; validate future start and end; preserve prior UTC interval; increment reschedule_count; check row_version; regenerate reminders; and, if Graph was linked, mark remote reconciliation required. Confirm the final state after any compensating rollback. Never assume the remote calendar time changes in the same database operation.
Cancellation: record the reason, change the canonical status to canceled, revoke the local Teams/Graph join URLs for sender visibility, cancel outdated reminders, and create a reviewable cancellation notice. A remote Graph event may still exist and may send its own cancellation messages when explicitly deleted. Those are separate, authorized effects. A local cancellation without remote deletion must not be labeled fully synchronized.
Read-only WordPress reconciliation
The developer package contains tools/read_only_calendar_reconciliation.php. It executes only within WP-CLI, derives table names through SC_EI_Database::table(), checks required tables and returns aggregate metrics. It issues no INSERT, UPDATE or DELETE statements. Keep the helper outside the webroot and run it only as an authorized operator. Even counts can identify people in small data sets; keep results private.
# Replace placeholders on the authorized WordPress host.
WP_PATH='/path/to/wordpress'
SCRIPT='/private/path/read_only_calendar_reconciliation.php'
wp --path="$WP_PATH" plugin get sustainable-catalyst-engagement-intake --field=version
wp --path="$WP_PATH" eval-file "$SCRIPT"
Aggregate flags include scheduled records without links, invalid UTC intervals, canceled or expired meetings retaining join URLs, missing portal linkage, stale reminders, sent reminders missing matching outbound communication, and Graph cancellation still pending. A nonzero aggregate count is an investigation prompt, not proof of a live privacy breach. Correlate under authorized access with version, timestamp and audit evidence. A zero count does not prove that role restrictions or Graph permissions are correct.
Use the independent incident checker
tools/check_schedule_case.py is a Python standard-library diagnostic for synthetic observations, not an implemented Contact and Engagement request/response schema. Its sc-kb-scheduling-triage/1.0 records intentionally represent a simplified observable incident. Never run it against raw private inquiry exports or upload them to an external service.
cd scheduling_workflows_troubleshooting
python3 -m unittest discover -s tests -v
python3 tools/check_schedule_case.py fixtures/valid.json
# Exit 2 means expected findings in the deliberately invalid fixture.
python3 tools/check_schedule_case.py fixtures/invalid.json || test "$?" -eq 2
php -l tools/read_only_calendar_reconciliation.php
The baseline developer package recorded 50 passing offline unit tests; the valid fixture generated zero findings, and the deliberately invalid fixture generated 25 expected diagnostic findings. These results test the independent checker; they do not establish the functioning of installed WordPress routes or a live Microsoft 365 tenant.
Reproduce the failure safely in staging
- Take a restorable snapshot. Use synthetic inquiries and a separate portal identity; record the exact deployed code hash and enabled settings.
- Create and publish a permitted meeting offer, accept one valid slot, and finalize via an approved Teams link. Confirm the inquiry ID, access ID and offer ID agree.
- Attempt publication with missing portal access, expired offer, stale
row_versionand invalid Teams host. Verify the right step fails and no unauthorized record is exposed. - Test normal time, DST spring gap, DST fall overlap, different IANA zones and UTC date boundaries; compare stored and sender-displayed times.
- Test canceled, expired and superseded sender projections; verify join URLs and private organizer fields cannot be retrieved without authorization.
- Test pending/ready/sent reminders with missing, wrong-inquiry, inbound or draft communication evidence. Verify no background task sends a message automatically.
- If the Graph connector is enabled, test denied create, explicitly authorized create, delayed join URL, throttle, idempotent replay, reschedule drift, cancellation and remote reconciliation in the isolated test tenant.
- Test failed reminder regeneration, failed remote update and post-meeting task creation with bounded fault injection. Reconcile current state with history before retrying.
- Record observed statuses, assertions, negative controls, remaining uncertainties and sanitized evidence. Never mark a case passed solely because the UI displayed a green confirmation.
Resolution
| Failure | Bounded recovery | Evidence to close |
|---|---|---|
| Missing portal or unauthorized visibility | Restore proper access binding, disable leaking projection/cache and review incident scope before reopening | Negative unauthorized tests and scoped sender allowlist both pass |
| Stale offer or conflict | Re-read the canonical offer, reconcile sender response and issue a new authorized offer if needed | One intended state, no forced row-version overwrite |
| Ambiguous civil time | Request a new unambiguous local time and convert using the selected IANA zone | Stored UTC equals independently computed value |
| Accepted link pending | Finalize manually or reconcile a previously authorized Graph event | Valid Teams URL and consistent private/public-safe status |
| Reminder mismatch | Review current meeting eligibility, reconcile communication, cancel stale reminders and regenerate only through the supported workflow | Evidence-backed sent status; no duplicate outbound message |
| Graph duplicate or drift | Preserve transaction identity; compare local/remote state; authorize bounded reconciliation or delete separately | Single intended remote event and aligned UTC state |
| Cancellation link leak | Revoke sender-facing URL, invalidate stale cache, assess exposure and separately handle remote cancellation | Closed sender view contains no join URL; remote state documented |
| Failed compensation | Keep incident unresolved, preserve before/after snapshots, repair dependency and rerun controlled case | Verified canonical state and recovery event trail |
Do not rewrite historical meeting events, delete unknown remote events, reset Graph transaction IDs on suspicion alone, or mark reminders sent without outbound evidence. If a write outcome is unknown, stop automatic retries until the local and remote consequences are established.
Verification
Release acceptance requires the deployed plugin version, installed calendar schema and effective settings, separate proof for WordPress authorization and sender-portal permissions, and successful staging integration tests. At minimum:
- Visibility: no internal availability or private meeting exports reachable anonymously; sender snapshot includes only allowed fields.
- State integrity: draft, offered, accepted, scheduled, declined, expired, superseded, canceled and completed scenarios obey their observed transition rules.
- Time: IANA-zone conversion works; nonexistent and repeated local times reject predictably; selected UTC end follows start.
- Consent: calendar invitations or participant-contact actions respect the relevant authorization and withdrawal state.
- Communications: no automatic reminder delivery; every
sentreminder links to a qualifying outbound communication. - Recovery: conflict, reschedule rollback, stale reminder repair and Graph replay produce no hidden duplicate record.
- Cancellation: local sender link is revoked; remote Graph event state is separately reconciled and any attendee notice is accounted for.
- Evidence: record expected/actual outcomes, sanitized logs, test IDs, actor roles, source commit, installed artifact identity, and outstanding failures.
Measurement and uncertainty
Report the denominator for each cohort: unauthorized read attempts, eligible meeting offers, ambiguous-time cases, reminder deliveries, Graph create/retry attempts and cancellation checks. Useful rates include private-read leakage (unauthorized successful private reads / unauthorized attempts), schedule-state mismatch (observed inconsistent offers / inspected offers), sent-reminder evidence failure (sent reminders without eligible outbound communication / sent reminders), and Graph duplication (extra remote events / distinct authorized transactions). A missing response is an unknown, not a pass; incident sampling may be correlated and unrepresentative.
For independent Bernoulli trials, a rough 95% upper bound with zero observed failures in n tests is 3/n, not zero. For example, zero failures in 30 independent trials gives an approximate upper bound of 10%. When the same WordPress configuration, cache or Graph mailbox underlies every trial, independence may fail; disclose this limitation and use broader negative controls.
Security, privacy and reporting boundary
Keep public issue reports limited to synthetic IDs, source version, nonsecret error codes, anonymized counts and the method for reproduction. Maintain private evidence for organizer identities, sender messages, participant lists, meeting links, calendar event IDs, tokens, detailed timing, legal restrictions and confidential attachments. An exported report from an administrator tool is not automatically suitable for public disclosure. Follow the site’s privacy and incident-response processes when unauthorized exposure is suspected.
Technical references
- Meeting creation, publication, portal response, finalization and status transitions
- Coordination, reminders, rescheduling, cancellation and sender projection
- Microsoft Teams URL and strict IANA civil-time validation
- Meeting-state vocabulary and offered-slot normalization
- Authorized WordPress calendar actions
- Graph authorization and typed confirmations
- Graph operation queue, retry and reconciliation
- Review-first scheduling operating model
- Time-zone and reminder reliability specification
- Graph credentials, retries and remote cancellation
Evidence scope: The pinned commit establishes inspected source behavior, and the companion tests validate a separate synthetic diagnostic. It does not prove current deployed controls or Microsoft 365 integration. The installed version and end-to-end acceptance must be recorded before assigning a Knowledge Base last verified product version.
