Tribo · Architecture Document · 2025–2026

Architecture & Integration
Diagram Reference

Six detailed technical diagrams — full ecosystem, bot state machine, CRM integration, technology stack, data architecture, and lead journey.

01
Full System Ecosystem
Meta → Fibot → CRM → Make → Lizto → WhatsApp
02
Bot State Machine
6-step flow + FAQ interception pattern
03
Lizto × Make Integration
Dual-path email + CSV architecture
04
Technology Stack Layers
6 layers · Zero-infrastructure overhead
05
CRM Data Architecture
1,888 records · Schema · Data flows
06
Lead Journey Map
Ad impression to advisor derivation
01

Full System Ecosystem Architecture

Meta Ads → Fibot Suite → Custom CRM → Make Automation → Lizto CRM → WhatsApp Advisor → Analytics Dashboard

The complete automation ecosystem showing all system components, data flows, and integration points. Gold arrows = active integrations. Dashed = planned or partial (70% complete).

META ADS 9 Active Campaigns One per service vertical Paid traffic source Meta Business Suite Direct ad → bot routing FIBOT AI SUITE 9 Bots · Cloudflare Pages · Groq LLM Deployed Bots: → Alectomia → Perfilamiento Labial → Rinomodelacion → Botox Full Face → Bichectomia → Correc. Ojeras + Surcos → Hydroxyfill + Jalupro 5.5 Groq LLM + Cloudflare Pages CDN State-Machine + FAQ Interceptor WHATSAPP ADVISOR Specialist derivation +57 350 248 0590 Pre-qualified lead delivered Photos · Name · Antecedents 24/7 availability CUSTOM CRM 1,888 Records · HTML Standalone Patient Profiles · Full-text search CSV Export (Lizto compatible) WhatsApp per record No backend · Cloudflare Pages Sort · Filter · Paginate (50/page) MAKE AUTOMATION Workflow Orchestration Engine Email Watch Module Parses booking notifications Extracts: name · service · date · phone Routes to CRM via HTTP connector Error handling + retry logic LIZTO CRM app.lizto.co Appointment management · POS No public API / webhooks available Integration: 70% complete CORPORATE WEBSITE Cloudflare Pages · Global CDN Service catalog · Video banner WhatsApp CTA · Fibot entry points Mobile responsive ANALYTICS DASHBOARD In Development Meta KPIs · Lizto data Bot activity · Attribution Unified patient journey Traffic Lead Lead Data Path A Path B (CSV) Production In Development WhatsApp Active Integration Planned / Partial (70%)
02

Fibot State-Machine Conversation Flow

Deterministic 6-Step Intake Protocol · FAQ Interception Pattern · repeatCurrentStep() Architecture

Core flow is hardcoded (zero AI hallucination risk). Groq LLM only handles FAQ resolution. The FAQ interceptor fires at any step and returns the user to their exact position — the pipeline is never interrupted.

START STEP 1 — GREETING Bienvenid@ · Dr. Esteban Pinto · Fibot identity STEP 2 — ANTECEDENTS Prior procedures? Hardcoded [Si] / [No] buttons No AI interpretation at this step No ↙ ↘ Si STEP 3 — TIME REFERENCE How long ago? Free text · Regex detection "No se" → does NOT advance step STEP 4 — PHOTO REQUEST Frente + Perfil (2 photos required) Reference image + upload zone always displayed PHOTO VALIDATION RULES Exactly 2 photos required to advance iOS Safari: input[type=file] fully visible (no opacity:0) STEP 5 — NAME COLLECTION Patient provides first name Blocklist: rejects "como","que","quien","cuanto" + interrogatives STEP 6 — WHATSAPP ADVISOR CARD Specialist derivation · +57 350 248 0590 ✓ LEAD CAPTURED · Pipeline complete FAQ INTERCEPTOR Fires at any step (01–05) TRIGGER FAQ keyword detected RESOLVE Groq LLM responds TONE Warm tone No bare si/no RETURN repeatCurrent Step() → Flow resumes no data lost
03

Lizto × Make — Dual-Path Integration

Path A: Email Interception (Primary · Automated) · Path B: CSV Export Sync (Secondary · Periodic)

Lizto has no public API. Tribo engineered two integration paths: automated email interception via Make for near-real-time sync, and CSV export/import for bulk synchronization. Status: 70% complete.

PATH A — EMAIL INTERCEPTION (PRIMARY · AUTOMATED) PATH B — CSV EXPORT SYNC (SECONDARY · PERIODIC) PATIENT Books appt Lizto UI app.lizto.co LIZTO Appointment saved → sends confirm email EMAIL INBOX Booking email received at clinic inbox MAKE Email Watch Trigger fires automatically LIZTO EXPORT Admin downloads CSV manually from Lizto UI FIELD MAPPING Lizto CSV → CRM schema + deduplication CRM IMPORT Bulk patient load · Periodic sync cycle EMAIL PARSER Extracts fields: patient_name service_line appt_date · phone CUSTOM CRM 1,888 Records · Unified DB HTML Standalone · No backend Search · Sort · Export · WhatsApp Lizto-compatible CSV export ADVISOR ALERT WhatsApp notification New patient record created ANALYTICS Patient metrics In development STATUS: 70% COMPLETE Path A ✓ Validated · Path B ✓ Validated · Real-time bridge: Final configuration in progress
04

Technology Stack — 6-Layer Architecture

Zero-Infrastructure-Overhead · Serverless · Global CDN · Optimized Operational Margins from Day One

