Onboarding Coordinator Agent — covers the trigger, welcome email, intake form dispatch, reminder logic, CRM field mapping, and Xero invoice creation steps.
ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: trigger fires on Closed Won
HubSpot sandbox deal moved to Closed Won stage with all required fields populated (contact name, email, service tier, deal value)
Automation platform detects the stage change event within 30 seconds and begins the onboarding sequence
Workflow execution log shows trigger received; no timeout or missed event
T02
Welcome email sent with correct personalisation
Closed Won deal with contact: Test Client, tier: Standard, account manager: Test AM
Gmail sandbox account sends email to test contact address with correct name, tier, and account manager name merged into the template
Email received in sandbox inbox; all merge fields populated correctly; no literal placeholder text visible
T03
Welcome email: missing contact first name in HubSpot
Closed Won deal where HubSpot contact first name field is blank
Automation uses fallback text (e.g. 'Hi there') rather than sending a blank merge field; execution continues
Email received with fallback greeting; no empty field; workflow does not halt
T04
Intake form link dispatched after welcome email
Successful T02 trigger completing the welcome email step
Typeform sandbox unique link sent to the same test contact email address within 60 seconds of the welcome email
Typeform submission URL present in the email body; link resolves to the correct sandbox form
T05
48-hour reminder fires when intake form not submitted
Intake form not submitted within the 48-hour window (simulated by advancing test clock or using a short timeout in sandbox)
Gmail sandbox sends a reminder email to the test contact address; no duplicate reminder sent
Reminder email received; timestamp shows correct delay logic; only one reminder dispatched
T06
Reminder does not fire when form submitted before 48 hours
Intake form submitted within the 48-hour window
No reminder email is sent; the sequence proceeds to CRM mapping
No reminder email in sandbox inbox; workflow log shows reminder branch skipped
T07
Happy path: intake data mapped to HubSpot record
Typeform sandbox submission with all required fields: billing email, billing contact name, service preferences, and payment terms
HubSpot sandbox contact and company record updated with all Typeform field values mapped to the correct HubSpot properties
HubSpot sandbox record shows correct field values matching the Typeform submission; no fields left blank that were provided
T08
Intake data mapping: optional field left blank in Typeform
Typeform submission where an optional field (e.g. secondary billing contact) is left blank
HubSpot record updated for all completed fields; blank optional field left as-is in HubSpot without overwriting an existing value
HubSpot record updated correctly; optional blank field does not overwrite an existing HubSpot value; no execution error
T09
Xero invoice created with correct values
HubSpot sandbox record with deal value: $2,500, billing contact email: testclient@example.com, payment terms: 14 days
Xero demo company creates a draft invoice for $2,500 addressed to testclient@example.com with 14-day payment terms and the correct line item description
Invoice visible in Xero demo company with correct amount, contact, due date, and line item; status is Draft or Sent per configuration
T10
Xero invoice: billing contact email missing from HubSpot record
HubSpot sandbox record where billing contact email field is blank after intake form mapping
Automation halts at the Xero step, logs an error to the workflow execution log, and triggers an alert (e.g. Slack message to the ops channel) notifying the team of the missing field
Xero invoice not created; error logged with deal ID and description of missing field; alert message received in sandbox Slack channel
T11
Xero invoice: deal value is zero or missing
HubSpot sandbox deal with deal value field blank or set to $0
Automation halts at the Xero step and logs a warning; no zero-value invoice created
No invoice in Xero demo; workflow log shows the zero-value guard triggered; execution paused pending manual review
T12
HubSpot deal stage updated to Onboarded after all steps complete
Successful completion of all prior steps (T01 through T09 sequence)
HubSpot sandbox deal stage updates from Closed Won to Onboarded; a timestamped note is added to the deal record
Deal stage reads Onboarded in HubSpot sandbox; note present on the record with execution timestamp
T13
HubSpot API rate limit response (429) received mid-sequence
Simulated 429 response from HubSpot sandbox during the CRM update step
Automation applies exponential backoff and retries up to three times before logging a failure and pausing the workflow
Workflow log shows retry attempts; on third failure, execution pauses and an error record is created; no duplicate writes on successful retry
T14
Duplicate trigger: same deal moved to Closed Won twice in quick succession
HubSpot sandbox deal stage toggled to Closed Won, back to another stage, then back to Closed Won within five minutes
Automation uses a deduplication check (deal ID) to prevent a second full sequence running for the same deal; second trigger is logged and suppressed
Only one welcome email sent; only one Xero invoice created; workflow log shows deduplication event for the second trigger
Internal Handoff Agent — covers the Slack notification posted after intake form submission and HubSpot record confirmation.
ID
Scenario
Input
Expected Output
Pass Criteria
T15
Happy path: Slack notification posted after intake confirmed
Typeform sandbox submission received and HubSpot sandbox record updated successfully (T07 state)
A formatted Slack message posted to the sandbox onboarding channel containing client name, service tier, assigned account manager, and kickoff scheduling link
Message appears in sandbox Slack channel with all four data fields present and correctly populated; no raw field codes visible
T16
Slack notification: missing account manager name in HubSpot
HubSpot sandbox record where the assigned account manager property is blank
Slack message posted with account manager field showing 'Unassigned' as fallback; notification is not suppressed
Slack message received with 'Unassigned' in the account manager field; no other fields affected; message not duplicated
T17
Slack API unavailable (simulated 503 response)
Simulated 503 response from Slack API during the notification step
Automation retries once after 60 seconds; on second failure, logs the error and sends a fallback email notification to the ops team email address
Retry attempt logged; fallback email received at the configured ops team address; Slack step recorded as failed in execution log