น้องสบายใจ — Travel Insurance Voice Bot

Build Reference v8 · March 2026
🤖

What It Does

น้องสบายใจ is a Thai voice bot for Sabai Travel that sells travel insurance over a phone call — from destination inquiry through package selection to LINE OA handoff. One natural conversation, no menu trees.

🎯

Why This Bot

Travel insurance = predictable rules (zone mapping, date math, pricing, compliance) + consultative dialogue. Ideal showcase for Botlab 2.0's microservice flow architecture.

📦

Product Coverage

3 packages (Basic / Standard / Premium) × 3 zones (ASEAN / Asia / Worldwide) × 3 brackets (1–7 / 8–14 / 15–30 days). Plus 5 add-on modules.

📅

Demo Target

🎯 March 25 live demo — the bot runs as a voice call, handles mid-call topic changes, real-time pricing, and LINE handoff.

🌍
Destination Intelligence
Recognizes Thai city names, maps to insurance zones, detects season and travel advisories via RAG.
Customer says: "ไปโตเกียว" → zone: asia · season: mild · flags: none
💬
Empathetic Conversation
Generates contextual empathy lines based on destination + season. Keeps conversation warm and personal.
Bot says: "🌸 ช่วงนี้ซากุระบานพอดี ที่สวนอุเอโนะสวยมากเป็นพิเศษ!"
📅
Date Parsing & Trip Math
Extracts dates from natural Thai speech, calculates trip duration and pricing bracket automatically.
Customer says: "28 มีนา ถึง 1 เมษา" → 5 days · bracket: 1–7 days
💰
Real-Time Pricing
Computes per-person premium from 27-combination pricing table. Scales by traveler count.
Bot says: "Standard — 1,099 บาท/คน (รวม 2 คน = 2,198 บาท)"
⚖️
Compliance Awareness
Detects Schengen, travel advisory, and safari health triggers. Delivers mandatory disclosures in natural Thai.
Bot says: "ขอแจ้งให้ทราบนะคะ เชงเก้นกำหนดวงเงินขั้นต่ำ ~1.1 ล้านบาท แนะนำ Standard ค่ะ"
🔄
Multi-Trip Handling
Customer can ask about a second destination mid-call. Bot re-runs flows and presents new options without losing context.
Customer says: "ถ้าเกิดอยากไปฝรั่งเศสด้วยล่ะ?" → re-runs all flows for France
🔀
Mode Switching
Distinguishes buy (full application) from inquiry (browsing). Adjusts depth accordingly.
Customer says: "แค่อยากรู้ราคาเฉยๆ" → mode: inquiry (no contact collection)
📊
Package Comparison
Presents side-by-side Basic / Standard / Premium with pricing and contextual recommendation.
Bot says: "แนะนำ Standard ขึ้นไปสำหรับญี่ปุ่นค่ะ ค่ารักษาค่อนข้างสูง"
Add-On Recommendations
Suggests relevant add-ons (max 2) from 5 available, based on destination and travel context.
Japan couple → suggests Gadget Protection (400฿) + Visa Cancellation (300฿)
📲
LINE OA Handoff
Sends formatted summary card to LINE OA with all trip details for human agent follow-up.
LINE card: สมศรี · ญี่ปุ่น · 5 วัน · Standard · 2,198 บาท · somsri99
💬 Customer & Bot Interaction
⚙️ What Happens Behind the Scenes
1 Greeting & Destination
Customer
สวัสดีค่ะ สนใจทำประกันเดินทางไปญี่ปุ่นค่ะ จะไปช่วงปลายมีนา
Main Prompt extracts: destination = ญี่ปุ่น, session_mode = buy. Triggers Flow 1.
น้องสบายใจ
สวัสดีค่ะ ยินดีให้บริการค่ะ 🌸 โชคดีมากเลยค่ะ ช่วงนี้ซากุระบานพอดี ที่สวนอุเอโนะและนิชิโนะมารุสวยมากเป็นพิเศษ! สบายใจช่วยดูแพ็กเกจประกันให้นะคะ เดินทางวันไหนถึงวันไหนคะ?
⚡ Flow 1 — DestinationEnricher
destination_zone = asia · season_flag = mild
compliance_flags = none
empathy_line = ซากุระบาน reference
Main Prompt weaves empathy line into greeting.
2 Dates & Pricing
Customer
28 มีนา ถึง 1 เมษา ค่ะ ไปสองคนกับแฟน
Main Prompt extracts: travel_start = 2026-03-28, travel_end = 2026-04-01, num_travelers = 2, travel_context = couple. Triggers Flow 2.
น้องสบายใจ
ไปด้วยกัน 2 คน 5 วัน รับทราบค่ะ!

