Funnels & Workflows

Complete documentation of all lead funnels, email sequences, and data flows

UI

User Interface

Pages users interact with

FN

Backend Function

Server-side logic

Email

Via Resend API

Data Update

DB or Zoho

1

שאלון הזכאות

9 שאלות על גיל, אנגלית, השכלה, חוויה וכו׳

questions array: age, country, english, education, experience, marital, move_timeline, job_offer, savings

2

Processing Screen

מסך טעינה עם אנימציה וסימולציה של ניתוח

5 שלבים: Express Entry, PNPs, language, education, summary פעולה של ~5 שניות

3

Lead Form Screen

טופס: שם מלא, טלפון, מייל

שדות: first_name, last_name, phone, email PhoneInput עם בחירת מדינה

4

Lead Creation + Email Sequence

Lead entity נוצר + EmailSequence מאופסן

source: "facebook" Lead_Status: "New" NA_Counter: 0 🔴 קורא ל-initializeEmailSequence → Email 1 נשלח מיד

5

Zoho Sync (Entity Automation)

Lead נשלח לZoho CRM אוטומטית

automation: "Send Lead to Zoho CRM" event: Lead create + source=facebook

6

ניתוב בהתאם לקריטריונים

Premium/Standard בהתאם ל-English + Savings

Premium: Advanced/Fluent/Native AND $10K+ Standard: אחרת

7

עמוד תודה

Premium או Standard בהתאם לניתוב

/lead-thank-you-premium או /lead-thank-you-standard

Key Database Entities

Lead

  • first_name - Lead first name
  • last_name - Lead last name
  • email - Contact email
  • phone - Contact phone
  • score - Eligibility score (0-100)
  • status - new | contacted | qualified | not_qualified
  • answers - Quiz answers object

EmailSequence

  • lead_id - Reference to Lead
  • email - Lead email
  • first_name - Lead first name
  • email_1_sent_at - Email 1 timestamp
  • email_2_sent_at - Email 2 timestamp
  • email_3_sent_at - Email 3 timestamp
  • email_4_sent_at - Email 4 timestamp
  • sequence_status - active | stopped | completed
  • stop_reason - payment_clicked | user_replied | unsubscribed

PaymentRecord

  • client_name - Payer name
  • email - Payer email
  • phone - Payer phone
  • amount - Payment amount (279 or 129)
  • currency - USD
  • client_request_id - Unique Nuvei order ID
  • lead_id - Reference to original Lead
  • status - pending | processing | approved | declined
  • transaction_id - Nuvei transaction ID

Booking

  • date_key - YYYY-MM-DD format
  • time_slot - HH:MM format (Israel time)
  • lead_id - Reference to Lead
  • client_name - Booked client name
  • assigned_agent - Zoho agent email

External Services & APIs

Resend (Email)

Email delivery service for all 4 sequence emails

Secret: RESEND_API_KEY

Nuvei (Payments)

Secure payment processing for $279 and $129 orders

Secrets: NUVEI_MERCHANT_ID, NUVEI_MERCHANT_SITE_ID, NUVEI_SECRET_KEY

Zoho CRM

Lead/Contact management and agent assignment

Secrets: ZOHO_REFRESH_TOKEN, ZOHO_CLIENT_ID, ZOHO_CLIENT_SECRET

Zoho Mail

Alternative email delivery option (optional)

Secrets: ZOHO_MAIL_ADDRESS, ZOHO_MAIL_PASSWORD, ZOHO_MAIL_REGION