Integration tests (T15 through T22) validate the handoffs between all three agents as a chained sequence. Edge-case tests (E01 through E08) probe known failure modes that do not appear in individual agent tests.
ID
Scenario
Input
Expected output
Pass criteria
T15
Full chain: Xero trigger through to Slack alert (tier change path)
Xero sandbox transaction crosses Gold threshold. Contact matched in HubSpot.
VIP Tier Agent updates HubSpot. VIP Outreach Agent sends tier-up email and enrols in sequence. VIP Support Escalation Agent applies Zendesk tag and sends Slack alert in correct order.
All three agents fire in correct sequence. No step skipped. Timestamps in platform log show correct ordering.
T16
Full chain: no tier change, no outreach triggered
Xero weekly review fires. Contact spend unchanged. tier_changed = false.
Only VIP Tier Agent fires. Outreach Agent and Escalation Agent do not execute.
Platform log shows VIP Tier Agent ran and emitted tier_changed = false. Zero downstream agent executions.
T17
Typeform low-score webhook triggers Escalation Agent only
Typeform sandbox webhook with score = 2 received. Contact is Gold VIP in HubSpot.
VIP Support Escalation Agent posts low-score Slack alert. VIP Tier Agent and Outreach Agent do not fire.
Only Escalation Agent executes. Slack alert content correct. No spurious Tier Agent or Outreach Agent runs in log.
T18
New Zendesk ticket from VIP triggers Escalation Agent independently
New Zendesk ticket submitted. Contact email matched as Silver VIP in HubSpot.
Zendesk ticket tagged 'vip-priority'. Slack alert sent to account manager. Tier Agent and Outreach Agent not triggered.
Tag on Zendesk ticket correct. Slack message present. No unintended agent chain execution.
T19
Outreach Agent handoff delayed: HubSpot sequence API response slow
HubSpot sandbox API for sequence enrolment returns HTTP 202 with 8-second delay.
Agent waits up to 15 seconds for confirmation. Enrolment logged on confirmation receipt. No duplicate enrolment.
Single enrolment entry in HubSpot. No timeout error in log for delays under 15 seconds.
T20
Escalation Agent handoff: Slack API temporarily unavailable
Slack sandbox API returns 503 on alert post attempt.
Agent retries Slack post after 30 seconds up to two times. If all retries fail, alert details logged to platform error log and marked for manual review.
Retry count equals two in log. On failure, error log entry includes full alert payload. No silent failure.
T21
Survey dispatched and low-score response received in same run cycle
Typeform survey sent at 90-day mark. Sandbox response submitted immediately with score = 4.
Outreach Agent logs survey send. Escalation Agent independently receives Typeform webhook and posts Slack alert. No interference between the two executions.
Both agent executions present in platform log with distinct run IDs. Slack alert and HubSpot timeline entry both accurate.
T22
Contact tier lapse: downstream agents do not trigger welcome flow
Xero refund reduces spend below Silver threshold. tier_changed = true, new tier = 'Standard'.
Tier Agent updates HubSpot. Outreach Agent does not send tier-up email. Escalation Agent does not send VIP Slack alert. Lapse handling branch executes if configured.
No tier-up email in sandbox inbox. No VIP Slack alert in sandbox channel. Lapse date written to HubSpot contact.
ID
Scenario
Input
Expected output
Pass criteria
E01
Duplicate HubSpot contacts sharing the same email address
Xero customer email matches two active HubSpot contacts (one a duplicate created manually).
Agent identifies the conflict, logs a warning: 'Duplicate contact detected for [email]', halts write to both records, and routes to manual review queue.
No write to either contact. Warning in log includes email address and both contact IDs.
E02
Xero transaction record missing customer email field
Xero transaction payload received with customer_email = null.
Agent logs error: 'Missing customer identifier in Xero payload'. Run halted. No HubSpot lookup attempted.
Error entry in platform log with Xero transaction ID. Zero downstream actions executed.
E03
HubSpot contact missing first_name field (personalisation gap)
HubSpot contact matched for outreach but first_name property is blank.
Outreach Agent substitutes fallback salutation ('Hi there') in email body. Email still sent. Warning logged.
Email delivered with fallback salutation. Warning present in log flagging missing first_name for the contact ID.
E04
Zendesk API unavailable for more than three retry attempts
Zendesk sandbox API returns 503 on all three retry attempts for ticket tag write.
Escalation Agent logs critical error. Slack alert still attempted via direct fallback. Error logged with Zendesk ticket ID for manual tag application.
Slack alert sent despite Zendesk failure. Critical error entry in log includes Zendesk ticket ID. No silent skip.
E05
Typeform webhook payload missing score field
Typeform webhook received with response payload that does not contain the mapped score field.
Escalation Agent logs parsing error: 'Score field absent from Typeform payload'. No Slack alert posted. Webhook payload stored in error log for inspection.
No Slack alert. Full raw webhook payload present in error log. Parsing error message includes form ID.
E06
Contact enrolled in VIP sequence twice (duplicate trigger)
VIP Tier Agent fires twice within 60 seconds for the same contact due to two near-simultaneous Xero transactions.
Outreach Agent detects existing active sequence enrolment for the contact and skips re-enrolment. Warning logged.
Single sequence enrolment entry in HubSpot. Warning in platform log referencing duplicate trigger detection.
E07
Slack alert sent to account manager with no assigned owner in HubSpot
VIP contact in HubSpot has no hubspot_owner_id set.
Escalation Agent routes Slack alert to the configured fallback channel (e.g. #vip-escalations) rather than a named user DM. Warning logged noting missing owner.
Slack message present in fallback channel. Warning in log includes contact ID and notes missing owner assignment.
E08
Survey alert threshold set to 0 (misconfiguration)
Typeform response received with score = 5. Alert threshold configured as 0 in the automation platform.
Escalation Agent does not post a Slack alert (score above threshold of 0). No false positive alert generated.
Zero Slack alerts posted for scores above the configured threshold value, regardless of how low that value is set.