Each layer of the system from infrastructure foundation (bottom) to business layer (top). Every component is serverless, stateless, or edge-deployed — eliminating dedicated server provisioning entirely.

← FOUNDATION (BOTTOM) ——————————————————————————————— BUSINESS LAYER (TOP) → 01 PRESENTATION + DEPLOYMENT LAYER HTML5 · CSS3 · Vanilla JS · Cloudflare Pages (300+ global edge nodes · 99.99% uptime) Single-file bot architecture · No framework · No build pipeline · Flat ZIP deployment · Sub-100ms TTFB · Zero infrastructure overhead Unlimited bandwidth · SSL automatic · Zero config · No origin server provisioning required 02 AI INFERENCE LAYER Groq API · llama-3.3-70b-versatile · ~500 tokens/second · Sub-300ms latency FAQ resolution only · Hardcoded state-machine handles all deterministic steps without API dependency Direct browser-to-API fetch · Service-specific context prompting per bot · No proxy server required 03 DATA LAYER Custom HTML CRM + Lizto CRM (app.lizto.co) · CSV pipeline · 1,888 patient records Custom CRM: leads, profiles, history, WhatsApp per record · Lizto: appointments, POS, inventory Dual-path sync (Path A email + Path B CSV) · Lizto-compatible CSV export · No backend dependency on either system 04 AUTOMATION LAYER Make (ex-Integromat) · Email Watch Module · HTTP Connector · Workflow Orchestration Engine Active scenario: Lizto email → parse → CRM record creation · Error handling + retry logic Visual scenario builder (no-code modification) · Planned: Meta Ads lead webhook → CRM sync 05 ANALYTICS LAYER (In Development) Centralized Dashboard · Meta Ads KPIs · Lizto Data · Bot Activity · Attribution Model Unified patient journey view from ad impression → click → bot → WhatsApp → appointment → conversion Pending: Meta Business Suite partner access · Lizto bridge completion 06 PAID MEDIA LAYER Meta Business Suite · Meta Ads Manager · 9 Active Campaigns · One per service vertical Direct ad → bot traffic routing · No intermediary landing page · Campaign-specific creative per vertical Full attribution: impression → click → Fibot → WhatsApp → appointment · Partner access pending
05

Custom CRM — Data Architecture

1,888 Patient Records · HTML Standalone · Patient Schema · Lizto CSV Compatible · Zero Backend

Data sources, patient record schema, system capabilities, and output channels. All functionality in a single HTML file — no server, no database, deployable anywhere.

DATA SOURCES FIBOT SUITE Lead capture data Name · Service WhatsApp context LIZTO CRM Appointment data Path A or Path B 70% integrated MANUAL IMPORT Historical records 1,888 initial load CSV drag & drop CUSTOM CRM CORE 1,888 Records · HTML · CSS · Vanilla JS PATIENT RECORD SCHEMA: → patient_id (unique key) → full_name → id_number → email → phone / cell → birthday → referral_source → service_history → crm_status SYSTEM FEATURES: ✓ Full-text search across all fields ✓ Multi-column sort · Service-line filter ✓ 50-record pagination SEARCH & FILTER Real-time text search Service-line · Status · Date Sort by any column WHATSAPP CONTACT Direct wa.me link per record Pre-filled message with name One tap → open WhatsApp CSV EXPORT Lizto-compatible format One-click download Periodic sync cycle LIZTO SYNC STATUS 70% Complete Path A (Make): Near real-time Path B (CSV): Periodic sync Real-time bridge: in progress 1,888 records migrated ✓
06

Meta Ads → Advisor — Complete Lead Journey

One Campaign · One Bot · One Advisor · Full Clinical Pre-Qualification Before First Human Contact

The end-to-end patient journey from Meta ad impression to advisor derivation. Every step is automated. Every advisor receives a pre-qualified lead package — clinical history, reference photos, and patient name captured before contact.

01 META AD IMPRESSION Service-specific ad creative Qualifies intent at scroll level CTA: Learn More 1 campaign per service vertical 02 FIBOT LANDING PAGE Cloudflare Pages Edge deployment Load time <100ms Service-matched dedicated bot 03 GREETING & CONTEXT Fibot identity established Service intro Trust signal: Dr. E. Pinto 04 ANTECEDENTS SCREENING Prior procedures? [Si] / [No] If Si: time ref captured (free text + regex) 05 PHOTO COLLECTION Reference image shown always Frente + Perfil 2 photos req. Re-prompt until both received 06 NAME CAPTURE Patient provides first name Blocklist rejects interrogative words as names 07 WHATSAPP DERIVATION Advisor card delivered +57 350 248 0590 Specialist per service vertical ✓ LEAD CAPTURED 08 ADVISOR RECEIVES Pre-qualified package ready Photos ✓ Antecedents ✓ Name ✓ Service ✓ 0 prep needed DATA COLLECTED THROUGH THE JOURNEY Service Intent → Clinical Antecedents → Time Reference → Reference Photos (x2) → Patient Name → WhatsApp Derivation BUSINESS OUTCOMES Zero advisor intake overhead · 24/7 lead capture · Consistent pre-qualification quality · Instant WhatsApp derivation One dedicated bot per Meta Ads campaign · No service confusion · Clinical data captured before any human contact FAQ INTERCEPTION (active at steps 03–06): At any step, if the patient asks a question, the FAQ interceptor fires. Groq LLM resolves the query. repeatCurrentStep() returns patient to exact position. Pipeline never interrupted. Lead capture continuity is guaranteed by the deterministic state-machine architecture — FAQ handling and flow steps are completely decoupled.