Give every delivery a durable identity
The implemented attribution pattern generates a lead ID and assignment ID before the primary CRM call. A public agency assignment ID can be written to a dedicated CRM field and is also appended to a non-sensitive delivery block as a fallback, so later outcomes can be joined by an exact key instead of the newest matching email or phone number.
- Create the identifier before CRM or warehouse availability can affect it
- Carry the same identifier into the intake record and feedback path
- Treat contact information as match data, not as the record's identity
Record signed as a verified business event
Lead Intel separates when the agreement was signed from when Case Growth Solutions recorded it. The signed interaction requires an executed representation or retainer agreement confirmation, an actual occurrence time, and a verification method. The interface then makes signed terminal for normal editing, while the database also enforces one signed outcome per assignment.
- Use shared stages from new through consultation, signed, lost, and disqualified
- Store the business occurrence time instead of substituting the current time
- Keep an append-only outcome and audit trail
Commit the outcome before contacting a platform
A database function writes the outcome, updates the assignment projection, appends the audit record, classifies the delivery, and creates an outbox job in one transaction. Provider calls happen later in a worker. Stable event IDs and idempotency keys let retries repeat safely without creating a second logical conversion.
- Use optimistic version checks to catch concurrent edits
- Return an existing result for a repeated idempotency key
- Keep network calls outside the operator's status-update request
Route only an eligible, allowlisted signal
The implemented outcome transaction derives the source platform from the stored lead origin and considers only that platform's client-scoped connection. Client postback permission defaults off. Payload builders include permitted match fields and stable identifiers, but omit survey answers, case narratives, notes, practice-area labels, and sensitive URLs.
- Keep credentials, mappings, modes, and privacy approval client-specific
- Hash contact identifiers according to the receiving platform's requirements
- Make blocked, ineligible, expired, shadow, queued, accepted, retry, and failed states visible
Reconcile deterministically and roll out in stages
The Sheet reconciler reads configured assignment, status, and signed-date columns rather than importing an entire intake sheet. Missing headers, unknown IDs, and invalid dates create review issues instead of triggering a guess. Connections can begin in shadow mode, where the worker builds and hashes the exact payload without sending it, before moving through reviewed test and live modes.
- Match the exact agency assignment ID
- Treat a successful provider response as accepted, not an optimistic UI action
- Pause a connection on credential failures and preserve the original event ID for retries