Phase 2 validates the handoffs between agents and confirms that data passed across tool boundaries is complete, correctly typed, and written to the right destination. IDs continue from Phase 1. A separate edge-case table covers failure and exception scenarios that span multiple agents or affect the entire pipeline.
ID
Scenario
Input
Expected Output
Pass Criteria
T13
Handoff: Deal Capture Agent to Outcome Classification Agent via Slack form submission
Deal Capture Agent completes successfully (T01 payload); rep submits Slack form within the 24-hour window.
Outcome Classification Agent receives the structured form response payload including deal ID, rep ID, and reason text; classification proceeds without manual re-entry.
No data re-entered manually at the handoff boundary. Deal ID in Classification Agent run log matches Deal Capture Agent run log. Latency from Slack submission to HubSpot write is under 3 minutes.
T14
Handoff: Deal Capture Agent to Outcome Classification Agent via Typeform webhook
Deal Capture Agent completes (T02 payload); buyer submits Typeform within 7 days; webhook fires.
Classification Agent receives Typeform payload with pre-filled deal ID from hidden field; merges with any existing rep form data; writes consolidated outcome to HubSpot and Google Sheets.
Hidden field deal ID correctly routes Typeform response to the correct deal. Merged payload contains both rep and buyer data where both are present. No duplicate Google Sheets row created.
T15
Handoff: Outcome Classification Agent to Insight Report Agent via Google Sheets
Classification Agent writes 10 structured rows to the Google Sheets staging tab over the course of a simulated month.
On the scheduled trigger, Insight Report Agent reads all 10 rows correctly; column mapping matches expected schema; aggregation logic produces accurate top-category counts.
Row count in Notion report matches row count in Google Sheets. Category totals are arithmetically correct. No rows skipped due to schema mismatch.
T16
Handoff: Insight Report Agent to Slack via digest post
Insight Report Agent successfully writes Notion page (T11 scenario).
Slack digest is posted to the correct channel; message contains a direct link to the Notion page; sales manager is tagged by Slack user ID.
Slack message appears in the designated channel within 2 minutes of Notion page creation. Notion link resolves correctly. Manager tag confirmed by Slack user ID, not display name.
T17
Integration: High-value lost deal with no survey response triggers manager exception path
Deal closes as Closed Lost; deal value is $12,000 (above $10,000 threshold); no rep form or buyer Typeform received within 24 hours.
Automation flags deal for manager review; Slack message sent directly to sales manager with deal name, value, and a prompt to initiate a manual follow-up call; deal marked 'Manager Review Required' in HubSpot.
Manager Slack notification confirmed. HubSpot field updated to 'Manager Review Required'. No taxonomy tag applied prematurely. No Google Sheets row created until manager resolves the flag.
T18
Integration: Two deals close within 60 seconds of each other
Two separate HubSpot sandbox deals both move to Closed Lost within 60 seconds; different reps assigned to each.
Both deals processed as independent workflow runs; no data from deal A appears in deal B's payload; both rep notifications sent to the correct rep; both Google Sheets rows contain distinct deal IDs.
Run logs show two separate execution threads. Cross-contamination check: deal ID in each Google Sheets row matches the originating HubSpot deal. Both Slack notifications routed to the correct rep Slack handle.
T19
Integration: Rep re-submits Slack form after initial submission (duplicate submission)
Rep submits Slack form once (T13 complete); rep submits the same form again 10 minutes later with a different reason.
Automation detects duplicate submission for the same deal ID; updates HubSpot and Google Sheets with the latest submission rather than creating a second row; logs an override event.
Google Sheets contains exactly one row per deal ID after two submissions. HubSpot outcome tag reflects the second submission. Override event logged with both submission timestamps and reason values.
Edge case tests are identified separately with the E prefix. These scenarios are designed to break normal flow and confirm the automation handles failure gracefully without data loss or unhandled exceptions.
ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate HubSpot deal stage event fires twice for the same deal
HubSpot sandbox emits two identical deal-stage-changed webhooks for the same deal ID within 5 seconds (webhook duplication scenario).
Idempotency check identifies the duplicate run; second execution is halted before dispatching a second Gmail survey or second Slack notification; only one run proceeds.
Gmail survey sent exactly once. Slack notification sent exactly once. Run log shows second execution flagged as duplicate and halted. No duplicate Google Sheets row.
E02
Slack API unavailable when rep notification is due
Deal Capture Agent reaches the Slack notification step; Slack API returns HTTP 503.
Automation retries Slack call up to three times with 30-second intervals; if all retries fail, fallback email sent to rep's Gmail address; error logged with deal ID.
Retry log shows three attempts. Fallback Gmail sent to rep. Error entry in run log. Gmail survey step not blocked by Slack failure.
E03
Typeform webhook never fires (buyer never responds)
Deal closes; Gmail survey sent; 7 days pass with no Typeform webhook received.
After 7-day timeout, automation marks the Typeform response as 'No Response' in Google Sheets buyer response column; HubSpot Survey Status updated to 'No Buyer Response'; unanswered flag raised for manager review if deal value exceeds $10,000.
Google Sheets buyer response column contains 'No Response' after 7 days. HubSpot Survey Status updated. High-value flag raised correctly. Classification proceeds using rep-only data if rep form was submitted.
E04
Google Sheets write fails due to permissions error
Outcome Classification Agent attempts to append row; Google Sheets API returns HTTP 403 Forbidden.
Automation logs the failed write with full row payload stored in the run log; retries once after 60 seconds; if retry fails, FullSpec alert fired with the payload for manual recovery; HubSpot write is not blocked.
HubSpot outcome tag written regardless of Sheets failure. Payload stored in run log for recovery. FullSpec alert triggered. No silent data loss.
E05
Rep Slack form response submitted outside the 24-hour window
Rep submits Slack form 30 hours after the original notification was sent.
Automation accepts the late submission; classification proceeds; Google Sheets row created with a 'Late Submission' flag in the response timing column; HubSpot outcome tag written normally.
Late submission accepted and processed. 'Late Submission' flag set to TRUE in Google Sheets. No error thrown. Classification output identical to on-time submission.
E06
Notion API rate limit hit during monthly report write
Insight Report Agent attempts to create Notion page; Notion API returns HTTP 429 after partial page creation.
Automation pauses for the Notion-specified retry-after interval; resumes write from the last successful block; does not create a duplicate page; Slack digest is held until Notion page is confirmed complete.
Notion page contains all required sections with no duplicated blocks. Slack digest posted only after Notion page write confirmed. Run log shows retry event and successful completion timestamp.