# Quote Data Chasing

Detect missing fields on an insurance quote (including data pulled from ACORD forms — the standardized US insurance application forms) and run a polite, timed chase sequence with the applicant or producer until the submission is complete.

## When to use

- A new quote request or ACORD form has arrived and needs a completeness check before it can be submitted to carriers.
- Required fields (dates, entity details, prior loss history, location details, etc.) are missing or ambiguous.
- An applicant or producer has gone quiet after an initial data request and needs a gentle nudge.
- You need to confirm a quote package is submission-ready and hand it off to a human agent.

## Tools

- `http-get`
- `send-email`
- `schedule-task`
- `create-task`
- `fetch-file`
- `parse-document`

## Playbook

1. Retrieve the quote record and any attached ACORD form file using `fetch-file` (e.g. from the agency management system's document store).
2. Extract structured text from the attached ACORD form (PDF or scanned image) using `parse-document` so field values can be checked against the required-field list for that line of business.
3. Call the agency management system's REST API with `http-get` (e.g. GET https://api.agencyms.example.com/v1/quotes/{id}) to cross-reference the parsed fields against the system-of-record quote record and identify what is genuinely missing versus already on file. Auth is injected by the org's Integration row for this host — never ask for, echo, or hardcode credentials. On 401/403 or a missing Integration, stop and message a human via send-message naming the service and scopes.
4. Build a plain-language checklist of the specific missing fields (never coverage advice, never suggested limits or carriers) and send it to the applicant or producer using `send-email`, written politely and specifically (e.g. "we're missing the building's year of construction and prior loss history for the last 3 years").
5. Use `schedule-task` to queue a follow-up chase in 2 business days if no reply is received.
6. If the chase fires and fields are still missing, send a second, warmer reminder via `send-email` and use `schedule-task` again to queue a final chase in 2 more business days.
7. If a second chase also goes unanswered, or if a reply raises a coverage question, limit question, or carrier question, stop chasing and use `create-task` to hand off to a licensed human agent with a summary of what is still missing and what was asked.
8. Once all required fields are confirmed present and consistent, use `create-task` to mark the quote package "submission-ready" for a human agent to review and send to carriers.

## Failure modes

- ACORD form is a low-quality scan and `parse-document` returns garbled or partial text — do not guess field values; flag the fields as unreadable and request clean copies instead of assuming content.
- An applicant reply contains a question about coverage, limits, carriers, or claims fault/applicability — do not answer it; escalate immediately via `create-task` to a licensed agent rather than continuing the chase.
- The agency management system API is unreachable or returns 401/403 — stop and message a human via send-message naming the service and scopes rather than proceeding on stale or assumed data.
- A chase is scheduled but the applicant replies with a COI (certificate of insurance) request for a non-standard holder or an endorsement request — do not process it; these are always human-gated.

## Done when

- All required fields for the quote's line of business are confirmed present and consistent between the ACORD form and the system of record.
- A human agent has been notified via `create-task` that the package is submission-ready, or has been handed an escalation with a clear summary if the chase stalled or a compliance-sensitive question arose.