🔹 Basic — 599 บาท/คน (รวม 1,198 บาท)
🔸 Standard — 1,099 บาท/คน (รวม 2,198 บาท)
🔶 Premium — 1,799 บาท/คน (รวม 3,598 บาท)

แนะนำ Standard ขึ้นไปสำหรับญี่ปุ่นค่ะ ค่ารักษาพยาบาลที่นั่นค่อนข้างสูง
⚡ Flow 2 — DateProcessor
trip_days = 5 → bracket 1–7
Asia + Standard = 1,099/person
Main Prompt × 2 travelers, presents comparison.
3 Package & Add-Ons
Customer
เอา Standard ค่ะ แล้วมี add-on อะไรบ้าง?
selected_package = standard. Looks up add-ons from RAG KB 3 based on couple + asia context.
น้องสบายใจ
Standard เลือกดีค่ะ! แนะนำสำหรับเที่ยวญี่ปุ่น 2 คน:

📱 Gadget Protection — คุ้มครองมือถือ/กล้อง +400 บาท
🧳 Visa Cancellation — กรณีวีซ่าไม่ผ่าน +300 บาท

สนใจเพิ่มตัวไหนไหมคะ?
📚 RAG KB 3 — Add-Ons
Matched Gadget + Visa Cancel based on context. Max 2 per conversation.
4 Mid-Call: France Inquiry
Customer
อ้อ ถ้าเกิดอยากไปฝรั่งเศสด้วยล่ะคะ? แค่อยากรู้ราคาเฉยๆ
Topic shift — "แค่อยากรู้ราคา" = inquiry. session_mode = inquiry. Re-triggers Flow 1 for France.
น้องสบายใจ
ฝรั่งเศสดีเลยค่ะ! 🗼 ช่วงมีนาเริ่มสดชื่นดอกไม้บานพอดี ดูราคาให้เลยนะคะ — ฝรั่งเศสอยู่โซน Worldwide ค่ะ

🔹 Basic — 899 บาท/คน
🔸 Standard — 1,599 บาท/คน
🔶 Premium — 2,699 บาท/คน

⚠️ ขอแจ้งให้ทราบนะคะ ฝรั่งเศสเป็นประเทศกลุ่มเชงเก้น ซึ่งกำหนดวงเงินประกันขั้นต่ำประมาณ 1,100,000 บาท (30,000 EUR) แพ็กเกจ Basic วงเงิน 1,000,000 บาทอาจไม่ผ่านข้อกำหนด แนะนำ Standard หรือ Premium ค่ะ มีคำถามเพิ่มเติมไหมคะ?
⚡ Flow 1 (re-run): worldwide, schengen flag
⚡ Flow 2 (re-run): worldwide pricing
⚡ Flow 3 — ComplianceChecker fires → Schengen disclosure
5 Back to Japan, Close & Handoff
Customer
โอเคค่ะ ขอบคุณที่แจ้ง เอาญี่ปุ่น Standard เหมือนเดิมค่ะ ไม่เอา add-on
Restores Japan context. session_mode = buy, selected_package = standard, selected_addons = none.
น้องสบายใจ
รับทราบค่ะ! สรุปให้นะคะ:

📍 ญี่ปุ่น · 28 มี.ค. – 1 เม.ย. · 5 วัน · 2 คน
📦 Standard — 1,099 บาท/คน = รวม 2,198 บาท

