Workflow: Marketing to Lead
Modules involved: Marketing Campaigns · Marketing Automation (MA) · Lead Forms · Facebook Leads · Leads
Who uses it: Marketing manager, Growth, SDR, CRM admin
Typical duration: Ongoing (always-on campaigns) + 1–30 days nurture per lead
Overview
The demand generation and qualification workflow: how prospects enter the CRM (from web forms, Facebook Lead Ads, email/SMS campaigns, automations), how they are nurtured through automated sequences, and when they become qualified leads ready to be picked up by sales. This feeds Workflow 1 (Lead → Cash).
Flow diagram
TRAFFIC SOURCES
│
├── [WEB FORM (MA Forms / Lead Forms)]
│ │ submit → Lead created automatically with status + source from form settings
│ │ mapped fields; duplicate check
│
├── [FACEBOOK LEAD ADS]
│ │ webhook → mapped fields → Lead created automatically
│ │ source: "Facebook Lead Ad"
│
├── [EMAIL / SMS CAMPAIGN (Marketing Planner)]
│ │ tracked links → lead opens / clicks
│ │ behavior recorded in email logs
│
├── [WHATSAPP CAMPAIGN (WhatsApp Campaigns)]
│ │ messages sent to CRM segment via WABA templates
│ │ replies received in WhatsApp inbox → log on lead record
│ │ WhatsApp Bot → automatic response 24/7 → initial qualification
│
└── [MARKETING AUTOMATION (MA)]
│ trigger on CRM event → automatic sequence
│ lead enters segment → receives timed email/SMS
│
↓
[LEAD in CRM]
│ status: configurable (New → Contacted → Qualified)
│ MA score: accumulated from interactions (open, click, submit)
│ ↓ Score threshold or manual action
│
[QUALIFIED LEAD]
│ assigned to sales agent
│ ↓ Converted to Opportunity → continues Lead→Cash Workflow
│
[OPPORTUNITY ✓]
Step by step
1. Web Form — Capturing from the website
Where: /admin/ma (Marketing Automation forms) or /admin/leads/forms
Creating a form:
- Create the form in MA or in the Leads → Forms module
- Copy the embed code to your website
- Configure: what status the new lead receives, what source, which fields are required
Key form fields:
| Field | Notes |
|---|---|
lead_status |
The status with which the lead is created (e.g. New) |
lead_source |
Default source (e.g. Website, Landing Page) |
allow_duplicate |
Whether a new lead is created when the email already exists |
create_task_on_duplicate |
Whether a follow-up task is created when a duplicate is detected |
track_duplicate_field |
The field checked for duplicates (usually email) |
form_data |
Field configuration (JSON): what is collected |
On form submit:
- System checks for duplicates (if
allow_duplicate = 0) - If duplicate: creates follow-up task OR ignores (per configuration)
- If new: creates lead with fields mapped from the form
- The
from_ma_form_idfield on the lead indicates the originating form - MA triggers activate automatically if the lead enters a segment
2. Facebook Lead Ads — Capturing from ads
Where: /admin/facebookleadsintegration
Setup:
- Configure App ID + App Secret + Page Access Token for Facebook
- Register the CRM webhook URL in the Facebook App (endpoint excluded from CSRF)
- Map Facebook form fields to CRM lead fields
Facebook → CRM field mapping:
| Facebook field | CRM field |
|---|---|
full_name |
Lead name |
email |
|
phone_number |
Phone |
company_name |
Company |
| Custom fields | CRM custom fields |
Automated flow:
- Prospect completes the form in the Facebook ad
- Facebook sends a webhook POST to CRM in real time
- CRM creates a lead with mapped data + source
Facebook Lead Ad - Lead appears instantly in
/admin/leads— no manual export needed
3. Email / SMS Campaign (Marketing Planner) — Active outreach
Where: /admin/marketing_planner
Campaign types:
| Type | Description |
|---|---|
| Newsletter, promotional, re-engagement — design with React Email Editor | |
| SMS | Short text with tracked link or direct CTA |
| Sequence | Automatic series of timed messages (drip campaign) |
Behavior tracking:
| Event | Recorded in |
|---|---|
| Email delivered | ma_email_logs.delivery = 1 |
| Email opened | ma_email_logs.open = 1, open_time = NOW() |
| Link clicked | ma_email_logs.click = 1, click_time = NOW() |
Segmentation:
The campaign is sent to a Segment defined from CRM data: active clients, leads with no activity for 60+ days, leads from a specific industry, etc.
4. Marketing Automation (MA) — Automatic nurture
Where: /admin/ma
Key concepts:
| Concept | Table | Description |
|---|---|---|
| MA Campaign | ma_campaigns |
Visual Drawflow workflow; published: 0=draft, 1=active |
| Segment | ma_segments |
Dynamic group of leads/clients based on CRM criteria |
| Stage | ma_stages |
Lead's position in the funnel (published: 0/1) |
| Flow | ma_campaign_flows |
lead-id ↔ campaign-node ↔ date link |
| Score | ma_point on lead |
Score accumulated from interactions |
Lead scoring system (Lead Scoring via MA):
Leads accumulate points automatically from:
- Email opened →
ma_point_triggers→ adds X points toleads.ma_point - Link clicked → additional points
- Form submitted → high points (most valuable signal)
- Website page visit (if tracking is active)
When a lead exceeds the configured threshold → ma_point_triggers fires an action: agent notification, status change, task creation.
A lead's journey through an automation:
1. Lead created (from form / import / manual)
↓
2. Lead enters segment (criteria met)
→ added to ma_lead_segments + ma_lead_stages
↓
3. Active MA campaign on that segment
→ trigger activated → lead enters flow (ma_campaign_flows)
↓
4. "Wait 2 days" node → delay
↓
5. "Send Email" node → email sent
→ recorded in ma_email_logs
↓
6. Lead opens email → ma_email_logs.open = 1
→ score increased on leads.ma_point
↓
7. "Condition: open = yes?" node → branch
→ Yes: send email 2 with offer
→ No: send SMS reminder
↓
8. Lead completes form in email
→ submit → maximum score → trigger "Notify sales agent"
↓
9. Agent picks up the qualified lead → continues Lead→Cash Workflow
5. Qualified lead — Handoff to sales
Qualification signals:
| Signal | Recommended action |
|---|---|
| MA score > configured threshold | Automatic agent notification; status change |
| Lead opens email 3+ times | Follow-up task created automatically via Workflow Automation |
| Lead completes demo request form | Immediate notification; priority tag |
| Lead with no activity for 30 days | Re-entry into re-engagement sequence |
Handoff to sales:
- Agent receives the notification / sees the lead in their queue
- Checks the interaction history from the MA tab on the lead
- Converts the lead to an Opportunity (see Workflow 1)
- Lead remains in the MA segment but no longer receives nurture messages (condition in workflow)
What is created automatically
| Event | Created automatically |
|---|---|
| Web form submit | Lead with status + source from form; from_ma_form_id set |
| Duplicate detected at submit | Follow-up task (if create_task_on_duplicate = 1) |
| Facebook webhook received | Lead with mapped fields; source Facebook Lead Ad |
| Lead enters MA segment | Entry in ma_lead_segments + ma_lead_stages |
| Email sent from MA | Log in ma_email_logs |
| Email opened / link clicked | open=1 / click=1 + timestamp in ma_email_logs |
| Score threshold exceeded | Automatic action: notification, task, status change |
Points where the workflow may stall
| Problem | Likely cause | Solution |
|---|---|---|
| Leads from Facebook do not appear | Incorrect webhook URL or App not configured | Check webhook in Facebook App → Advanced → Webhooks |
| Form does not create a lead | Required fields not filled in or duplicate blocked | Check allow_duplicate and required fields |
| MA emails not sending | SMTP not configured or daily limit reached | Check email settings and email_sending_limit in MA settings |
| Lead does not enter automation | Segment does not include the lead or campaign is draft | Check segment criteria; activate the campaign (published=1) |
| Score does not increase | Open tracking blocked by email client (Apple MPP) | Normal — focus on click + submit as signals |
Relevant reports
- MA Analytics — per campaign: delivery rate, open rate, click rate, conversions
- Leads Report —
/admin/reports/leads— sources, statuses, agents - Segment members — from MA → Segments → View members
- Lead scoring —
leads.ma_pointvisible in the leads list
Modules involved — detailed documentation
- Leads · Lead Forms · Lead Sources
- Marketing Automation
- Marketing Planner
- Facebook Leads Integration
- Marketing Campaigns
- Lead Scoring
- Workflow Automation
Assign a Lead Source to every lead at creation — without consistent source tagging, the marketing attribution report cannot show which channels drive revenue versus just volume, making budget allocation decisions data-free.
Lead Scoring weights reflect assumptions at setup time. Calibrate scoring quarterly from closed-won deal data — actual conversion patterns will quickly reveal which dimensions (source, industry, title) are truly predictive versus assumed.