Integration tests verify that agents hand off correctly to one another and that the full conditional branching behaves as designed. All tests remain in sandbox. Test case IDs continue from Phase 1.
ID
Scenario
Input
Expected Output
Pass Criteria
T16
Intake and Chaser Agent handoff to Document Review Agent on form submission
Supplier submits completed intake form in sandbox Google Forms instance; form response webhook fires
Document Review Agent receives the form payload within 30 seconds; begins document completeness check automatically
Document Review Agent logs receipt of payload; intake form field values mapped correctly to review checklist; no manual trigger required
T17
Document Review Agent handoff to Supplier Activation Agent on full approval
Finance lead posts ':white_check_mark: approved' in designated Slack sandbox thread in response to T06-style notification
Supplier Activation Agent fires within 60 seconds of Slack approval message; Xero and HubSpot writes begin
Activation agent log shows trigger source as Slack approval event; Xero and HubSpot writes complete without error; Slack confirmation posted
T18
Exception path: incomplete documents routed to finance lead for manual review, then resubmission
Document Review Agent raises T07-type gap flag; finance lead posts corrections in Slack thread; supplier resubmits corrected document
Resubmission triggers a fresh document review cycle; updated completeness report generated; if now complete, flow advances to approval
Second review cycle completes without restarting the whole workflow; corrected document reflected in updated report; no orphaned workflow state
T19
DocuSign envelope signed; signature event triggers downstream steps
DocuSign sandbox webhook fires 'envelope_completed' event after simulated supplier signature
Workflow receives webhook; advances to compliance review stage; Document Review Agent notes agreement as signed
Workflow state updated to 'agreement_signed'; no polling loop left open; downstream Slack notification to finance lead includes signed status
T20
Compliance approval arrives after reminder timeout has already fired
Finance lead approval Slack message arrives 73 hours after initial notification (past a 72-hour reminder threshold)
Workflow accepts the late approval; no duplicate activation triggered; reminder sequence halted cleanly
Single activation run initiated; reminder sequence cancelled in workflow state; no duplicate Xero or HubSpot records created
T21
Full happy-path integration run: trigger through Slack confirmation
New supplier approval detected; all documents valid; finance lead approves promptly in Slack sandbox
All three agents fire in sequence; Xero record, HubSpot contact, and Slack confirmation created within a total elapsed time of under 5 minutes
All records present in sandbox systems; elapsed time logged and under 5 minutes; no errors in any agent log; workflow state set to 'complete'
T22
Finance lead Slack approval message uses non-standard wording
Finance lead posts 'looks good, go ahead' instead of the configured trigger phrase
Workflow does not advance; a Slack reply from the bot prompts the finance lead to use the approved response format
Activation agent not triggered; bot reply received within 30 seconds; workflow state remains 'awaiting_approval'; no data written to Xero or HubSpot
T23
Slack API unavailable during finance lead notification step
Document Review Agent attempts to post Slack notification; Slack API returns 503
Agent retries twice with 60-second intervals; after failure logs 'slack_notify_failed'; emails finance lead directly via Gmail as fallback
Two retry attempts logged; fallback Gmail sent to finance lead sandbox address; workflow state set to 'slack_fallback_active'; manual resolution note added
T24
HubSpot deduplication check before contact creation
Supplier email address already exists as a contact in HubSpot sandbox from a prior test run
Activation agent detects existing contact, updates rather than creates; logs 'hubspot_contact_updated'; Slack confirmation notes update not creation
No duplicate HubSpot contact; existing record updated with latest supplier data; Slack confirmation message includes 'record updated' language
ID
Edge Case
Simulated Condition
Expected Behaviour
Pass Criteria
E01
Duplicate supplier detected before intake form is sent
New supplier approval record shares the same ABN as an existing Xero demo company contact
Intake and Chaser Agent halts before sending form; routes Slack alert to operations channel with duplicate flag and existing record ID
No intake email sent; Slack alert received with correct existing Xero contact ID; workflow state set to 'duplicate_detected'; human review required
E02
Intake form submitted with required text fields blank
Supplier submits the Google Form with business name and ABN fields left empty
Document Review Agent flags validation errors for missing required fields; Slack alert sent to operations; supplier notified via Gmail to resubmit
Validation error log lists blank field names; supplier resubmission email sent to sandbox address; no document review attempted until resubmission
E03
Google Forms webhook fails to fire on submission
Supplier submits form; webhook delivery to automation platform times out
Platform's webhook retry mechanism fires up to three times over 10 minutes; after final failure logs 'forms_webhook_failed' and sends Slack alert to FullSpec operations channel
Three retry attempts with timestamps in logs; Slack alert received; workflow does not silently stall; manual reprocessing note added to alert
E04
DocuSign sandbox unavailable during agreement send
Document Review Agent attempts to send DocuSign envelope; DocuSign returns 502 Bad Gateway
Agent pauses envelope send; retries after 5 minutes; after two failed retries logs 'docusign_unavailable' and alerts operations channel; workflow state set to 'envelope_pending'
Retry count and timestamps logged; operations Slack alert received; envelope not marked as sent; workflow resumes automatically when DocuSign availability is restored or on manual trigger
E05
Finance lead does not respond to Slack approval request within 72 hours
Slack notification sent at T=0; no approval or rejection response from finance lead by T=72 hours
Workflow sends a reminder Slack message to finance lead and copies the operations channel at T=72 hours; workflow remains in 'awaiting_approval' state; no activation proceeds
Reminder message sent at correct timestamp; operations channel copied; no Xero or HubSpot writes attempted; workflow state unchanged; second reminder logic documented and ready
E06
Supplier submits the intake form twice (double submission)
Supplier clicks the form submit button twice in quick succession; two identical webhook payloads arrive within 10 seconds
Automation platform's idempotency check detects duplicate form response ID; second payload discarded; single document review cycle initiated
Only one document review run logged; no duplicate DocuSign envelope; no duplicate Slack notification; second payload discard event recorded in logs