ขอชื่อกับเบอร์โทรหรือ LINE ID เพื่อส่งรายละเอียดทาง LINE นะคะ
Summarization — Main Prompt compiles all variables. No flow call.
Customer
สมศรี ค่ะ LINE ID: somsri99
customer_name = สมศรี, customer_contact = somsri99. Triggers Flow 4.
น้องสบายใจ
ขอบคุณค่ะ คุณสมศรี! ส่งรายละเอียดทาง LINE ให้เรียบร้อยแล้วค่ะ เจ้าหน้าที่จะติดต่อกลับภายใน 24 ชั่วโมงนะคะ ขอให้เที่ยวญี่ปุ่นสนุกค่ะ 🌸
⚡ Flow 4 — LineHandoff
Sends formatted summary to LINE OA. Human agent picks up.
Main Prompt
Decision
Silent Flow
hover nodes for details · hover legend to highlight
Phase 1 — Destination & Enrichment
flowchart LR
    START([📞 Call In]):::startEnd --> GREET[🤖 Greet &
Ask Destination]:::mainPrompt --> D_DEST{Destination
mentioned?}:::decision D_DEST -->|No| GREET D_DEST -->|Yes| F1[⚡ Flow 1
DestEnrich]:::silentFlow --> EMP[💬 Empathy +
Ask Dates]:::mainPrompt --> D_DATE{Dates
provided?}:::decision D_DATE -->|No| EMP classDef startEnd fill:#1e40af,stroke:#1e40af,color:#fff,font-weight:bold,font-size:11px classDef mainPrompt fill:#fff,stroke:#2563eb,stroke-width:2px,color:#1e40af,font-weight:600,font-size:11px classDef decision fill:#fffbeb,stroke:#f59e0b,stroke-width:2px,color:#92400e,font-weight:600,font-size:11px classDef silentFlow fill:#f0fdfa,stroke:#44C9C1,stroke-width:2px,color:#0d9488,font-weight:600,font-size:11px
Phase 2 — Pricing & Compliance
flowchart RL
    F2[⚡ Flow 2
Pricing]:::silentFlow --> D_COMP{Compliance
flags?}:::decision D_COMP -->|"none / empty"| PKG[📊 Package
Compare]:::mainPrompt D_COMP -->|"flags exist"| F3[⚡ Flow 3
Compliance]:::silentFlow --> PKG PKG --> D_CUST{Customer
decides}:::decision D_CUST -->|Questions| PKG classDef mainPrompt fill:#fff,stroke:#2563eb,stroke-width:2px,color:#1e40af,font-weight:600,font-size:11px classDef decision fill:#fffbeb,stroke:#f59e0b,stroke-width:2px,color:#92400e,font-weight:600,font-size:11px classDef silentFlow fill:#f0fdfa,stroke:#44C9C1,stroke-width:2px,color:#0d9488,font-weight:600,font-size:11px
Phase 3 — Confirmation & Handoff
flowchart LR
    CONF[✅ Confirm &
Collect Info]:::mainPrompt --> F4[⚡ Flow 4
LINE Send]:::silentFlow --> ENDNODE([💬 LINE OA
Agent]):::handoff classDef mainPrompt fill:#fff,stroke:#2563eb,stroke-width:2px,color:#1e40af,font-weight:600,font-size:11px classDef silentFlow fill:#f0fdfa,stroke:#44C9C1,stroke-width:2px,color:#0d9488,font-weight:600,font-size:11px classDef handoff fill:#7c3aed,stroke:#6d28d9,color:#fff,font-weight:bold,font-size:11px

Microservice pattern. The Main Prompt in Bot Studio handles conversation — greeting, empathy, package presentation, objection handling. 4 independent flows in Flow Studio handle deterministic tasks silently (Response Type OFF). Results return via End Node output parameters → Bot Studio variables.

Think: Main Prompt = the chef (judgment calls, talks to customer). Flows = kitchen tools (precise ops). The chef decides when to use each tool.

🌍
Flow 1 — DestinationEnricher
Takes a Thai destination name, queries RAG KBs, and returns zone classification, season, compliance flags, and empathy line.
Input: "ญี่ปุ่น" → zone: asia · season: mild · flags: none · empathy: ซากุระบาน...
📅
Flow 2 — DateProcessor
Calculates trip duration from dates, determines pricing bracket, and looks up per-person premium from the 27-combination table.
Input: 2026-03-28 → 04-01, asia, standard → 5 days · bracket 1–7 · 1,099 ฿/person
⚖️
Flow 3 — ComplianceChecker
If compliance flags exist, generates warm Thai disclosure. Silent skip if flags = "none". Handles Schengen, advisory, safari health.
Input: flags = "schengen" → Output: "ขอแจ้งให้ทราบนะคะ เชงเก้นกำหนดวงเงินขั้นต่ำ..."
📲
Flow 4 — LineHandoff
Sends a formatted summary card to LINE OA via Messaging API. Final step — human agent picks up from the structured data.
Input: all trip data → LINE message: สมศรี · ญี่ปุ่น · Standard · 2,198฿ · somsri99

