Developer documentation v1.x

Documentation

WhatsApp Bot - Track/Get Lab Results Flow

User selects "Track my Lab Exam(s)" or "Get my Lab results" from the main menu.

Flow Diagram

flowchart TD
    START([User selects Track/Get Results]) --> PROMPT[/"Please provide:
    - Order ID
    - Age (optional)
    
    Example: LAB123456
    25"/]
    
    PROMPT --> USER_INPUT[User enters Order ID]
    
    USER_INPUT --> SEARCH{Search Order}
    
    SEARCH -->|Found| CHECK_ACTION{Which action?}
    
    CHECK_ACTION -->|Track Status| STATUS[/"📋 Order Status:
    Order ID: LAB123456
    Status: Processing
    Date: 2024-01-15"/]
    
    CHECK_ACTION -->|Get Results| CHECK_READY{Results ready?}
    
    CHECK_READY -->|Yes| RESULTS[/"📋 Your Results:
    🔗 Download Results PDF"/]
    
    CHECK_READY -->|No| PENDING[/"⏳ Results not ready yet.
    Status: Processing
    Expected: Tomorrow"/]
    
    SEARCH -->|Not Found| NOT_FOUND{Attempts < 3?}
    
    NOT_FOUND -->|Yes| RETRY[/"❌ Order not found.
    Please check and try again.
    Attempts remaining: X"/]
    RETRY --> USER_INPUT
    
    NOT_FOUND -->|No| MAX_ATTEMPTS[/"❌ Maximum attempts reached.
    Please contact customer service."/]
    
    STATUS --> COMPLETED([Conversation Completed])
    RESULTS --> COMPLETED
    PENDING --> COMPLETED
    MAX_ATTEMPTS --> MAIN_MENU[Return to Main Menu]

Input Format

[Order ID]
[Age - optional]

Example:

LAB123456
25

Differences Between Options

Option 7: Track Option 8: Get Results
Shows order status Downloads results PDF
Always available Only if results ready
Status info only Full results document