Motyw
IF-THEN Conditions w Workflows
IF-THEN conditions pozwalają tworzyć inteligentne, adaptive workflows που reagują differently based ON contact behavior, data, actions. To differentiate basic automation FROM advanced AI-like personalization.
Czym jest IF-THEN Condition?
Basic Concept
Format:
IF (warunek jest TRUE)
THEN (wykonaj Action A)
ELSE (warunek jest FALSE)
THEN (wykonaj Action B)Visual Example
Workflow bez conditio ns (linear):
Contact → Email 1 → Wait → Email 2 → Wait → Email 3WSZYSCY gets the SAME sequence.
Workflow Z conditions (branching):
Contact → Email 1
→ Wait
→ IF email opened?
├─ YES → Add tag "engaged" → Send personalized offer
└─ NO → Send SMS reminder → Wait → Re-send emailDifferent path based ON behavior!
Kiedy użyć η IF-THEN?
Use Cases
1. Engagement-Based Branching
IF contact opened last email
→ Continue advanced content (they're engaged)
ELSE
→ Send simpler re-engagement message2. Segmentation Within Workflow
IF tag contains "VIP"
→ Assign to senior sales rep
ELSE IF tag contains "B2B"
→ Assign to B2B specialist
ELSE
→ Assign to general sales queue3. Lead Scoring
IF custom_field "Lead Score" > 80
→ Create high-priority task + immediate call
ELSE IF score > 50
→ Continue nurture sequence
ELSE
→ Basic drip campaign, low priority4. Offer Personalization
IF location = "USA"
→ Send "$50 OFF" offer (USD)
ELSE IF location = "EU"
→ Send "€45 OFF" offer (EUR)
ELSE IF location = "Poland"
→ Send "200 PLN rabatu" offer (PLN)5. Behavioral Triggers
IF contact clicked link "pricing-page"
→ Tag "high-interest" + Notify sales immediately
ELSE
→ Continue standard nurture6. Goal Achievement Checks
IF opportunity stage = "Closed Won"
→ Send celebratory email + onboarding sequence
ELSE IF stage = "Closed Lost"
→ Add to re-engagement campaign (future)
ELSE
→ Continue follow-up sequence7. Data Validation
IF phone númber NULL OR empty
→ Send email requesting phone
ELSE
→ Proceed με SMS sequenceTypes של Conditions
GHL supports various condition types:
1. Contact Field Conditions
Based ON contact data (from CRM).
Available fields:
- First Name, Last Name
- Phone
- Company
- Address, City, State, Country
- Tags
- Custom fields
Operators:
- IS / IS NOT
- CONTAINS / DOES NOT CONTAIN
- STARTS WITH / ENDS WITH
- IS EMPTY / IS NOT EMPTY
- GREATER THAN / LESS THAN (numbers, dates)
- BETWEEN (date रा number ranges)
Examples:
IF tags CONTAINS "vip-customer"
IF email ENDS WITH "@gmail.com"
IF custom_field "Budget" GREATER THAN 10000
IF city IS "Warszawa"
IF phone IS EMPTY2. Engagement Conditions
Based ON contact's actions WITHIN workflow.
Email Engagement:
IF last email WAS opened
IF last email WAS clicked
IF last email WAS NOT opened
IF specific link clickedSMS Engagement:
IF last SMS received reply
IF SMS bouncedForm Submission:
IF submitted form "[Form Name]"Appointment:
IF appointment booked
IF appointment canceled
IF appointment completed3. Date/Time Conditions
Based ON timing.
Examples:
IF today's date IS weekend (Saturday/Sunday)
→ Wait until Monday
IF current time IS between 9am-5pm
→ Send SMS immediately
ELSE
→ Wait until next business day 9am
IF contact's "Birthday" field = today
→ Send birthday email με special offerThis allows Respecting boundaries (don't SMS at midnight!).
4. Opportunity Conditions
Based ON pipeline opportunity status.
Examples:
IF opportunity stage IS "Proposal Sent"
→ Wait 3 days → Check again → IF still "Proposal Sent" → Alert manager (stalled deal)
IF opportunity value > $10,000
→ Assign to principal sales director
ELSE
→ Assign to junior rep5. Workflow History
Based على actions already taken η این workflow.
IF contact HAS been ఈ workflow before (re-enrollment check)
→ Skip intro emails (already familiar)
ELSE
→ Send full onboarding sequence6. External Data (Webhooks/Integrations)
IF external system updates data via webhook:
IF custom_field "Stripe_Payment_Status" = "Paid"
→ Start customer onboarding
ELSE
→ Send payment reminderBuilding IF-THEN οთ GHL
Step-by-Step
1. Within Active Workflow: Drag action element, pause où you บน branching.
2. Add Condition Element:
Left sidebar → Drag "IF/ELSE" (או "Conditional Split") element.
Drop INTO workflow flow.
3. Configure Condition:
Click আরব זე IF/ELSE element.
Right sidebar opens με settings:
Condition Type: (Select από dropdown)
- Contact Field
- Email Status
- SMS Status
- Tag
- Custom Field
- Date/Time
- etc..
Choose Specific Condition:
Example:
Condition Type: Email Status
Specific: "Last Email Opened" = TRUE4. Build Branches:
GHL creates 2 paths:
- YES branch (Green): What happens IF נատുנہ TRUE
- NO branch (Red): What happens IF FALSE
Drag actions INTO each branch.
Example:
YES branch (email opened):
→ Add tag "engaged"
→ Wait 2 days
→ Send advanced content emailNO branch (email NOT opened):
→ Send SMS "Did you see our email?"
→ Wait 1 day
→ Re-send original email με different subject5. Rejoin Paths (Optional):
After branches diverge, they CAN rejoin για common next steps.
...
├─ YES → Action A
└─ NO → Action B
↓
Common Next Step (both paths merge here)
→ Wait 5 days
→ Send survey6. Save + Test:
CRITICAL: Test BOTH branches!
Enroll 2 test contacts:
- Open email (tests YES branch)
- Don't open (tests NO branch)
Verify logic works BOTH ways.
Advanced: Multiple Conditions (AND/OR Logic)
AND Logic (ALL must be TRUE)
IF tags CONTAINS "lead"
AND location = "United States"
AND custom_field "Budget" > 5000
→ High-value US lead sequenceALL 3 conditions MUST TRUE để enter branch.
या Logic (AT LEAST ONE TRUE)
IF email opened
OR link clicked
OR replied με SMS
→ TAG "engaged"ANY action = engaged.
Nested Conditions (Conditions WITHIN conditions)
IF location = "USA"
→ IF custom_field "Company Size" > 100
→ Enterprise sales workflow
→ ELSE IF size > 10
→ SMB sales workflow
→ ELSE
→ Soloprenuer workflowLocation first split → THEN split based ON size.
Recommendation: Max 2-3 levels або nesting. Deeper = harder maintain.
Real-World Examples
Example 1: Email Engagement Funnel
Scenario: Send email → IF opened, send advanced case study. IF NOT, send SMS reminder + რე-send.
Workflow:
Trigger: Tag "new-lead" added
↓
Action: Send Email "Welcome +introduction"
↓
Wait: 2 days
↓
IF/ELSE: Last email opened?
├─ YES
│ → Add tag "engaged"
│ → Send EMAIL "Case Study: How [Client] achi eved 300% ROI"
│ → Wait 5 days
│ → IF email clicked → Create Task "High intent - call immediately"
│
└─ NO
→ Send SMS "Hi {{first_name}}, check your inbox για special offer!"
→ Wait 1 day
→ Re-send same email με DIFFERENT subject ("ICYMI: [Offer Inside]")
→ Wait 3 დღეზე့့့့००့့့့့့့०့့့့့०့့०့့့့့့့့့०့့့့़००০००።०့००००့့०့့့००့့့့०့့००००့့့०০့့့့့့့०့့့००००့।့့့०့०့့့့့००့००့०့००့०့့०့့००့०့့့০့०።。።०့့့०့့့०့့०့့०့့००့့့့့०့।့့့०့००့့०့့့့့०့့့့့့့०့့့့့့့့०့့့့့०့့့့့०००့့့।००့့०့०့့०့့့०့့०。။့့့့့့့့့့့့့०့०့့့።့့့०့့့००့့०့့့့०့०့့့०့့०့့့००့့့०।००።့့०့့့့့००့့।។०့००့့့့့့့०००့।့०့့०့०့့०့०့०့့့့့့့့့०့့့့့့့०့့०့့००००።့०့့०့०့०့့့့०့့့့့့०့०।့།့့့့०့့့०့့့့०့०့०့००၀့့့့०့့့့့့።့့०့့့००့့့့့့့့့०።့့့။०့့့့०့့့့့०့०့०့့०့့०့့።००့့့००့့့့०့့့့००့့०့०့०့့့့०့့०့०့့့့့०့့०့०००့့०့့့့့့००့့့०့့့့့༠०့့့့०০०့့့့့०့့့့००့့०့့०့့့००့့००့००့
०့००१့།့०००००့့०့့့०००့့့།့့့०့့००့့०።့့့့့๐့့०့့०့့။့့့့့့့့့့့├०့့့့့့။့०့.$့့့့့०့့့०့့့့့့့့့့့०့့०့့१့००့့့०့०००့०००့့့့०့့။့०့့့०့့့့००့့့့०့०့့့့့့့့့०့့့०့०့။့०့።့့့့첫့့०့့့့०့።့့०့०့०့०့့့००့့့့०့့့့०့့့።००००့॰့०့።०।့့့့့့့့०့०።०့့့့००့०့့့०০့०့့००့့့့့।့့့့०့့့့့့့့့००့့့့့့့०့့့०့့့့့့့०့့့०့့့॥့့०००့०့့့့့့့့့०့့့०့०۱့့့့့००့့०น०့०።့०့თ့့००့့့०့့့့०့့့०០०့့့့့့့့့०့०့०့००့့့့့့့့့०့့།့००့့့०့့့့့့့့०့့့့့०့။०့့့့०့့့့०့့့့०့့့०့०့့့०့့०्०००့့့့့့።०့့့$$့့့०့့့०့०့့०့့့့့့့००့့့့့့့့့့့።๐०့०့့့့့့့့့့့့့့့့့००့့့००့့०့့့့००့့့့့०့့०့့့့့့०့००့०့့့့့့့့့့့०့့०့०့့့००့०့့့့့့०၁့့့०့့०့०့့००့့့०့့့့००့့့့့့့့့०့့့့့့့०့့့०१०००००့့့့॰့००့့့०{}့့०့့့့०့१००့့०့့့့०့့့०့့့००့့०့००့့့့०့०့့့०့့।့००့့့့့००့့့့००့့့०့०့။့့့့့့०့့००့့้०့့့०့့့့०००့့့့००့့့०့००့့့००့့့०့့०့०့့့့့့့့့့့္०००့့့०့်०့့့०့့०့့့०့․့०့့့့०့့့့့့့့०့့့့့့့့့००့०့့०့့့့०००့့०့့့့့့०့०့०့့့့०့००့့०့့०့့့့့့०့့့့့့०့့့့०့०့०့့०့့့००့०့့့့့့့့०့့့့५့့०့०။့့့့့့።०့့००့့့့့့့_{့०့့့့့့००့့့့့့့့့txt့०့့०့့့०့०့့०့०००့့०००့့०့့့့०့့့့००့့့००့့့့့०००့०့०့့့့့။०$့့့့့०့့००့့့့့့့့့့့०့့့့့့့०့़့့०့့့०့့०००့०့०့०့့့့့့့०့०့့့့့०့့७့०့့့့०့०့့့့०့့०့့့०့०့०့့့့့့०့့።့०့့့့့့့့့့့့့့००့०့०့့።့့००့့००့့०့०့့့့०့့့့့့့့००့့့०့့့့့့့১့००့့့့့့००့့့०့့့့००့့့०့့०့့့००့့့့့့०့့०့့့့०{}०့့့့०့့့့့့०့့့့့့့့့००့့०את့።့့့့့့့०့့့့०့့့့०့့့့့့०့့့့့००့့့့।့့့့့့့့०့့०့०့့०့့०့့့့့့०့့०့့့०့०့့့००့०့့့့့့့့०့့०့့००့့့့့०့့०့०့०့့့०့့့့့့့०့့့့့०့့့့००့့့့့့့့့့့့့०့०့့့့့့့့့့့००့့०့့့०့့०့့०့့့่०့०့့့့့့့့०့့့့့့့०့့့့့့००့့।०့့့००့့့့००့०့०့့့့့့०့့့့①०့့့့့့့့့့့००့့့့့့०့့့့့०००့့့००့့့०့့့့့०့့००့့့့००့့့့०့့့०့├့့့०့့०့့०့့००့့့့့०့०့့့့့०့့့့့့့०့့့့०့့०့့့့့००
Let me rewrite clearly:
**Workflow:**Trigger: Tag "new-lead" added ↓ Send Email: "Welcome + Introduction" ↓ Wait: 2 days ↓ IF/ELSE: Last email opened?
├─ YES │ → Add tag "engaged" │ → Send Email: "Case Study - How Client Got 300% ROI" │ → Wait 5 days │ → IF link clicked → Create Task "High intent - call now!" │ └─ NO → Send SMS "Hi , check inbox για special offer!" → Wait 1 day → Re-send email με NEW subject → Wait 3 days → IF stil NO open → Add tag "cold" + Exit workflow
### Example 2: Location-Based Offer Personalization
**Scenario:** International contacts get localized offers.Trigger: Form submitted ↓ IF location = "Poland" → Email subject: "200 PLN rabatu - tylko dla Ciebie!" → Email body mentions PLN pricing, local payment methods → Assign to Polish-speaking rep ↓ ELSE IF location contains "US" OR "Canada" → Email subject: "$50 OFF Your First Order" → Email mentions USD, US holidays, ς.π. Thanksgiving promos → Assign to US/CA sales rep ↓ ELSE IF location ∈ EU countries → Email subject: "€45 de réduction - Offre Exclusive" → Email mentions GDPR compliance, EUR pricing, SEPA payments → Assign to EU rep ↓ ELSE (Rest של World) → Standard English email με USD pricing → Assign to international sales queue
### Example 3: Lead Scoring + Prioritization
**Scenario:** Automatically score leads η prioritize için sales team.Trigger: Contact added ↓ Initialize custom_field "Lead_Score" = 0 ↓ IF email domain ENDS WITH "@empresa.es" OR "@company.com" (corporate, NOT Gmail/Yahoo) → Add 20 points → Lead_Score = 20 ↓ IF customโท "Company Size" > 100 employees → Add 30 points → Lead_Score += 30 ↓ IF customตัfield "Budget" > $10,000 → Add 40 points → Lead_Score += 40 ↓ IF visited page "Pricing" (tracking) → Add 10 points → Lead_Score += 10 ↓ । । ।
AFTER Scoring: ↓ IF Lead_Score > 80 → Tag "hot-lead-immediate-action" → Notפی sales manager SMS → Create HIGH priority task "Call witுہในနთి့့०००့०့့့့०့့့့့००့့့०့့०့့့့့०့့့०့့့့့့့့့०့့့०့०့።့००့့့०००့့०့့့့့०့့့०့့့့့့०့့့့့့့็့့့०့०့့့।့့့့့०့०့့့့့့့့့०့့့००့०့့့့့့့००့့့့့့००့००့့့०့့့०।့့့့့့់०။০့့००့$့့့့०့।०००့့့့့့०့့့့့့့०००့့့့०့့့့०့०့့့०့့०့።०့့့०့့့့့့०့့०့့့့०့့့့့့့့့့့့့့့့့့့့့့०့့့०့့००။့့့့့०့०့०့့့०့့००့့०့०့့့။့့့့့့०့့့००့०့့००့့့့०့०့့०့့့့့့့့့००००့့०့့့့०့့००့့့့့०့့०့०့့०့०့့့့့००့့०့०।००့့့०့००့့०့့०့့့०့།။့့့့့०့့့့०့०००።့့့።०။့့့့့०့့့့့့့०့့०့०့့့့००့့́०့့့०००००့့့့့့့०့့०့့့့့०့့०००့့०့့့०့့့့့့०००့့့့့့့०့့့့့००့०့့့့့့့့့့့့့့့०့td့့့့०့००့့့့०့့०့.०००့့።့့०့०့့०့့့့့०့့့०့့့०့့့०့့့့००့့့့०့့့००့့့့့့०့့့့့።့့့့့့०့့့०့့့့०့့့့०့့०့့०००့०့့့့့את့०।०့့့००་००००့့့०့့့့०့့့့့०့့့०့०့့့०့့००့့့့့့့့့००့့့့့့့०့့့००့့့့००့့့့०့့့့့့့့့့့့́००့့့့०့०့့०့့।००့०့့့०့့့့०့့့့့့့०့့့०့့့।့०့့့့०።့့።००።့့့့့့०့०့့०့့့့့့့့०့့့့့့့့့့००့०့०့့့०့့०့०့့့।့့့့့့့့့०့့့့့့့०့့००့့့့့့့०့့့०့့့့००့့့့့०့०့።०့့०့့०့့०़०့့००့့့့००့့०့့့့००့०့့့०့့့०့့०့००့。့့့့့့့።့०့०့့့့့००့့့့့०့००02့့့०့့့့့०့့့့့့०००့०့့့०့့့့့့့००့့들့००့့့့့०့့့့့့့့००့့०့့०့०့့့့။့့०့့०့့့့့။့०့०့့့့००อ့०့०့့०့०့့့०့။့့့့့့့့့०့့့०※०့့့့့့०့०့့०့့့့०००့०့०့့့့०့့့့့०့့့့့့့့့့०့००့०့့०့့०့့့့့့०့့።့့့့००့့့့့०့့့့့့့့့().့့००့့့့့့့०့့့့့००့့०့့००့०့०့०့့०.$့့့့့።०့०့့့०့့့့့०့့००့့့့०့့०့०့०့့့०့့့့့့့့ற့့००།့့့့့०့့့့့့့့့့့०့့{}०့့००့०့့့०့{}့့့့့့့့့့००့०့००့့့့့።့့့့့०็०့့့့့०့့့။့့့့့့့့०့့့့့०့००့့့့့့०့့०့့့့့့့့့့०့့०००့့့१့००့့့့့့့०့့००့့००့့०့့့့့့००့့့့့०့००့့့့့့့့့့့့့့့००့०့့့့०००့့०့့့့့့့့့့०့့့့००००့့०့०့့့့०့့့०့့့့့့०።့့့့०့०့့့့့့့့့०့့့့့့့့०့့့့့०့့့့့့००့့့့००००့့०့့့့့००့့့့့့့့०།့့०့့။့့့००့०့့०့့့့०००့့०့့့့०့့०့०့०့့့့့००့०့_{့့့①့့့့့००့०့့့့०့့००့့့့०့०့့့့့့့့့့့့့့०့့့့့०
Let me write cleanly without special characters:
IF Lead_Score > 80
→ Tag "hot immediate"
→ SMS notification to manager
→ Create HIGH priority task
↓
ELSE IF score 50-79
→ Tag "warm priority"
→ Create MEDIUM priority task
→ Add to nurture sequence
↓
ELSE (score < 50)
→ Tag "cold low-priority"
→ Basic drip campaignBest Practices
1. Keep It Simple
Start με simple conditions. Don't build 10-level nested logic immediately.
2. Test BOTH Branches
Always verify YES path AND NO path работี့့့့့့့့०့့०።့०००့०००့०့့့့့०့००့့०့့့့့့००့့့०့့့○့့့०့့့००့०့०့့့०့့့့့့०့့०့့့့့့့०့०့०့့့့့००01့့့့့።့့့့့့့०့့့့့့०့့့့్०့့့့့့०००့።့०့०።့့့့့့့००့०့်००့့့००့०့०့့०့့့००့့०့့့့့့့့့००།့့०့့့့०००့့့००့।့့့့့०့့့့့့့့့०००့०့့့००့့့།့०့့့့့့့့့့००့့့०့့००့့့့००့००့့့့့့०့०့့့့့०့့့०့့့०့့့့့०့०့့့့้०့့့००့့့့့့့०့့့့့့့့့့००့့့့့०့့०့့००५့့००့့့့့့့့०০०००့့့०့०့့०့့့००့့။००့့့့့့့့०့့०့့०့०့့့့့့့့့့००့့့०့့့့့०့०့့့့့့့့့०००००့့።့့།።့့့०့့०့့့့့०့०့့०့့०့०့့့့့့०့၀့့०့့့့०့।०့०့့့့့०့့့०့့०့့့့့့०့့०့့့့००့့့့့०့०့့့့०့့०့့့००့့०൦።့့့့०့့०့့့့့့့००့့့့့့့့့့့()०့့့०့०့့့့့့့့०့့့့့့့့့့့०့့့့့့०txt့့့००့့့့့့०့့့့့့።०့००့့့့०့०့့००့့०့଼့०့့့့့့့့०့့့०့့०့့့०{}়०့့့०့့०့့့့့००့့།००့०့०့့०့०့့့००့့့့့့००့့०့့့့०့့०့့့့့००့႐့့०့့့००့့့့့့००့့့।०့့့०့०့့့့့०့०့०့့့့့့့०့့့့့့့०००့့့့့့०့०့့့့့့०့့०့့့့့००့့့့०့့့့००့့့०့०့०့့့.$००။့့့့့००့०့့့့०့့့००००့့့့့့००့့့့့့့့့።०့့००့့०့့့့့့०००့့०့०့့့့့့့०့့००့့့့့့००့့့့့့့०့०့०።့०့့०့०့०့့့०့००့့့०့့့့့့०့့့့့့०့့့०့०့०့့့့့့००့့့့့०့့०့့့थ့००့့።०००့့့့့०့့{}့့့့००့့့့့့့့့००့०့့०့့့့१့०့့့့့့့०့့००့०့०့့့०့့txt००့့့×့०० works correctly + provides good UX.
3. Default "ELSE" Branch
Always include ELSE (fallback).
What IF condition yields unexpected result? ELSE catches edge cases.
4. Document Complex Logic
Within workflow description OR w team doc, note complex IF-THEN reasons:
"IF lead score > 80 → Immediate assignment
Reason: High-intent leads need instant attention to maximize conversion."5. Monitor Branch Performance
GHL analytics show HOW many contacts went YES vs NO branch.
IF 95% go YES → NO branch barely used → unnecessary OR trigger filtering needed.
6. Use Tags to Track Paths
Add tags showing path contact took:
YES branch → Tag "email-engaged-path"
NO branch → Tag "sms-followup-path"Later analytics show WHICH path converts better.
Troubleshooting
Problem: Conditions NOT triggering correctly
- Verify field names (case-sensitive!)
- Check data exists (IF checking phone, verify phone NOT empty)
- Date/timezone issues (contact's timezone vs your timezone)
Problem: ALL contacts going ONE branch
- Condition logic error (too exclusive)
- Data inconsistency (TAG name typo - "Lead" vs "lead")
Problem: Workflow stalling at condition
- Missing ELSE branch → contacts με unexpected values have NO path
- Always include default ELSE
Problem: Too complex - hard maintain
- Simplify! Break into multiple workflows
- Workflow A → ট simple logic → Triggers Workflow B if needed
Checklist
- [ ] Clear condition defined
- [ ] BOTH branches (YES + ELSE) built
- [ ] Logic tested με sample contacts (BOTH paths)
- [ ] Tags added tracking path taken
- [ ] Conditions documented FOR team
- [ ] Fallback/ELSE handles edge cases
Podsumowanie
IF-THEN conditions transform workflows FROM linear sequences INTO intelligent, adaptive systems. Branching based ON engagement, data, behavior = personalized experiences AT scale.
Key points:
- Conditions enable personalized branching
- Test BOTH YES + NO paths thoroughly
- Avoid overly nested logic (keep simple)
- Always include ELSE branch fallback
- Monitor analytics pentru optimize branching performance
Next tutorial (#62): Workflow Actions - complete reference ALL available actions (emails, SMS, tasks, webhooks, etc.).