Bot Studio Configuration

The Main Prompt is the conversational brain — it manages the entire dialogue and decides when to trigger flows. The PD has flexibility on exact wording, but these behaviors must be present.

Persona & Tone

Name: น้องสบายใจ. Female Thai speaker, warm and professional, ค่ะ endings. Represents Sabai Travel (เดินทางสบาย). Should feel like a knowledgeable travel consultant.

Core Behaviors

1. Destination extraction → When customer mentions a destination, extract it and trigger Flow 1. Weave the returned empathy_line naturally.

2. Date extraction → Parse Thai date expressions into YYYY-MM-DD. Also extract num_travelers and travel_context. Then trigger Flow 2.

3. Package presentation → After Flow 2, present all 3 tiers with per-person and total pricing. Add contextual recommendation.

4. Compliance delivery → If Flow 3 returns a disclosure, embed it naturally after pricing.

5. Mode switching → Detect "แค่อยากรู้ราคา" → session_mode = inquiry. No contact collection. Switch back when ready.

6. Add-on timing → Only suggest after package selection. Use RAG KB 3. Max 2.

7. Handoff trigger → Customer confirms + provides contact → trigger Flow 4. Confirm LINE delivery and close warmly.

Flow Trigger Bindings

FlowTriggerInputs (Bot → Flow)Outputs (Flow → Bot)
Flow 1Destination mentioneddestinationdestination_zone, season_flag, compliance_flags, empathy_line
Flow 2Dates + zone availabletravel_start, travel_end, destination_zone, selected_packagetrip_days, estimated_premium
Flow 3flags ≠ "none"compliance_flags, destination_zone, selected_package, num_travelersdisclosure_message
Flow 4Confirms + contactAll trip + customer vars (11)handoff_status
VariableTypeDefaultSet ByPurpose
destinationString''Main PromptCustomer's stated destination
destination_zoneString''Flow 1asean / asia / worldwide
travel_startString''Main PromptDeparture YYYY-MM-DD
travel_endString''Main PromptReturn YYYY-MM-DD
trip_daysString'0'Flow 2Duration (inclusive)
num_travelersString'1'Main PromptTotal travelers
season_flagString''Flow 1hot/cold/rainy/mild
empathy_lineString''Flow 1Thai empathy sentence
compliance_flagsString'none'Flow 1none/schengen/advisory/safari_health
selected_packageString''Main Promptbasic/standard/premium
selected_addonsString'none'Main PromptComma-separated codes
estimated_premiumString''Flow 2Per-person THB
customer_nameString''Main PromptFor LINE card
customer_contactString''Main PromptPhone or LINE ID
travel_contextString'leisure'Main Promptsolo/couple/family/business etc.
session_modeString'buy'Main Promptbuy = full app, inquiry = browse

Flow 1 — DestinationEnricher

✅ Tested

Purpose: Takes destination → returns zone, season, compliance flags, empathy line.

STARTRAG NodeLLM NodeEND

Start Node: destination

RAG Node: All 3 destination KBs. Query Rewriting ON (Thai city→country). Top K: 3, Score: 0.65, Reranking: On. Outputs: point_1, point_2, point_3.

LLM Node: Temp 0.2. Output params on node. Prompt: classify zone, detect season, set flags, generate Thai empathy.

End Node: destination_zone, season_flag, compliance_flags, empathy_line. Response Type: OFF.

RAG output vars = point_1, point_2, point_3 — NOT outputList.

Flow 2 — DateProcessor

✅ Tested

Purpose: Dates + zone + package → trip duration and per-person premium.

STARTCode NodeEND

Start Node: travel_start, travel_end, destination_zone, selected_package

Code Node: Python. Positional args to main().

from datetime import datetime def main(travel_start, travel_end, destination_zone, selected_package): start_str = travel_start end_str = travel_end zone = destination_zone pkg = selected_package try: start = datetime.strptime(start_str, '%Y-%m-%d') end = datetime.strptime(end_str, '%Y-%m-%d') days = (end - start).days + 1 except: return {'trip_days': '0', 'estimated_premium': 'ไม่สามารถคำนวณได้'} pricing = { 'asean': {'basic': [299,499,799], 'standard': [549,899,1399], 'premium': [899,1499,2299]}, 'asia': {'basic': [599,999,1599], 'standard': [1099,1799,2799], 'premium': [1799,2999,4599]}, 'worldwide': {'basic': [899,1499,2399], 'standard': [1599,2699,4299], 'premium': [2699,4499,7199]}, } bracket = 0 if days <= 7 else (1 if days <= 14 else 2) z = zone if zone in pricing else 'worldwide' p = pkg if pkg in pricing[z] else 'standard' price = pricing[z][p][bracket] return {'trip_days': str(days), 'estimated_premium': f'{price:,}'}

