Skip to content

Registration Data Reference

This document provides authoritative reference information for the client registration system.

FieldTypeRequiredMax LengthValidationDefault
namestringYes100Non-empty, trimmed
emailstringYes255Valid email format
phonestringNo20Phone number format (flexible)null
Pattern: ^[^\s].{0,98}[^\s]$
Min length: 1 character
Max length: 100 characters
Allowed: Any characters except leading/trailing whitespace
Trimming: Automatic

Valid examples:

  • John Smith
  • Mary-Jane O'Connor
  • José García
  • 李明

Invalid examples:

  • John (leading space)
  • John (trailing space)
  • “ (empty string)
Pattern: RFC 5322 compliant
Max length: 255 characters
Case: Case-insensitive (normalized to lowercase)
Uniqueness: Not enforced (same email can register multiple times)

Valid examples:

  • john@example.com
  • mary.smith+realestate@gmail.com
  • jose@subdomain.example.co.uk

Invalid examples:

  • john@ (no domain)
  • @example.com (no local part)
  • john@.com (invalid domain)
  • john smith@example.com (space in local part)
Pattern: Flexible (accepts various formats)
Max length: 20 characters
Allowed: Digits, spaces, hyphens, parentheses, plus sign
Normalization: Stored as entered (not normalized)

Valid examples:

  • 555-1234
  • (555) 123-4567
  • +1 555 123 4567
  • 5551234567

Invalid examples:

  • call me (non-numeric)
  • 555-CALL (letters not allowed)
ScenarioBehavior
Same email, different nameCreates new lead record
Exact duplicate (email + name)Updates existing lead’s last_contact timestamp
Same email, registration within 24 hoursSkips routing, updates existing lead

When registration is submitted, a lead record is created with:

{
"id": "lead_abc123",
"name": "John Smith",
"email": "john@example.com",
"phone": "+1 555 123 4567",
"source": "website_registration",
"status": "new",
"assigned_agent_id": null,
"brokerage_id": "broker_xyz",
"created_at": "2024-01-15T10:30:00Z",
"last_contact": "2024-01-15T10:30:00Z",
"preferences": {},
"notes": ""
}
StatusMeaningNext States
newJust registered, not yet contactedcontacted, assigned
assignedRouted to agent, agent notifiedcontacted, qualified
contactedAgent made first contactqualified, nurture, dead
qualifiedVerified as serious buyershowing, offer
nurtureNot ready yet, follow up laterqualified, dead
deadNot interested or unresponsive
TriggerOld StatusNew Status
Registration submittednew
Routing assigns agentnewassigned
Agent views lead in CRMassignedcontacted
30 days no activityAnynurture
1. Get all active agents for brokerage
2. Filter to eligible agents (not on vacation, accepting leads)
3. Sort by last_lead_assigned_at (ascending)
4. Assign to agent with oldest timestamp
5. Update agent.last_lead_assigned_at

Fairness guarantee: Over time, each agent receives equal number of leads (±1).

1. Get all active agents with weights
2. Create weighted pool (agent with weight=3 appears 3 times)
3. Rotate through pool sequentially
4. Reset pool when exhausted

Example:

Agent A (weight=3): Gets 3/6 leads
Agent B (weight=2): Gets 2/6 leads
Agent C (weight=1): Gets 1/6 leads
1. Check if brokerage has primary_agent_id set
2. If yes, assign to that agent
3. If primary agent inactive, fall back to round robin
1. Get session preferences (if available)
2. Build preference embedding
3. Query agent specialty embeddings for similarity
4. Return top 3 matches
5. If <3 matches, supplement with round robin

When a lead is assigned, the agent receives:

Email subject: New lead assigned: [Name]

Email body includes:

  • Lead name, email, phone
  • Registration timestamp
  • Preferences (if detected by Scribe)
  • Link to lead in CRM

Delivery: Within 1 minute of assignment

Visitor receives a confirmation email:

Email subject: Welcome to [Brokerage Name]

Email body includes:

  • Confirmation of registration
  • Link to saved favorites
  • Link to My Data page
  • Contact info for assigned agent (if applicable)

Delivery: Immediately after registration

HTTP 200 OK
Content-Type: application/json
{
"success": true,
"lead_id": "lead_abc123",
"assigned_agent": {
"id": "agent_xyz",
"name": "Jane Smith",
"email": "jane@brokerage.com",
"phone": "+1 555 987 6543"
}
}
HTTP 400 Bad Request
Content-Type: application/json
{
"success": false,
"error": "validation_failed",
"details": {
"email": "Invalid email format"
}
}
HTTP 429 Too Many Requests
Content-Type: application/json
{
"success": false,
"error": "rate_limit_exceeded",
"retry_after": 60
}
EndpointLimitWindowScope
POST /register3 requests15 minutesPer IP address
POST /register5 requests1 hourPer email address

Exceeding limits:

  • HTTP 429 response
  • Retry-After header with seconds to wait
  • Client should implement exponential backoff
Data TypeRetention PeriodDeletion Method
Lead recordsIndefinite (until deleted by brokerage)Manual via CRM
Session preferences30 days after last activityAutomatic cleanup
Email notificationsNot stored (transient)
Audit logs90 daysAutomatic cleanup
RightImplementation
Right to accessExport lead data via CRM
Right to rectificationEdit fields in CRM
Right to erasure”Delete lead” button in CRM
Right to portabilityJSON export available
Right to objectOpt-out flag in lead record
  • Privacy policy link on registration form
  • “Do Not Sell My Info” opt-out available
  • Data deletion requests honored within 45 days
  • Unsubscribe link in all email notifications
  • Honor unsubscribe within 10 business days
  • Physical address in email footer
  • Clear “From” name (brokerage name)