This document explains WHAT happens at each step of the WhatsApp bot, without code. Perfect for understanding the user experience and bot behavior.
User opens WhatsApp → Sends "Hi" to Yugam number → Bot responds with welcome
User on website → Clicks "Continue with WhatsApp" → Enters phone →
WhatsApp opens → Sends message → Bot sends login link → Click link → Logged in
When user sends “Hi”, “Hello”, “Start”, or any first message:
What bot does:
SELECT * FROM tbl_users WHERE phone = '+919876543210'Bot sends:
┌────────────────────────────────────────┐
│ 👋 Hi Rajesh Kumar! │
│ │
│ Welcome back to Yugam 2026! 🎉 │
│ │
│ Your Yugam ID: YUG2600001 │
│ │
│ What would you like to do today? │
└────────────────────────────────────────┘
Then immediately shows Main Menu (see below)
What happens internally:
idleBot sends:
┌────────────────────────────────────────┐
│ 👋 Welcome to Yugam 2026! │
│ │
│ You haven't registered yet. │
│ │
│ Let's create your account! 🚀 │
│ │
│ Please answer the following │
│ questions to get started. │
└────────────────────────────────────────┘
Then immediately starts Registration Flow (see below)
What happens internally:
registration_startBot sends:
┌────────────────────────────────────────┐
│ 📝 Registration - Step 1/5 │
│ │
│ What is your full name? │
│ │
│ Example: Rajesh Kumar │
└────────────────────────────────────────┘
User replies: Rajesh Kumar
What happens internally:
name = "Rajesh Kumar" (temporary storage)collecting_emailBot sends:
┌────────────────────────────────────────┐
│ 📝 Registration - Step 2/5 │
│ │
│ What is your Gmail ID? │
│ │
│ ⚠️ Please enter a valid Gmail │
│ address ending with @gmail.com │
│ │
│ Example: rajesh.kumar@gmail.com │
└────────────────────────────────────────┘
User replies: rajesh@gmail.com
What bot does:
If email format is invalid:
┌────────────────────────────────────────┐
│ ❌ Invalid email format │
│ │
│ Please enter a valid Gmail address │
│ ending with @gmail.com │
│ │
│ Example: yourname@gmail.com │
└────────────────────────────────────────┘
If email already registered:
┌────────────────────────────────────────┐
│ ⚠️ Email Already Registered │
│ │
│ This Gmail ID is already linked │
│ to Yugam ID: YUG26XXXXX │
│ │
│ Please enter a different email or │
│ contact support if this is your │
│ account. │
└────────────────────────────────────────┘
If email is valid:
Bot saves: email = "rajesh@gmail.com"
State changes to collecting_college
Bot sends:
┌────────────────────────────────────────┐
│ 📝 Registration - Step 3/5 │
│ │
│ Select your College/School: │
│ [Search Colleges ▼] │
│ │
│ When clicked, shows: │
│ 🔍 Search box │
│ │
│ Complete list from database: │
│ • PSG College of Technology │
│ • Anna University │
│ • VIT Vellore │
│ • Coimbatore Institute of Tech │
│ • Amrita University │
│ • St. Joseph's College │
│ • Kumaraguru College of Tech │
│ ... (ALL colleges from DB) │
│ │
│ • Other (Type manually) │
└────────────────────────────────────────┘
What bot does:
SELECT id, name FROM tbl_colleges ORDER BY name ASCInteractive List Features:
User selects: “PSG College of Technology”
What happens internally:
college_id = 5 and college_name = "PSG College of Technology"collecting_departmentIf user selects “Other”:
Bot sends:
┌────────────────────────────────────────┐
│ Please type your college/school name:│
└────────────────────────────────────────┘
User types: St. Xavier's College
What happens internally:
college_id = NULL and college_name = "St. Xavier's College"collecting_departmentBot sends:
┌────────────────────────────────────────┐
│ 📝 Registration - Step 4/5 │
│ │
│ Select your Department: │
│ [Search Departments ▼] │
│ │
│ When clicked, shows: │
│ 🔍 Search box │
│ │
│ Complete list from database: │
│ • Computer Science Engineering │
│ • Electronics & Communication │
│ • Mechanical Engineering │
│ • Civil Engineering │
│ • Information Technology │
│ • Electrical Engineering │
│ • Business Administration │
│ • Artificial Intelligence │
│ • Data Science │
│ • Biotechnology │
│ ... (ALL departments from DB) │
│ │
│ • Other (Type manually) │
└────────────────────────────────────────┘
What bot does:
SELECT id, name FROM tbl_departments ORDER BY name ASCInteractive List Features:
User selects: “Computer Science Engineering”
What happens internally:
department_id = 1 and department_name = "Computer Science Engineering"collecting_yearIf user selects “Other”:
Bot sends:
┌────────────────────────────────────────┐
│ Please type your department name: │
└────────────────────────────────────────┘
User types: Marine Engineering
What happens internally:
department_id = NULL and department_name = "Marine Engineering"collecting_yearBot sends:
┌────────────────────────────────────────┐
│ 📝 Registration - Step 5/5 │
│ │
│ What year are you in? │
│ [Select Year ▼] │
│ │
│ When clicked, shows: │
│ • 1st Year │
│ • 2nd Year │
│ • 3rd Year │
│ • 4th Year │
│ • Postgraduate │
│ • Alumni │
│ • Faculty │
│ • Other │
└────────────────────────────────────────┘
User selects: “2nd Year”
What happens internally:
year = "2nd Year"registration_summaryBot sends:
┌────────────────────────────────────────┐
│ ✅ Registration Summary │
│ │
│ Please confirm your details: │
│ │
│ Name: Rajesh Kumar │
│ Email: rajesh@gmail.com │
│ College: PSG College of Technology │
│ Department: Computer Science Engg │
│ Year: 2nd Year │
│ Phone: +919876543210 │
│ │
│ Is this correct? │
│ │
│ [✅ Confirm] [❌ Edit] │
└────────────────────────────────────────┘
What happens internally:
registration_summaryIf user clicks “Edit”:
Bot sends:
┌────────────────────────────────────────┐
│ Which field do you want to edit? │
│ [View Fields ▼] │
│ │
│ • Name │
│ • Email │
│ • College │
│ • Department │
│ • Year │
│ • Cancel (Keep all) │
└────────────────────────────────────────┘
User selects: “Email”
What happens:
If user clicks “Confirm”:
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Creating Your Account... │
└────────────────────────────────────────┘
What happens internally:
INSERT INTO tbl_users (
name, email, phone, college_id,
department_id, year,
created_at
) VALUES (
'Rajesh Kumar',
'rajesh@gmail.com',
'+919876543210',
5,
1,
'2nd Year',
NOW()
)
YUG2600001 (format: YUG + year + 5-digit number)registration_completeThen bot sends:
┌────────────────────────────────────────┐
│ 🎉 Registration Successful! │
│ │
│ Welcome to Yugam 2026, Rajesh! 🚀 │
│ │
│ Your Yugam ID: YUG2600001 │
│ │
│ Save this ID - you'll need it for │
│ team registrations! │
│ │
│ Confirmation sent to your email. │
└────────────────────────────────────────┘
Then immediately shows Main Menu (see below)
After successful registration OR when existing user says “Hi”:
Bot sends:
┌────────────────────────────────────────┐
│ 👋 Welcome to Yugam 2026! │
│ │
│ What would you like to do? │
│ │
│ [📅 Browse Events] │
│ [🎓 Browse Workshops] │
│ [🎟️ Buy General Pass] │
└────────────────────────────────────────┘
Then immediately sends:
┌────────────────────────────────────────┐
│ Or manage your account: │
│ │
│ [📝 My Registrations] │
│ [👥 My Teams] │
│ [👤 My Profile] │
└────────────────────────────────────────┘
User’s phone state changes to: idle
Bot sends:
┌────────────────────────────────────────┐
│ 📅 Browse Events │
│ │
│ Select a category: │
│ [View Events ▼] │
│ │
│ When clicked, shows list: │
│ • 🎟️ General Events │
│ • 🎯 Specific Events │
│ • 🌟 All Events │
└────────────────────────────────────────┘
What happens internally:
browsing_eventsNote on Event Types:
What bot does:
Bot sends:
┌────────────────────────────────────────┐
│ 🎯 Specific Events │
│ │
│ Select an event: │
│ [View Event ▼] │
│ │
│ When clicked, shows: │
│ 1. Code Marathon │
│ ₹200 • Feb 15, 2026 │
│ │
│ 2. Hackathon 24hrs │
│ ₹500 • Feb 16, 2026 │
│ │
│ 3. AI/ML Workshop │
│ ₹300 • Feb 17, 2026 │
│ │
│ ... (up to 10 events) │
└────────────────────────────────────────┘
What happens internally:
browsing_eventsWhat bot does:
Bot sends:
┌────────────────────────────────────────┐
│ 📅 Code Marathon (Specific) │
│ │
│ 48-hour coding challenge where │
│ teams build innovative solutions... │
│ │
│ 📍 Venue: CSE Lab │
│ 📅 Date: Feb 15, 2026 │
│ ⏰ Time: 9:00 AM │
│ 💰 Fee: ₹200 │
│ 👥 Team Size: 2-4 members │
│ 🎯 Type: Specific Event │
│ │
│ 📄 Rules: [link] │
│ │
│ Ready to register? │
│ │
│ [✅ Register Now] │
│ [◀️ Back to Events] │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
What happens internally:
specific_event_detailsWhat bot does:
If user HAS General Event Pass:
Bot sends:
┌────────────────────────────────────────┐
│ 📅 College Fest Day (General) │
│ │
│ Join the opening ceremony and │
│ various cultural activities... │
│ │
│ 📍 Venue: Main Auditorium │
│ 📅 Date: Feb 15, 2026 │
│ ⏰ Time: 10:00 AM │
│ 💰 Fee: ✅ Already Purchased │
│ (General Event Pass) │
│ 👥 Entry: Individual │
│ 🎯 Type: General Event │
│ │
│ You have a valid General Event Pass! │
│ │
│ [✅ Register Now] │
│ [◀️ Back to Events] │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
If user DOES NOT have General Event Pass:
Bot sends:
┌────────────────────────────────────────┐
│ 📅 College Fest Day (General) │
│ │
│ Join the opening ceremony and │
│ various cultural activities... │
│ │
│ 📍 Venue: Main Auditorium │
│ 📅 Date: Feb 15, 2026 │
│ ⏰ Time: 10:00 AM │
│ 💰 Fee: Requires General Pass │
│ (₹2999 for all general events) │
│ 👥 Entry: Individual │
│ 🎯 Type: General Event │
│ │
│ Purchase General Event Pass to │
│ attend this and all general events! │
│ │
│ [🎟️ Buy General Pass] │
│ [◀️ Back to Events] │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
What happens internally:
general_event_detailsNote: No login check needed - user is already on WhatsApp bot!
What bot does:
If event has before_payment_form = true:
Bot sends:
┌────────────────────────────────────────┐
│ 📝 Registration Form │
│ │
│ Please answer a few questions │
│ before we proceed: │
│ │
│ Question 1: What is your t-shirt │
│ size? (S/M/L/XL/XXL) │
└────────────────────────────────────────┘
User replies: L
Bot sends:
┌────────────────────────────────────────┐
│ Question 2: Any dietary │
│ restrictions? (Yes/No) │
└────────────────────────────────────────┘
User replies: No
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Form Completed! │
│ │
│ Your answers: │
│ • T-shirt size: L │
│ • Dietary restrictions: No │
│ │
│ Proceeding to registration... │
└────────────────────────────────────────┘
What happens internally:
collecting_form_dataAfter form completion (or if no form), bot creates registration record
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Registration Created! │
│ │
│ Event: Code Marathon │
│ Registration ID: REG123456 │
│ Fee: ₹200 │
│ │
│ Would you like to proceed to │
│ payment? │
│ │
│ [💳 Proceed to Payment] │
│ [❌ Cancel] │
└────────────────────────────────────────┘
What happens internally:
If user clicks “Proceed to Payment”:
If user has General Event Pass:
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Registration Confirmed! │
│ │
│ Event: College Fest Day │
│ Registration ID: REG123456 │
│ Fee: ✅ Covered by General Pass │
│ │
│ You're all set! No payment needed. │
│ │
│ Event Details: │
│ 📅 Feb 15, 2026 │
│ ⏰ 10:00 AM │
│ 📍 Main Auditorium │
│ │
│ Show your General Pass QR at entry. │
│ │
│ [🏠 Main Menu] │
│ [📅 Browse More Events] │
└────────────────────────────────────────┘
What happens internally:
idleIf user does NOT have General Event Pass:
Bot sends:
┌────────────────────────────────────────┐
│ 🎟️ General Event Pass Required │
│ │
│ To attend "College Fest Day" and │
│ ALL other general events, purchase │
│ the General Event Pass! │
│ │
│ Price: ₹2999 │
│ Valid: Feb 15-18, 2026 │
│ │
│ Includes access to: │
│ ✓ All General Events │
│ ✓ Opening & Closing Ceremonies │
│ ✓ Cultural Activities │
│ │
│ Would you like to purchase? │
│ │
│ [🛒 Buy General Pass] │
│ [❌ Cancel] │
└────────────────────────────────────────┘
What happens internally:
buying_general_passIf user clicks “Buy General Pass”:
Team Event = Requires 2+ members
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Team Formation │
│ │
│ Event: Code Marathon │
│ Team Size: 2-4 members │
│ │
│ You are the team leader. │
│ │
│ How to add members: │
│ Send Yugam IDs of your team members │
│ separated by commas. │
│ │
│ Example: YUG2600002, YUG2600003 │
│ │
│ Or type "skip" to register alone │
│ (if minimum is 1). │
└────────────────────────────────────────┘
What happens internally:
team_formationAfter payment success message is sent, bot checks event details:
What bot checks internally:
team_size > 1 (indicates team event)If team_size > 1 (Team Event):
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Team Event Detected │
│ │
│ "Code Marathon" is a team event! │
│ Team Size: 4 members │
│ │
│ You have already paid and registered.│
│ │
│ Would you like to create a team? │
│ │
│ [✅ Yes, Create Team] │
│ [❌ No, Skip] │
└────────────────────────────────────────┘
What happens internally:
team_creation_promptIf user clicks “No, Skip”:
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Registration Complete │
│ │
│ You can create a team later via │
│ "My Teams" option in the main menu. │
│ │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
What happens internally:
idleIf user clicks “Yes, Create Team”:
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Create Your Team │
│ │
│ Event: Code Marathon │
│ Team Size: 4 members (including you) │
│ │
│ You are the team leader. │
│ │
│ Please send Yugam IDs of your │
│ 3 team members separated by commas. │
│ │
│ Example: YUG2600002, YUG2600003, YUG2600004│
│ │
│ ⚠️ Important: All members must have │
│ registered and paid for this event. │
└────────────────────────────────────────┘
What happens internally:
collecting_team_membersUser sends: YUG2600002, YUG2600003, YUG2600004, YUG2600005, YUG2600006
What bot does:
Bot sends:
┌────────────────────────────────────────┐
│ ⚠️ Extra IDs detected │
│ │
│ Team size is 4 members. │
│ You sent 5 IDs. Only considering │
│ first 3 members. │
│ │
│ Validating: YUG2600002, YUG2600003, │
│ YUG2600004 │
└────────────────────────────────────────┘
Then bot validates each member:
Scenario 1: All members valid (SPECIFIC Event)
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Rahul Kumar (YUG2600002) │
│ Status: ✅ Registered & Paid │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ✅ Priya Sharma (YUG2600003) │
│ Status: ✅ Registered & Paid │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ✅ Amit Patel (YUG2600004) │
│ Status: ✅ Registered & Paid │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ 🎉 Team Validated Successfully! │
│ │
│ Event: Code Marathon │
│ Team Size: 4 members │
│ │
│ Team Members: │
│ 1. You (Leader) - ✅ Paid │
│ 2. Rahul Kumar - ✅ Paid │
│ 3. Priya Sharma - ✅ Paid │
│ 4. Amit Patel - ✅ Paid │
│ │
│ All members have paid! Creating team...│
└────────────────────────────────────────┘
Bot then sends:
┌────────────────────────────────────────┐
│ ✅ Team Created Successfully! │
│ │
│ Team ID: TEAM001 │
│ Event: Code Marathon │
│ │
│ All team members have been notified. │
│ │
│ Event Details: │
│ 📅 Feb 15, 2026 │
│ ⏰ 9:00 AM │
│ 📍 CSE Lab │
│ │
│ All the best! 🚀 │
│ │
│ [🏠 Main Menu] │
│ [👥 My Teams] │
└────────────────────────────────────────┘
What happens internally:
idleScenario 2: Some members haven’t paid (SPECIFIC Event)
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Rahul Kumar (YUG2600002) │
│ Status: ✅ Registered & Paid │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ❌ Priya Sharma (YUG2600003) │
│ Status: ⚠️ Not Registered/Paid │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ❌ Amit Patel (YUG2600004) │
│ Status: ⚠️ Not Registered/Paid │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ⚠️ Team Creation Failed │
│ │
│ The following members have not │
│ registered or paid for this event: │
│ │
│ • YUG2600003 (Priya Sharma) │
│ • YUG2600004 (Amit Patel) │
│ │
│ Please ask them to: │
│ 1. Message this WhatsApp bot │
│ 2. Browse Events → Code Marathon │
│ 3. Register and complete payment │
│ │
│ After they complete payment, you can │
│ create the team via "My Teams" menu. │
│ │
│ [🏠 Main Menu] │
│ [👥 My Teams] │
└────────────────────────────────────────┘
What happens internally:
idleScenario 3: General Event - Members need General Pass
If this is a GENERAL event:
Bot checks if all members have General Pass valid for event date.
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Rahul Kumar (YUG2600002) │
│ Status: ✅ Has General Pass │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ❌ Priya Sharma (YUG2600003) │
│ Status: ⚠️ No General Pass │
└────────────────────────────────────────┘
┌────────────────────────────────────────┐
│ ⚠️ Team Creation Failed │
│ │
│ The following members don't have │
│ General Event Pass for this date: │
│ │
│ • YUG2600003 (Priya Sharma) │
│ │
│ Please ask them to: │
│ 1. Message this WhatsApp bot │
│ 2. Buy General Event Pass (₹2999) │
│ 3. Then register for this event │
│ │
│ After they purchase, you can create │
│ the team via "My Teams" menu. │
│ │
│ [🏠 Main Menu] │
│ [👥 My Teams] │
└────────────────────────────────────────┘
What happens internally:
idleAfter user clicks “Proceed to Payment”:
Bot sends:
┌────────────────────────────────────────┐
│ 💳 Payment Link Generated │
│ │
│ Event: Code Marathon │
│ Amount: ₹200 │
│ Registration ID: REG123456 │
│ │
│ Click to pay securely: │
│ https://yugam.in/pay/REG123456 │
│ │
│ • Powered by Razorpay │
│ • 100% secure payment │
│ • Instant confirmation │
│ │
│ Link expires in 24 hours. │
└────────────────────────────────────────┘
What happens internally:
https://yugam.in/pay/{registration_id}awaiting_paymentUser Journey:
https://yugam.in/payment/success?registration_id=REG123456https://yugam.in/payment/failed?registration_id=REG123456Razorpay Webhook Flow:
https://api.yugam.in/api/v1/payments/razorpay-webhookAfter successful payment (via webhook):
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Payment Successful! │
│ │
│ Event: Code Marathon │
│ Amount Paid: ₹200 │
│ Payment ID: pay_MfG123abc456 │
│ │
│ Registration Status: ✅ Confirmed │
│ │
│ Your Yugam ID: YUG2600001 │
│ Registration ID: REG123456 │
│ │
│ Event Details: │
│ 📅 Feb 15, 2026 │
│ ⏰ 9:00 AM │
│ 📍 CSE Lab │
│ │
│ Receipt sent to your email. │
│ │
│ See you at the event! 🎉 │
│ │
│ [🏠 Main Menu] │
│ [📝 My Registrations] │
└────────────────────────────────────────┘
What happens internally:
idleAfter user clicks “Buy General Pass”:
Bot sends:
┌────────────────────────────────────────┐
│ 💳 Payment Link Generated │
│ │
│ Product: General Event Pass │
│ Amount: ₹2999 │
│ Pass ID: GPASS123456 │
│ │
│ Click to pay securely: │
│ https://yugam.in/pay/GPASS123456 │
│ │
│ • Powered by Razorpay │
│ • Unlimited access to all general │
│ events (Feb 15-18, 2026) │
│ • Instant QR code delivery │
│ │
│ Link expires in 24 hours. │
└────────────────────────────────────────┘
After successful payment (via webhook):
Bot sends:
┌────────────────────────────────────────┐
│ 🎉 General Pass Activated! │
│ │
│ Pass ID: GPASS123456 │
│ Valid: Feb 15-18, 2026 │
│ Amount Paid: ₹2999 │
│ │
│ Your all-access QR code: │
│ [QR Code Image Sent] │
│ │
│ ✅ You can now attend: │
│ • All General Events │
│ • Opening & Closing Ceremonies │
│ • Cultural Activities │
│ │
│ Register for individual general │
│ events via the bot - no payment │
│ needed! │
│ │
│ Have an amazing Yugam 2026! 🎊 │
│ │
│ [🏠 Main Menu] │
│ [📅 Browse Events] │
└────────────────────────────────────────┘
Bot also sends QR code image with Pass ID embedded.
What happens internally:
idleWebhook URL: https://api.yugam.in/api/v1/payments/razorpay-webhook
Events to Subscribe:
payment.captured (payment successful)payment.failed (payment failed)order.paid (order completed)Webhook Handler Logic:
signature = HMAC-SHA256(webhook_secret, request_body)
if signature != request.headers['X-Razorpay-Signature']:
return 401 Unauthorized
Webhook Response Time: < 2 seconds (must respond quickly to Razorpay)
Exactly same flow as Events, but for workshops:
Note: Combo offers have been removed. Users should either:
Bot sends:
┌────────────────────────────────────────┐
│ 🎟️ General Event Pass │
│ │
│ Get unlimited access to ALL Yugam │
│ 2026 events! │
│ │
│ What's Included: │
│ ✓ All Technical Events │
│ ✓ All Cultural Events │
│ ✓ All Sports Events │
│ ✓ All Workshops │
│ ✓ Opening & Closing Ceremonies │
│ │
│ Price: ₹2999 │
│ (Save over ₹5000!) │
│ │
│ Valid: Feb 15-18, 2026 │
│ │
│ [🛒 Buy Now] │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
What happens internally:
buying_general_passIf NOT logged in:
If logged in:
Bot sends:
┌────────────────────────────────────────┐
│ ✅ Confirm Purchase │
│ │
│ General Event Pass │
│ Price: ₹2999 │
│ │
│ This gives you access to ALL events. │
│ │
│ Proceed with purchase? │
│ │
│ [✅ Confirm] [❌ Cancel] │
└────────────────────────────────────────┘
If user clicks “Confirm”:
After payment:
┌────────────────────────────────────────┐
│ 🎉 General Pass Activated! │
│ │
│ Your all-access pass is ready! │
│ │
│ Pass ID: GP26001 │
│ Valid: Feb 15-18, 2026 │
│ │
│ Show this at any event entrance: │
│ [QR Code Image] │
│ │
│ You can now attend ANY event │
│ without individual registration! │
│ │
│ Have an amazing Yugam 2026! 🎊 │
└────────────────────────────────────────┘
What happens internally:
If NOT logged in:
If logged in:
What bot does:
Bot sends:
┌────────────────────────────────────────┐
│ 📝 Your Registrations │
│ │
│ 1. Code Marathon │
│ Status: ✅ Confirmed │
│ Payment: ✅ Paid │
│ │
│ 2. AI Workshop │
│ Status: ⏳ Pending │
│ Payment: ❌ Pending │
│ │
│ 3. Dance Competition │
│ Status: ✅ Confirmed │
│ Payment: ✅ Paid │
│ │
│ What next? │
│ │
│ [🏠 Main Menu] │
│ [📅 Browse Events] │
└────────────────────────────────────────┘
What happens internally:
my_registrationsIf user has pending payments:
What bot does:
Scenario A: User has teams AND can create more
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Your Teams │
│ │
│ Existing Teams: │
│ │
│ Team 1: Code Warriors (Leader) │
│ Event: Code Marathon │
│ Members: 4 │
│ • You │
│ • Rahul Kumar │
│ • Priya Sharma │
│ • Amit Patel │
│ Status: ✅ Confirmed │
│ │
│ Team 2: Dance Squad (Member) │
│ Event: Dance Competition │
│ Leader: Amit Patel │
│ Members: 6 people │
│ Status: ✅ Confirmed │
│ │
│ ──────────────────────────────────── │
│ │
│ ✨ You can create teams for: │
│ │
│ • Hackathon 24hrs │
│ │
│ Would you like to create a team? │
│ │
│ [✅ Create Team] │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
What happens internally:
my_teamsIf user clicks “Create Team”:
What bot does:
Bot sends (if multiple eligible events):
┌────────────────────────────────────────┐
│ 👥 Select Event for Team │
│ │
│ Choose which event you want to │
│ create a team for: │
│ [View Events ▼] │
│ │
│ When clicked, shows: │
│ • Hackathon 24hrs (Feb 16) │
│ • Robotics Challenge (Feb 18) │
└────────────────────────────────────────┘
User selects “Hackathon 24hrs”
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Create Team for Hackathon 24hrs │
│ │
│ Team Size: 4 members (including you) │
│ │
│ You are the team leader. │
│ You have already paid for this event.│
│ │
│ Please send Yugam IDs of your │
│ 3 team members separated by commas. │
│ │
│ Example: YUG2600002, YUG2600003, YUG2600004│
│ │
│ ⚠️ Important: All members must have │
│ registered and paid for this event. │
└────────────────────────────────────────┘
What happens internally:
collecting_team_membersThen follows same validation flow as Step 7 above:
Scenario B: User has teams but NOT eligible to create more
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Your Teams │
│ │
│ Team 1: Code Warriors (Leader) │
│ Event: Code Marathon │
│ Members: 4 │
│ • You │
│ • Rahul Kumar │
│ • Priya Sharma │
│ • Amit Patel │
│ Status: ✅ Confirmed │
│ │
│ Team 2: Dance Squad (Member) │
│ Event: Dance Competition │
│ Leader: Amit Patel │
│ Members: 6 people │
│ Status: ✅ Confirmed │
│ │
│ You have no pending team events. │
│ │
│ [🏠 Main Menu] │
│ [📅 Browse Events] │
└────────────────────────────────────────┘
What happens internally:
my_teamsScenario C: User has NO teams but IS eligible to create
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Your Teams │
│ │
│ You haven't created any teams yet. │
│ │
│ ──────────────────────────────────── │
│ │
│ ✨ You can create teams for: │
│ │
│ • Code Marathon (Feb 15) │
│ • Hackathon 24hrs (Feb 16) │
│ │
│ Would you like to create a team? │
│ │
│ [✅ Create Team] │
│ [🏠 Main Menu] │
└────────────────────────────────────────┘
What happens internally:
Scenario D: User has NO teams and NOT eligible
Bot sends:
┌────────────────────────────────────────┐
│ 👥 Your Teams │
│ │
│ You haven't joined or created any │
│ teams yet. │
│ │
│ Register for team events to create │
│ or join teams! │
│ │
│ [🏠 Main Menu] │
│ [📅 Browse Events] │
└────────────────────────────────────────┘
What happens internally:
my_teamsUser is eligible to create a team if:
For Specific Event:
For General Event:
Bot Query Logic:
SELECT events WHERE:
- event has registration by user
- payment_status = 'paid'
- team_size > 1
- user NOT in any team for this event
- event_date >= today
If NOT logged in:
If logged in:
What bot does:
Bot sends:
┌────────────────────────────────────────┐
│ 👤 Your Profile │
│ │
│ Name: Rajesh Kumar │
│ Yugam ID: YUG2600001 │
│ Email: rajesh@example.com │
│ Phone: 9876543210 │
│ │
│ College: PSG College of Technology │
│ Department: Computer Science │
│ Year: 2nd Year │
│ │
│ What next? │
│ │
│ [🏠 Main Menu] │
│ [📝 My Registrations] │
└────────────────────────────────────────┘
What happens internally:
my_profileThis happens when user clicks “Continue with WhatsApp” on website.
Website shows:
┌────────────────────────────────────────┐
│ Login to Yugam 2026 │
│ │
│ [🔵 Continue with Google] │
│ [🔵 Continue with Microsoft] │
│ [🟢 Continue with WhatsApp] │
└────────────────────────────────────────┘
User clicks “Continue with WhatsApp”
This step only appears when accessing from Desktop/Laptop
Website shows popup:
┌────────────────────────────────────────┐
│ Enter Your Phone Number │
│ │
│ We'll send you a WhatsApp message │
│ to verify your identity. │
│ │
│ +91 [__________] │
│ │
│ [Cancel] [Continue] │
└────────────────────────────────────────┘
User enters: 9876543210
What happens internally:
This happens when accessing from Mobile Device
What happens:
What happens internally:
if (isMobile) {
// Direct WhatsApp link
window.location.href = 'https://wa.me/919876543210?text=Hi%20Yugam%2C%20Help%20me%20Sign%20in!'
} else {
// Show phone input modal
showPhoneModal()
}
What happens:
User sends the message
What bot does:
yugam.in/auth/whatsapp/verify?token=abc123Bot sends:
┌────────────────────────────────────────┐
│ Welcome to Yugam 2026! 🎉 │
│ │
│ Click to login: │
│ https://yugam.in/ │
│ auth/whatsapp/verify?token=abc123 │
│ │
│ ✓ Track your registrations │
│ ✓ Access exclusive deals │
│ │
│ Link expires in 5 minutes. │
└────────────────────────────────────────┘
What happens:
If user exists in database:
Website shows:
┌────────────────────────────────────────┐
│ ✅ Login Successful! │
│ │
│ Redirecting to dashboard... │
└────────────────────────────────────────┘
If user is NEW:
Website shows:
┌────────────────────────────────────────┐
│ 👋 Welcome! Let's create your account │
│ │
│ Redirecting to registration... │
└────────────────────────────────────────┘
States are like memory - bot remembers what conversation stage you’re at.
| State | Meaning | What Bot Expects |
|---|---|---|
new_user |
First time user detected | Automatically starts registration |
registration_start |
Starting registration | Bot begins asking questions |
collecting_name |
Asking for name | User to send full name |
collecting_email |
Asking for Gmail ID | User to send Gmail address |
collecting_college |
Asking for college | User to select from list or type “Other” |
collecting_department |
Asking for department | User to select from list or type “Other” |
collecting_year |
Asking for year | User to select year of study |
registration_summary |
Showing summary | User to confirm or edit details |
registration_complete |
Registration done | Proceeding to main menu |
idle |
User registered, waiting | User to send menu command |
browsing_events |
Looking at events | User to select category (general/specific/all) |
specific_event_details |
Viewing specific event | User to click Register/Back/Menu |
general_event_details |
Viewing general event | User to click Register/Buy Pass/Back/Menu |
browsing_workshops |
Looking at workshops | User to select category or workshop |
workshop_details |
Viewing specific workshop | User to click Register/Back/Menu |
collecting_form_data |
Collecting before-payment form | User to answer form questions |
registration_confirmation |
Confirming registration | User to confirm or cancel |
team_formation |
Adding team members | User to send Yugam IDs (checks payment status) |
awaiting_payment |
Waiting for payment | Payment to complete via Razorpay |
my_registrations |
Viewing registrations | User to click Menu or Browse |
my_teams |
Viewing teams | User to click Menu |
my_profile |
Viewing profile | User to click Menu |
buying_general_pass |
Buying general pass | User to confirm purchase |
Example 1: Registration Flow
collecting_email stateExample 2: Team Formation
team_formation stateWithout states:
1. User sends "Hi" on WhatsApp for FIRST TIME
→ Bot: Checks database → User NOT found
→ Bot: "Welcome! You haven't registered yet. Let's create your account!"
2. Bot: "What is your full name?"
→ User: "Rajesh Kumar"
→ Bot: Saves name
3. Bot: "What is your Gmail ID?"
→ User: "rajesh@gmail.com"
→ Bot: Validates format ✅
→ Bot: Saves email
4. Bot: Shows college list from database (ALL colleges with search)
→ User: Types "PSG" in search
→ Filtered list shows PSG colleges
→ User: Selects "PSG College of Technology"
→ Bot: Saves college_id = 5
5. Bot: Shows department list from database (ALL departments with search)
→ User: Types "Computer" in search
→ Filtered list shows CS-related departments
→ User: Selects "Computer Science Engineering"
→ Bot: Saves department_id = 1
6. Bot: Shows year options
→ User: Selects "2nd Year"
→ Bot: Saves year
7. Bot: Shows summary of all details
→ "Is this correct? [Confirm] [Edit]"
→ User: Clicks "Confirm"
8. Bot: Creates user account immediately
→ Bot: Generates Yugam ID: YUG2600001
→ Bot: "Registration successful! Your Yugam ID: YUG2600001"
9. Bot: Shows Main Menu
→ User can now browse events, workshops, etc.
DONE! User registered and ready to participate.
1. User sends "Hi" on WhatsApp (already registered before)
→ Bot: Checks database → User FOUND
→ Bot: "Hi Rajesh Kumar! Welcome back to Yugam 2026!"
→ Bot: Shows Yugam ID: YUG2600001
2. Bot: Shows Main Menu immediately
→ No registration needed
→ User can browse and register for events
DONE! Quick access for returning users.
1. User sends "Hi" on WhatsApp
→ Bot: Welcome menu
2. User clicks "Browse Events"
→ Bot: Shows categories (General/Specific/All)
3. User selects "Specific Events"
→ Bot: Shows 5 specific events
4. User selects "Code Marathon" (team event)
→ Bot: Shows event details with Register button
5. User clicks "Register Now"
→ Bot: Checks if event has before-payment form
→ No form → Proceeds to registration
6. Bot: "Registration created! Proceed to payment?"
→ User clicks "Proceed to Payment"
7. Bot sends Razorpay payment link (₹200)
→ User clicks link, pays on website
8. Payment successful → Razorpay webhook triggers
→ Bot: "✅ Payment successful!"
9. Bot checks team_size > 1 (it's 4)
→ Bot: "This is a team event. Create team?"
10. User clicks "Yes, Create Team"
→ Bot: "Send 3 Yugam IDs (team size is 4)"
11. User sends "YUG2600002, YUG2600003, YUG2600004"
→ Bot validates each member:
→ Checks if they registered & paid for Code Marathon
12. All 3 members have paid:
→ Bot: "✅ Team validated! Creating team..."
13. Bot creates team in database
→ Bot: "🎉 Team created! Team ID: TEAM001"
→ All 4 members get WhatsApp notification
DONE! User registered individually, paid, then created team.
1. User (already logged in before) sends "Hi"
→ Bot: Welcome menu
2. User clicks "Browse Workshops"
→ Bot: Categories
3. User selects "AI Workshop"
→ Bot: Workshop details
4. User clicks "Register Now"
→ Bot: "Confirm ₹300?" (individual, no team needed)
5. User clicks "Confirm"
→ Bot: Payment link
6. User pays
→ Bot: "✅ Registration complete!"
DONE! Quick registration in 6 steps.
1. User sends "Hi"
→ Bot: Welcome menu
2. User clicks "Buy General Pass"
→ Bot: Shows pass details (₹2999, all events)
3. User clicks "Buy Now"
→ Bot: "Confirm purchase?"
4. User clicks "Confirm"
→ Bot: Payment link
5. User pays via Razorpay
→ Webhook: Payment successful
→ Bot: "🎉 Pass activated!" + QR code sent
DONE! User can now attend all general events.
1. User already paid for "Hackathon 24hrs" yesterday
→ But didn't create team yet
2. User sends "Hi"
→ Bot: Welcome menu
3. User clicks "My Teams"
→ Bot checks eligibility
→ User has paid for Hackathon (team event)
→ No team created yet
4. Bot shows:
→ "You can create teams for: Hackathon 24hrs"
→ [Create Team] button
5. User clicks "Create Team"
→ Bot: "Send 3 Yugam IDs"
6. User sends "YUG2600002, YUG2600003, YUG2600004, YUG2600005"
→ Bot: "Team size is 4, taking only first 3 IDs"
7. Bot validates:
→ YUG2600002: ✅ Paid
→ YUG2600003: ❌ Not paid
→ YUG2600004: ✅ Paid
8. Bot: "Team creation failed! YUG2600003 hasn't paid."
→ "Ask them to register and pay first."
9. User contacts Priya (YUG2600003)
→ Priya registers and pays
10. User goes to "My Teams" again
→ Clicks "Create Team" for Hackathon
11. User sends "YUG2600002, YUG2600003, YUG2600004"
→ Bot validates: All 3 have paid ✅
12. Bot: "🎉 Team created! Team ID: TEAM002"
→ All members notified
DONE! Team created successfully after all members paid.
What happens:
Bot sends:
┌────────────────────────────────────────┐
│ ⏰ Payment Reminder │
│ │
│ Your registration for Code Marathon │
│ is pending payment. │
│ │
│ Complete payment to confirm: │
│ [Payment Link] │
│ │
│ Registration expires in 24 hours. │
└────────────────────────────────────────┘
What happens:
Bot sends:
┌────────────────────────────────────────┐
│ ⏰ Event Tomorrow! │
│ │
│ Code Marathon is tomorrow! │
│ │
│ 📅 Date: Feb 15, 2026 │
│ ⏰ Time: 9:00 AM │
│ 📍 Venue: CSE Lab │
│ │
│ Team: │
│ • You (Leader) │
│ • Rahul Kumar │
│ • Priya Sharma │
│ │
│ All the best! 🎉 │
└────────────────────────────────────────┘
User tries to create team but one member hasn’t paid:
Bot sends:
┌────────────────────────────────────────┐
│ ⚠️ Team Creation Failed │
│ │
│ YUG2600003 (Priya Sharma) hasn't │
│ registered or paid for this event. │
│ │
│ Ask them to register and pay via │
│ this WhatsApp bot. │
│ │
│ You can create the team later via │
│ "My Teams" option after they pay. │
└────────────────────────────────────────┘
What happens:
User sends: “What is the prize money?”
What bot does:
event_details state: Tries to answer about current eventidle state: Shows main menuBot sends:
┌────────────────────────────────────────┐
│ I don't understand that command. │
│ │
│ Type "menu" for main menu or │
│ "help" for assistance. │
└────────────────────────────────────────┘
You can build a web-based chat dashboard to monitor and manage all WhatsApp bot conversations - similar to Interakt, WATI, or Zoko, but custom-built for Yugam.
What You Can Track:
Think of it as: WhatsApp Web for your bot + CRM features
Core Idea:
Every time a message is sent or received via WhatsApp Cloud API:
Your backend becomes the system of record for all conversations.
┌──────────┐ ┌──────────────┐ ┌─────────────┐
│ User │ ─────→ │ WhatsApp │ ─────→ │ Your Server │
│ │ │ Cloud API │ │ (Backend) │
└──────────┘ └──────────────┘ └─────────────┘
│
│ Saves
↓
┌─────────────┐
│ Database │
│ Messages │
└─────────────┘
│
│ Fetches
↓
┌─────────────┐
│ Web UI │
│ Dashboard │
└─────────────┘
Detailed Flow:
Incoming Message:
User sends "Hi" on WhatsApp
→ Meta Cloud API receives it
→ Sends to your webhook
→ Your server processes & saves to database
→ Bot logic responds
→ Response also saved to database
→ Dashboard UI auto-updates (real-time)
Outgoing Message (Agent Reply):
Admin types reply in dashboard
→ Server sends via WhatsApp Cloud API
→ Saves outgoing message to database
→ WhatsApp delivers to user
→ Status updates shown in UI (sent → delivered → read)
Two main tables needed:
Table: tbl_whatsapp_messages
Table: tbl_whatsapp_sessions
API endpoints to:
Web UI showing:
┌─────────────────────────────────────────────────────────────┐
│ 🏠 Yugam WhatsApp Dashboard [Profile] [Logout] │
├──────────────────┬──────────────────────────────────────────┤
│ Conversations │ Chat: Rajesh Kumar (+919876543210) │
│ ───────────── │ ───────────────────────────────────────│
│ │ │
│ 🔍 Search... │ [User] 10:30 │
│ │ Hi │
│ ┌──────────────┐ │ │
│ │ Rajesh Kumar │ │ [Bot] 10:30 │
│ │ YUG2600001 ● │ │ Welcome to Yugam 2026! │
│ │ Hi... │ │ What would you like to do? │
│ │ 2 mins ago │ │ │
│ └──────────────┘ │ [Browse Events] [Workshops] │
│ │ │
│ ┌──────────────┐ │ [User] 10:32 │
│ │ Priya Sharma │ │ Browse Events │
│ │ YUG2600002 │ │ │
│ │ Payment pend │ │ [Bot] 10:32 │
│ │ 5 mins ago │ │ Select category: General/Specific │
│ └──────────────┘ │ │
│ │ [User] 10:33 │
│ ┌──────────────┐ │ Specific Events │
│ │ Amit Patel │ │ │
│ │ YUG2600003 │ │ [Bot] 10:33 │
│ │ Team created │ │ Here are the specific events... │
│ │ 1 hour ago │ │ │
│ └──────────────┘ │ ─────────────────────────────────────── │
│ │ 💬 Type message... [Send] │
│ [Filters ▼] │ │
├──────────────────┴──────────────────────────────────────────┤
│ 📊 1,250 conversations | 🤖 Bot Active | ⏱ Avg: 2m │
└─────────────────────────────────────────────────────────────┘
Left Panel - Conversation List:
Right Panel - Chat Thread:
Bottom - Message Input:
┌────────────────────┐
│ User Info │
├────────────────────┤
│ 👤 Rajesh Kumar │
│ 🆔 YUG2600001 │
│ 📱 +9198765... │
│ │
│ Current State: │
│ 🔵 idle │
│ │
│ Last Activity: │
│ ⏰ 2 minutes ago │
│ │
│ Tags: │
│ 🏷️ [new_user] │
│ 🏷️ [paid] │
│ │
│ ──────────────────│
│ 📝 Registrations │
│ │
│ ✅ Code Marathon │
│ Paid: ₹200 │
│ Team: TEAM001 │
│ │
│ ✅ AI Workshop │
│ Paid: ₹300 │
│ Individual │
│ │
│ ⏳ Hackathon │
│ Payment Pending │
│ │
│ ──────────────────│
│ [View Full Profile]│
└────────────────────┘
This sidebar shows at-a-glance:
┌─────────────────────────────────────────────────────┐
│ User Journey │
└─────────────────────────────────────────────────────┘
User Message Bot Response Dashboard Shows
──────────── ──────────── ───────────────
"Hi" ──────────→ [Processing] ────────→ 📱 New message
│ from +9198765...
↓
Welcome Menu ─────────→ 💬 Bot replied
[Buttons] with main menu
↓
Click "Browse [Processing] ────────→ 🔵 State changed:
Events" ────────→ browsing_events
↓
Event List ───────────→ 💬 Bot sent
[Categories] event categories
↓
Select Event Details ────────→ 💬 User viewing
"Code Marathon"→ [Register Now] Code Marathon
↓
Click Payment Link ─────────→ ⏳ State:
"Register" ─────→ awaiting_payment
↓
Payment Success! ─────────────→ ✅ Payment confirmed
Complete Dashboard updates
Along with conversations, you can show:
┌──────────────────────────────────────────┐
│ 📊 Bot Analytics │
├──────────────────────────────────────────┤
│ │
│ Total Conversations: 1,250 │
│ Active Today: 87 │
│ Pending Payments: 23 │
│ │
│ ──────────────────────────────────── │
│ │
│ By Bot State: │
│ • Idle: 500 │
│ • Browsing Events: 45 │
│ • Awaiting Payment: 23 │
│ • Team Formation: 12 │
│ │
│ ──────────────────────────────────── │
│ │
│ Response Time: │
│ Average: 2m 15s │
│ │
│ ──────────────────────────────────── │
│ │
│ Popular Events: │
│ 1. Code Marathon (145 registrations) │
│ 2. AI Workshop (98 registrations) │
│ 3. Hackathon (76 registrations) │
│ │
└──────────────────────────────────────────┘
✅ This Works With:
❌ Does NOT Work With:
Security:
Real-time Updates:
When a new message arrives:
Technology:
For Admins:
For Users:
You can build a dynamic web dashboard that shows:
Key Idea: Every message (in and out) is captured and stored, then displayed dynamically in a chat interface similar to WhatsApp Web.
USER SENDS "Hi"
↓
┌─────────────────────┐
│ Check if User │
│ Exists in Database │
└─────────────────────┘
↓
├─→ [User Exists]
│ ↓
│ Show Personalized Welcome
│ "Hi <Name>! Welcome back..."
│ ↓
│ MAIN MENU (Go to below)
│
└─→ [New User]
↓
┌──────────────────┐
│ REGISTRATION │
│ FLOW │
└──────────────────┘
↓
Ask Name
↓
Ask Gmail ID
↓
Show College List (ALL from DB + search)
User selects
↓
Show Department List (ALL from DB + search)
User selects
↓
Ask Year of Study
↓
Show Summary
User confirms
↓
Create Account Immediately
↓
Generate Yugam ID
↓
Show Success Message
↓
┌────────────────────┐
│ MAIN MENU │
│ (After Login/Reg) │
└────────────────────┘
↓
├─→ Browse Events
│ ↓
│ Select Type (General/Specific/All)
│ ↓
│ Select Event
│ ↓
│ View Details
│ ↓
│ [If General Event]
│ ↓
│ Check for General Pass
│ ├─→ Pass Exists → Register (No Payment)
│ └─→ No Pass → Offer to Buy Pass
│ ↓
│ [If Specific Event]
│ ↓
│ Register Now
│ ↓
│ Check for Before-Payment Form
│ ├─→ Form Exists → Collect Answers
│ └─→ No Form → Continue
│ ↓
│ Create Registration Record
│ ↓
│ [If Individual Event]
│ ↓
│ Proceed to Payment
│ ↓
│ [If Team Event]
│ ↓
│ Add Team Members
│ ↓
│ Check All Members Paid
│ ↓
│ Confirm Team
│ ↓
│ [Always]
│ ↓
│ Razorpay Payment
│ ↓
│ Webhook → Update DB
│ ↓
│ Send Confirmation
│ ↓
│ ✅ Confirmed
│
├─→ Browse Workshops
│ ↓
│ (Similar flow as Specific Events)
│ ↓
│ Check for Before-Payment Form
│ ↓
│ Payment → Confirmation
│
├─→ Buy General Pass
│ ↓
│ View Pass Details
│ ↓
│ Confirm Purchase
│ ↓
│ Razorpay Payment (₹2999)
│ ↓
│ Webhook → Generate QR
│ ↓
│ Send QR Code via WhatsApp
│ ↓
│ ✅ Pass Activated
│
├─→ My Registrations
│ ↓
│ Show all user's registrations
│ ↓
│ Back to Menu
│
├─→ My Teams
│ ↓
│ Show all user's teams
│ ↓
│ Back to Menu
│
└─→ My Profile
↓
Show user details
↓
Back to Menu
Registration Happens First
One-by-One Question Flow
College & Department from Database
Email Must Be Gmail
Immediate Account Creation
States = Conversation Memory
registration_start → collecting_email → registration_completePayment First, Team Later
Teams vs Individual
Payment Flow
General Pass is Special
Bot Never Forgets
Team Creation Rules
Razorpay Integration
| User Sees | What Actually Happens |
|---|---|
| “Hi” message sent | Bot checks database for phone number, determines new vs existing user |
| Personalized welcome | Bot fetched user name and Yugam ID from database |
| Registration questions one-by-one | Bot following state machine, saving each answer temporarily |
| College/Department searchable list | Bot queried database for ALL records, formatted as interactive list with search |
| Email validation error | Bot checked @gmail.com format, rejected other domains |
| “Creating Account” message | Bot immediately creating user record in database with all details |
| Yugam ID generated | Bot auto-incremented user ID in database (YUG + year + 5-digit number) |
| Buttons and lists | Bot checks database, formats data, sends interactive message |
| “Processing…” | Bot creating records in database, generating Razorpay links |
| Payment link | Bot generated Razorpay order, unique URL saved in database |
| “✅ Payment Successful” | Razorpay webhook received, database updated, confirmation triggered |
| “Create team?” prompt | Bot checked team_size > 1, asking after payment complete |
| Event details | Bot fetched from database, checked for general pass, formatted nicely |
| Team validation | Bot validates each ID, checks registrations, verifies payment status |
| “Team created!” | Bot created team record, linked all members, sent notifications via WhatsApp |
Status: Complete Logic Flow Guide ✅
Last Updated: January 2026
Version: 2.2
Major Updates in v2.2:
Major Updates in v2.1:
Major Updates in v2.0:
Perfect for: Product managers, testers, designers, non-technical stakeholders!