End Node: trip_days, estimated_premium (per person). Response Type: OFF.

Code Node = positional args. Never {{param}} in Code Nodes.
estimated_premium is per person. Main Prompt × num_travelers.

Flow 3 — ComplianceChecker

✅ Tested

Purpose: Compliance flags → Thai disclosure (or silent skip).

STARTConditionLLMEND B
STARTConditionEND A (silent)

Start Node: compliance_flags, destination_zone, selected_package, num_travelers

Condition: "none" OR "" → END A. Else → LLM. Both as separate OR branches.

LLM prompt:

You are a Thai insurance compliance assistant. Generate a warm, friendly Thai disclosure. For each flag in the active flags, include one sentence. Start with 'ขอแจ้งให้ทราบนะคะ' and end with 'มีคำถามเพิ่มเติมไหมคะ?' FLAG GUIDE: schengen → แพ็กเกจที่เลือกอาจไม่ถึงขั้นต่ำของเชงเก้น (30,000 EUR / ~1,100,000 บาท) แนะนำ Standard หรือ Premium ค่ะ advisory → ปลายทางนี้มีประกาศเตือนการเดินทาง ความเสียหายจากสงครามหรือความขัดแย้งไม่อยู่ในความคุ้มครองนะคะ safari_health → แนะนำฉีดวัคซีนไข้เหลือง+ยาป้องกันมาลาเรีย พิจารณา Premium เพื่อความคุ้มครองสุขภาพที่ครอบคลุมค่ะ Example — flags = "schengen,advisory": ขอแจ้งให้ทราบนะคะ แพ็กเกจที่เลือกอาจไม่ถึงขั้นต่ำของเชงเก้น... --- Active flags: {{compliance_flags}} Destination zone: {{destination_zone}} Selected package: {{selected_package}} Number of travelers: {{num_travelers}}

End Node B: discolsure_message (⚠️ typo — fix to disclosure_message). Response Type: OFF.

{{variable}} goes in context block at bottom — never in instructions.

Flow 4 — LineHandoff

✅ Tested

Purpose: Sends formatted summary to LINE OA. Final step.

STARTCode NodeEND

Start Node: customer_name, customer_contact, destination, destination_zone, travel_start, travel_end, trip_days, selected_package, estimated_premium, num_travelers, compliance_flags

Code Node: Python. Constructs formatted text + POSTs to LINE Messaging API. Uses ssl._create_unverified_context() for sandbox SSL.

End Node: handoff_status. Response Type: OFF.

LINE token hardcoded in prototype. Move to API Store before production.
SSL workaround = prototype-only. Production: CA certs or API Node.

All KBs: Top K: 3, Score: 0.65, Reranking: On, Query Rewriting: On (critical for Thai).

KB 1 — Packagestravel_packages_th.txt — 3 tiers × 3 zones × 3 brackets + coverage details + comparison guidance. Used by Main Prompt.
KB 2 — Destinationsdestinations_asean_th.txt, _asia_th.txt, _worldwide_th.txt — Split into 3 (Milvus 8,192 char limit). Zone, weather, empathy lines, flags. Used by Flow 1.
KB 3 — Add-Onstravel_addons_th.txt — 5 add-ons: Adventure Sports (500฿), Gadget (400฿), Visa Cancel (300฿), Golf (400฿), Rental Car (350฿). Used by Main Prompt.
KB 4 — Compliancetravel_compliance_th.txt — OIC disclosures: pre-existing, sports, Schengen (30,000 EUR), advisories, age, pregnancy. Used by Flow 3 LLM.
ZoneDurationBasicStandardPremium
ASEAN1–7 days299549899
8–14 days4998991,499
15–30 days7991,3992,299
Asia1–7 days5991,0991,799
8–14 days9991,7992,999
15–30 days1,5992,7994,599
Worldwide1–7 days8991,5992,699
8–14 days1,4992,6994,499
15–30 days2,3994,2997,199

Note: 2+ travelers on same policy get 5% discount/person (not yet in prototype).