Request Intake Agent: covers trigger detection in HubSpot, field extraction, validation, and write to the Google Sheets approval log.
ID
Scenario
Input
Expected output
Pass criteria
T01
Happy path: valid request submitted
HubSpot deal with all required fields populated: deal name, rep email, requested discount %, deal value, tier flag set to standard.
Structured row written to Google Sheets log within 10 seconds. All fields mapped correctly. No validation error.
Google Sheets row contains deal ID, rep email, discount %, deal value, timestamp, and status = PENDING.
T02
Missing discount field
HubSpot deal submitted with discount % field blank.
Agent raises a validation error. No row written to Sheets. Rep notified via Slack with field name missing.
Error log entry present. Google Sheets row absent. Slack message to rep references missing field by label.
T03
Missing deal value
HubSpot deal submitted with deal value field blank or zero.
Validation error. No Sheets row. Rep Slack notification lists deal value as missing.
Same as T02 but error cites deal value field.
T04
Deal below minimum discount threshold
HubSpot deal with discount % at 0.5%, below the minimum exception threshold.
Agent rejects the request as not qualifying for the exception workflow. Rep notified. No Sheets row.
Rejection Slack message sent. Sheets row absent. Error log entry marked BELOW_THRESHOLD.
T05
Duplicate deal ID submitted twice
Same HubSpot deal ID submitted a second time before the first request is resolved.
Agent detects existing PENDING row for the deal ID in Sheets and suppresses the duplicate. Rep notified of duplicate.
Only one row exists in Sheets for the deal ID. Duplicate Slack notification sent to rep. Error log entry marked DUPLICATE.
T06
HubSpot webhook delivery delay
HubSpot webhook delayed by simulated 30-second network lag.
Agent processes the event correctly on receipt. Timestamp in Sheets reflects event receipt time, not submission time.
Sheets row present and complete. Timestamp delta recorded in log. No duplicate row triggered.
T07
Google Sheets write failure
Simulate Sheets API returning a 500 error on write attempt.
Agent retries up to three times with exponential back-off. After three failures, writes to error log and sends alert to FullSpec monitoring channel.
Retry count = 3 in error log. Sheets row absent (expected). Monitoring Slack alert received within 60 seconds of final retry.
Approval Routing Agent: covers discount tier decision, Slack interactive message dispatch, Gmail finance escalation, and reminder cadence.
ID
Scenario
Input
Expected output
Pass criteria
T08
Happy path: standard tier, Slack approval
Sheets row with discount % below finance escalation threshold. Tier = standard.
Slack message sent to sales manager sandbox account within 15 seconds. Message contains deal name, discount %, margin impact, and approve/deny buttons.
Slack message delivered. Buttons functional in sandbox. Sheets row status remains PENDING.
T09
Happy path: finance tier, Gmail escalation
Sheets row with discount % above finance escalation threshold. Tier = finance.
Gmail sent to finance test address. Email contains deal name, discount %, full deal context, and approve/deny link. Slack message sent to manager noting escalation.
Gmail received at test address within 30 seconds. Slack manager notification delivered. Sheets row status = ESCALATED.
T10
Approver clicks Approve in Slack
Slack interactive button click: Approve, with optional comment field populated.
Decision written to Sheets: status = APPROVED, approver name, timestamp, comment. Routing agent hands off to CRM Update Agent trigger.
Sheets row updated within 10 seconds of button click. All decision fields present. Handoff event fired.
T11
Approver clicks Deny in Slack
Slack interactive button click: Deny, with comment field populated.
Sheets row updated: status = DENIED, approver name, timestamp, comment. CRM Update Agent triggered with DENIED status.
Sheets row correct. Handoff event fired with DENIED payload. No approval notification sent to rep at this stage.
T12
First reminder fires after no response
Sheets row in PENDING status. Simulate approver taking no action for the configured reminder interval (default: 4 hours in sandbox shortened to 2 minutes for test).
Reminder Slack message sent to approver. Sheets row updated with reminder_count = 1. Status remains PENDING.
Reminder delivered. reminder_count field in Sheets = 1. Timestamp of reminder logged.
T13
Second reminder and escalation after extended no response
Sheets row in PENDING, reminder_count = 1. Simulate further inaction past the second reminder window.
Second reminder sent. If escalation_on_second_reminder = true, manager's manager (or fallback address) notified via Slack. reminder_count = 2.
Second reminder delivered. Escalation Slack message sent to fallback address. reminder_count = 2 in Sheets.
T14
Slack API unavailable during message send
Simulate Slack API returning 503 at point of approval message dispatch.
Agent retries three times. On continued failure, falls back to sending approval request via Gmail to the approver's email. Error logged.
Gmail fallback message received at approver test address. Error log entry present. Sheets row status = PENDING (not errored).
T15
Invalid approver Slack ID in configuration
Sheets row with tier that maps to a Slack user ID that does not exist in the sandbox workspace.
Agent catches the Slack user not found error, logs it, and sends a routing failure alert to the FullSpec monitoring channel. No approval message delivered.
Error log entry present citing invalid Slack user ID. Monitoring alert received. Sheets row status = ROUTING_ERROR.
CRM Update Agent: covers HubSpot deal property write-back and rep Slack notification for both approved and denied outcomes.
ID
Scenario
Input
Expected output
Pass criteria
T16
Happy path: approved decision written to HubSpot
Handoff payload from Routing Agent: status = APPROVED, approved_price, approver_name, decision_date.
HubSpot deal properties updated: pricing_exception_status = Approved, approved_price, approver_name, decision_date. Rep Slack notification sent with outcome and approved price.
All four HubSpot properties present and correct on sandbox deal record. Rep Slack message delivered within 15 seconds.
T17
Happy path: denied decision written to HubSpot
Handoff payload: status = DENIED, approver_name, decision_date, denial_reason.
HubSpot deal properties updated: pricing_exception_status = Denied, approver_name, decision_date, denial_reason. Rep Slack notification sent citing denial and reason.
HubSpot properties correct. Rep Slack message includes denial reason text.
T18
HubSpot API write failure on update
Simulate HubSpot API returning 429 (rate limit) on property write attempt.
Agent retries with back-off. On success within retry window, write completes normally. On continued failure, error logged and monitoring alert sent.
If retry succeeds: HubSpot updated, no alert. If all retries fail: error log entry present, monitoring alert received, Sheets row flagged WRITE_FAILED.