Integration tests verify that data passes correctly between agents and tools at handoff points. All tests in this phase remain in the sandbox environment. Test IDs continue the sequence from Phase 1.
ID
Scenario
Agents / Tools Involved
Expected Output
Pass Criteria
T16
Onboarding Agent to Invoice Agent: contractor ID passes correctly on first invoice
Contractor Onboarding Agent creates Airtable record; Invoice Approval Agent receives first invoice email for same contractor
Invoice Agent retrieves correct Airtable record by email match; agreed rate read accurately; approval Slack sent to correct hiring manager
No manual lookup required. Rate match confirmed. Correct approver targeted.
T17
Invoice approved via Slack: Xero bill created and Airtable updated in sequence
Hiring manager clicks Approve in Slack; Xero bill creation call made; Airtable write follows
Xero bill created first; then Airtable 'Payment Status' = 'Approved' and 'Xero Bill ID' field populated
Xero bill ID present in Airtable record. Status updated. Sequence order correct (Xero before Airtable write).
T18
Onboarding Agent expiry dates written to Airtable and picked up by Compliance Agent
Form submission includes insurance expiry date 25 days from today; Compliance Agent daily run executes
Expiry date from form stored in Airtable 'Insurance Expiry' field; Compliance Agent reads the field and triggers alert on daily run
Alert sent within the next scheduled daily run cycle. Correct expiry date in alert message.
T19
Slack approval routing: message delivered to correct channel and user
Invoice received for contractor whose Airtable record lists hiring manager as 'priya.shetty@yourcompany.com'
Slack direct message sent to Priya Shetty with invoice details and Approve/Query buttons; not posted to a public channel
DM received by correct user. No public channel post. Button payload includes contractor ID and invoice amount.
T20
Google Drive document filed in correct subfolder after onboarding
Form submission with two attachments: tax form and insurance certificate
Each file saved to correct named subfolder within the contractor's Drive folder: /Contractors/Alex Rivera - 2024-05-06/Tax/ and /Contractors/Alex Rivera - 2024-05-06/Insurance/
Both files present in correct subfolders. File names preserved from original upload.
T21
Xero supplier already exists: onboarding agent deduplication
Contractor submits onboarding form; a Xero contact with the same email already exists in the sandbox Xero account
Agent detects existing Xero contact by email; skips supplier creation; links existing Xero contact ID to Airtable record; posts Slack note 'Existing Xero supplier linked for [name]'
No duplicate Xero supplier. Airtable Xero ID field populated with existing contact ID.
T22
Invoice discrepancy routed to Finance Manager: human step confirmed
Invoice amount $1,100 vs agreed rate $750; Finance Manager receives Slack discrepancy alert
Finance Manager can mark as 'Approved with variance' or 'Reject' via Slack; choice recorded in Airtable; if approved with variance, Xero bill created for $1,100
Both options functional. Airtable records the Finance Manager's decision and timestamp. Xero bill only created after explicit approval.
T23
Compliance alert includes correct re-upload link
Airtable record with document expiry within 30 days; re-upload link field contains a Google Forms pre-filled URL
Slack alert to contractor contains a clickable re-upload link that opens the correct pre-filled Google Form
Link opens correct form in test environment. Contractor email pre-populated in form.
ID
Edge Case Scenario
Condition
Expected Behaviour
Pass Criteria
E01
Duplicate onboarding form submission within 10 minutes
Contractor submits the same Google Form twice due to a browser refresh
Second submission detected by email deduplication check; second workflow run aborted; Slack warning sent to Operations Manager
Only one Airtable record created. Only one Xero supplier. Slack warning received.
E02
Form submission with missing contractor name field
Google Form submitted with name field blank (field not marked required at form level)
Automation catches missing name at parse step; workflow halted; Slack alert to Operations Manager 'Onboarding form received with missing name field - review required'
No records created in any tool. Alert sent. Submission data preserved in error log.
E03
Airtable API rate limit exceeded during batch onboarding
Five contractor form submissions received within 60 seconds
Automation queues requests with exponential back-off; all five records created within 5 minutes; no records lost
All five Airtable records created. No 429 errors propagated to final output. All Xero suppliers created.
E04
Slack workspace unavailable when approval message is due
Invoice approval Slack DM cannot be delivered; Slack API returns 503
Automation falls back to email notification to the approver's registered email address; Airtable status set to 'Approval Pending - Slack Failed'
Fallback email sent. Airtable status updated. Workflow does not stall indefinitely.
E05
Invoice PDF cannot be parsed: amount not extractable
Contractor submits a scanned invoice image as PDF with no machine-readable text
Parse step fails; Slack alert sent to Operations Manager 'Invoice received but amount could not be read - manual review required'; Airtable status set to 'Invoice Unreadable'
No Xero bill created. No approval request sent. Alert received by Operations Manager.
E06
Compliance document expiry date field blank in Airtable
Contractor onboarded but expiry date field left empty; daily Compliance Agent run executes
Agent skips blank expiry records; logs a warning in the run summary; Slack message sent to Operations Manager listing contractors with missing expiry dates
No false alerts sent. Operations Manager notified of incomplete records.
E07
Human timeout: invoice approval not responded to within 72 hours
Approval Slack message sent at T=0; no response at 48 hours (reminder sent); still no response at 72 hours
Escalation alert sent to Operations Manager listing the invoice, contractor name, and elapsed time; invoice held; Airtable status = 'Approval Overdue'
Escalation message sent at 72h. Invoice not paid. Airtable status reflects overdue state.