CRM system of record
Send valuation, consultation, relocation, buyer, seller, and investor leads to the CRM first. The CRM should own pipeline stage, follow-up tasks, notes, and source attribution.
Operations setup
This page outlines the production workflow for routing every Beverly Hills Local Ledger form submission into a CRM, newsletter audience, internal notification system, and speed-to-lead follow-up process for Don Ashley.
Recommended architecture
The current endpoint validates name, email, and consent, creates a normalized lead object, writes the record to a local JSONL file for development, sends the record to a Zapier/Make-compatible webhook, and adds eligible newsletter or report contacts to Mailchimp. Production routing is controlled by environment variables, so the front-end forms stay stable.
Send valuation, consultation, relocation, buyer, seller, and investor leads to the CRM first. The CRM should own pipeline stage, follow-up tasks, notes, and source attribution.
Send newsletter and report leads to Mailchimp or your email platform with tags for source page, offer title, audience segment, and consent status.
Use Zapier, Make, or a direct CRM API to send internal alerts, create follow-up tasks, update spreadsheets, and trigger confirmation emails without changing the front-end forms.
Implementation steps
The fastest safe path is to deploy with required-mode disabled, prove the webhook and Mailchimp routing logic with test submissions, then decide whether failed delivery should block successful form responses.
Start with one system of record, then add supporting systems. For speed, route all real estate leads to a CRM first, newsletter leads to Mailchimp, and backup every submission to Google Sheets or Airtable.
Action: Recommended launch stack: CRM + Mailchimp + Zapier/Make + Google Sheets backup.
The website forms already post to `/api/leads`. Do not change every form. The API route now validates each submission, logs it locally for development, sends the normalized lead to the production webhook, and adds eligible contacts to Mailchimp.
Action: Configure `.env.example` values inside Vercel, then test webhook and Mailchimp results from the form response and hosting logs.
Create a field-mapping table inside the CRM before deployment. This prevents lost attribution and makes follow-up automation more precise.
Action: Use `formType`, `source`, and `offerTitle` as mandatory routing fields.
Home valuation and consultation leads should create immediate sales tasks. Report and newsletter leads should enter nurture campaigns. Press, advertiser, and directory leads should go to separate non-sales pipelines.
Action: Set task priority from `formType` and `timeline`.
Every successful submission should receive a confirmation email. Don Ashley should receive an internal alert for high-intent leads, especially valuation, consultation, relocation, and neighborhood alert requests.
Action: Use a transactional email service or CRM workflow for confirmations and internal alerts.
Submit one test for every form type. Confirm the CRM record, email list segment, source field, consent status, internal notification, and follow-up task are correct.
Action: Do not publish paid traffic or outreach campaigns until each form route is verified end-to-end.
Field mapping
The field map below is the operating standard for the current endpoint. Keep these names consistent so reporting, retargeting, segmentation, and follow-up rules stay clean as the platform expands beyond Beverly Hills.
| Field | Source | CRM / Email Destination | Operating Note |
|---|---|---|---|
id | Generated by API | CRM external ID or custom field | Use this for deduplication and audit history. |
createdAt | Generated by API | Lead created date | Keep ISO format for clean sorting and automation rules. |
formType | Lead form component | Lead type, pipeline, tag, or lifecycle stage | Use this to route valuation, consultation, newsletter, report, and press leads differently. |
source | Page/form location | Original source or campaign field | Preserve the exact page source for attribution. |
offerTitle | CTA or report name | Content offer or conversion asset | Useful for follow-up copy and segmentation. |
name | Required user field | Contact name | Required before sending to CRM. |
email | Required user field | Contact email | Validated by the endpoint before submission. |
phone | Optional user field | Mobile phone | Use for SMS only when compliant consent and business rules are confirmed. |
address | Optional user field | Property address | Highest value for home-valuation and seller-intent workflows. |
timeline | Optional dropdown/input | Buying/selling timeline | Use this to prioritize speed-to-lead follow-up. |
consent | Required checkbox | Marketing consent flag | The current API rejects submissions unless consent is true. |
userAgent | Request header | Technical attribution notes | Helpful for debugging and bot/spam review. |
Routing logic
A Beverly Hills seller valuation request should not receive the same workflow as a newsletter signup. Use the `formType` field as the first routing rule, then refine by `source`, `offerTitle`, and `timeline`.
| Form Type | Destination | Priority | Automation |
|---|---|---|---|
home-valuation | Seller pipeline | Immediate | Create task, send valuation intake email, notify Don Ashley, request property details. |
consultation | Active consultation pipeline | Immediate | Send booking link, create follow-up task, notify Don Ashley, start call-confirmation sequence. |
report | Market report nurture | Medium | Send report link, tag by report slug, start seven-day education sequence. |
newsletter | Mailchimp audience | Low | Subscribe to Beverly Hills Weekly Brief and tag by signup source. |
press | Media inquiries | Medium | Send press-kit response and notify media contact. |
advertise / directory / partner | Partnership pipeline | Medium | Send media kit, create partner follow-up task, tag by package interest. |
Developer handoff
The only required code change is inside the API route after the normalized `lead` object is created. The simplest production upgrade is to send that object to a secure webhook and let the automation layer distribute it to the CRM, Mailchimp, Google Sheets, and internal alerts.
// Implemented in src/app/api/leads/route.ts
// The endpoint calls src/lib/lead-integrations.ts after validation.
const webhookResult = await sendLeadWebhook(lead);
const mailchimpResult = await sendLeadToMailchimp(lead);
return Response.json({
ok: true,
leadId: lead.id,
integrations: [webhookResult, mailchimpResult],
});Store webhook URLs and API keys as environment variables in Vercel, Netlify, or your production hosting platform. Never hard-code private keys in the repository.
NEXT_PUBLIC_SITE_URL=https://donashleyrealty.com
LEAD_WEBHOOK_URL=https://hooks.zapier.com/hooks/catch/xxxxx/yyyyy
LEAD_WEBHOOK_REQUIRED=false
MAILCHIMP_API_KEY=replace-with-production-key
MAILCHIMP_AUDIENCE_ID=replace-with-audience-id
MAILCHIMP_REQUIRED=false
MAILCHIMP_ADD_ALL_LEADS=falseUse `.env.example` as the source of truth. If Zapier or Make handles distribution, the webhook URL may be enough for the first production release; Mailchimp can be enabled once the audience ID and API key are confirmed.
Testing checklist
Treat this as a revenue-operations launch checklist. A form is not complete until the record lands in the right destination, the right follow-up triggers, and the source attribution is preserved.
Speed-to-lead rule
Seller valuation, consultation, relocation, and neighborhood-alert requests should trigger an internal alert and a same-day follow-up task. Newsletter and general report downloads can enter nurture first, but every lead should keep its original source and content-offer history.