Batch 7.1: Fix Zoho Lead Payload Mapping #75

Closed
opened 2026-05-17 18:54:03 -05:00 by null · 0 comments
Owner

Batch 7.1 — Fix Zoho Lead Payload Mapping

Phase: 7 — Zoho CRM Integration
Agent: Neo (backend)
Priority: P1 High — wrong field mapping means leads land in Zoho with bad data

Problem

Contact form field mapping to Zoho CRM Lead schema has several issues:

  1. name field maps entirely to Last_Name — should split into First_Name / Last_Name
  2. No Lead_Source field — every web lead should have Lead_Source: "Website"
  3. Service_Interest is not a standard Zoho field — silently ignored unless custom field exists
  4. No trigger parameter — should explicitly control Zoho workflow automations
  5. No $approved flag — web leads should route through approval workflow

Tasks

  • Split name into First_Name / Last_Name (split on last space; single word → Last_Name only)
  • Add Lead_Source: "Website" to every lead payload
  • Replace Service_Interest field with Description field (append service interest to message)
  • Add "trigger": ["workflow"] to enable workflow automations explicitly
  • Add "$approved": false for web-submitted leads going through approval queue

Files to modify

  • server/index.jsforwardToZoho() payload construction

Acceptance criteria

  • Name split correctly: "John Smith" → First_Name: "John", Last_Name: "Smith"
  • Single name: "Madonna" → Last_Name: "Madonna", no First_Name
  • Lead_Source always set to "Website"
  • Service interest appended to Description, not sent as Service_Interest
  • trigger and $approved flags present in payload
  • No regressions when ZOHO_ENABLED=false
## Batch 7.1 — Fix Zoho Lead Payload Mapping **Phase:** 7 — Zoho CRM Integration **Agent:** Neo (backend) **Priority:** P1 High — wrong field mapping means leads land in Zoho with bad data ### Problem Contact form field mapping to Zoho CRM Lead schema has several issues: 1. `name` field maps entirely to `Last_Name` — should split into `First_Name` / `Last_Name` 2. No `Lead_Source` field — every web lead should have `Lead_Source: "Website"` 3. `Service_Interest` is not a standard Zoho field — silently ignored unless custom field exists 4. No `trigger` parameter — should explicitly control Zoho workflow automations 5. No `$approved` flag — web leads should route through approval workflow ### Tasks - Split `name` into `First_Name` / `Last_Name` (split on last space; single word → `Last_Name` only) - Add `Lead_Source: "Website"` to every lead payload - Replace `Service_Interest` field with `Description` field (append service interest to message) - Add `"trigger": ["workflow"]` to enable workflow automations explicitly - Add `"$approved": false` for web-submitted leads going through approval queue ### Files to modify - `server/index.js` — `forwardToZoho()` payload construction ### Acceptance criteria - Name split correctly: "John Smith" → First_Name: "John", Last_Name: "Smith" - Single name: "Madonna" → Last_Name: "Madonna", no First_Name - Lead_Source always set to "Website" - Service interest appended to Description, not sent as Service_Interest - trigger and $approved flags present in payload - No regressions when `ZOHO_ENABLED=false`
null added the
backend
data-integrity
phase-7
labels 2026-05-17 18:54:03 -05:00
null added the
P1 High
label 2026-05-17 18:55:32 -05:00
null closed this issue 2026-05-17 19:25:30 -05:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/Queue-North-Website#75
No description provided.