Internal build · ongoing
Building the website’s own controlled path from inquiry to accountable follow-up.
This internal project documents the architecture, data contract, failure tests, and acceptance criteria for turning an ahshagar.com inquiry into one validated CRM record, named owner, response, booking path, and measurable event.
Evidence status: Ongoing internal build. This page documents implementation and acceptance criteria. Measured results will be added only after reproducible tests pass.
Context
The website cannot credibly sell lead automation while its own inquiry path is a simple form with unknown ownership and no visible operational evidence. This project makes AH Shagar the first internal user and produces proof that buyers can inspect.
Baseline to capture before implementation
- Existing form(s), fields, destinations, confirmation, and spam behavior
- Where contact/source/consent data is stored
- How duplicates and replies are handled
- Whether a booking or opportunity can be tied to the original page/source
- What currently alerts the owner when delivery fails
Publish the baseline only in aggregate and only when it contains no lead PII.
Target architecture
Elementor/WordPress form -> signed webhook -> schema/spam/consent validation -> identity and dedupe -> rules-first qualification -> CRM create/update -> owner/SLA -> acknowledgement and booking -> status-aware follow-up -> funnel events and dashboard
Exception paths cover malformed records, contact conflicts, opt-outs, low-confidence text, CRM/channel downtime, provider throttling, and replay.
Recommended implementation
Workflow 1: capture and validate
- Accept only signed or otherwise authenticated events from approved forms.
- Generate a stable event ID at source.
- Normalize name, email, phone, company, origin page, offer, channel, timestamp, and consent.
- Apply required-field, format, spam, allow/deny, and payload-size rules.
- Store minimal execution/audit metadata without copying free text into analytics.
Workflow 2: identity, qualification, and routing
- Find contact by stable CRM ID, then normalized email/phone under explicit conflict rules.
- Upsert once using event ID/idempotency.
- Apply deterministic buyer-context and workflow-interest rules.
- Optionally summarize free text to a strict schema: pain, system interest, urgency, current tools, uncertainty. Store model/version/confidence; route low confidence to review.
- Set stage, owner, SLA, and readable assignment reason.
Workflow 3: response, booking, and follow-up
- Send one approved acknowledgement with accurate response expectation.
- Offer the most relevant system/audit booking path; do not falsely imply acceptance.
- Stop reminders on reply, booking, opt-out, disqualification, or manual pause.
- Alert the owner for high-intent or urgent leads under transparent rules.
Workflow 4: outcomes and observability
- Receive CRM stage/booking updates.
- Record anonymized analytics events and source context.
- Monitor execution success, failure, retries, latency, channel delivery, and cost.
- Produce a dashboard for valid lead, qualified, booking, opportunity, won/lost, response, failure, and source coverage.
Minimal data contract
| Field | Type | Required | Privacy/logic note |
|---|---|---|---|
event_id |
UUID/string | Yes | Idempotency key |
occurred_at |
ISO timestamp | Yes | Preserve source timezone/UTC |
origin_url |
URL/path | Yes | Normalize canonical path |
offer |
Enum | Yes | System/audit/service interest |
email |
String | Conditional | PII; validate and restrict logs |
phone |
String | Conditional | PII; normalize with region |
message |
String | No | PII risk; retention boundary |
consent_state |
Enum | Yes | Include notice/version/source |
campaign |
Object | No | UTM/referrer where available |
crm_contact_id |
String | After upsert | System-of-record identity |
owner_id |
String | After routing | Named responsibility |
qualification_reason |
String | After routing | Human-readable and auditable |
Required test fixture
At least 25 synthetic events covering:
- Valid audit inquiry
- Valid lead-system inquiry
- Valid knowledge-system inquiry
- Valid reporting-system inquiry
- Missing email and phone
- Malformed email
- International phone normalization
- Honeypot/spam hit
- Duplicate exact replay
- Duplicate contact from a new page
- Conflicting phone/email identities
- Existing opted-out contact
- Reply before scheduled follow-up
- Booking before scheduled follow-up
- Manual pause
- Low-confidence free text
- Oversized payload
- HTML/script payload
- CRM timeout
- CRM rate limit
- Email provider failure
- Calendar unavailable
- Workflow restart/replay
- Alert destination unavailable
- Analytics unavailable without blocking lead processing
Acceptance criteria
- Each valid event creates/updates one correct CRM contact and one inquiry/opportunity record.
- Exact replay sends no second acknowledgement and creates no duplicate CRM object.
- Consent, origin, offer, owner, SLA, and routing reason are present for every accepted lead.
- Invalid/spam events do not reach the CRM but retain enough safe diagnostic context.
- Conflicts and low confidence enter review; the system does not guess.
- Provider failures retry safely and reach a named exception owner.
- The lead-processing path continues when non-critical analytics fails.
- Dashboard counts reconcile to fixture events and CRM records.
- Credentials, raw PII, and private prompts are absent from screenshots and exports.
Evidence required for completed status
- Full workflow canvas/topology with credentials redacted
- CRM record showing source, owner, SLA, reason, and consent—using synthetic data
- Duplicate replay execution showing safe suppression
- Exception queue and alert for a controlled CRM failure
- Dashboard with fixture counts and metric definitions
- 60-90 second captioned walkthrough of happy path plus one failure/recovery
Current limitations
- Initial measurements use internal/synthetic tests and do not show client revenue impact.
- Low real inquiry volume can make conversion trends statistically unhelpful.
- External channel, CRM, and calendar reliability remains dependent on providers.
- Qualification rules require ongoing ownership as offers and buyer criteria change.
Next step
Want the same visibility across your lead journey?
Bring the current process, tools, approximate volume, and result that matters. The first conversation will identify the smallest useful next step.