LINE Chatbot Case Study: Auto-Replies That Actually Work
A retail client came to me with a problem: their LINE Official account was getting 200+ messages per day, and their team couldn't keep up. Response times were slipping, customers were getting frustrated, and they were losing sales.
Here's how we built a chatbot that handles 80% of questions automatically—and hands off the rest gracefully.
The Problem
Before: 4-person team responding to LINE messages. Average response time: 2-4 hours during business hours. No responses after 6pm or weekends. Staff spending 3+ hours/day on repetitive questions.
Most messages were the same questions over and over:
- "Do you have [product] in stock?"
- "How much is shipping to [province]?"
- "What are your business hours?"
- "Can I pay with [payment method]?"
- "Where's my order?"
Staff were answering the same questions 50+ times per day. They were burned out, and complex customer issues weren't getting the attention they deserved.
The Solution
After: Chatbot handles 80% of questions instantly. Staff focus only on complex issues and sales conversations. Response time: under 3 seconds, 24/7.
Built with a hybrid approach: rule-based matching for common questions + AI fallback for complex ones.
- LINE Messaging API: Receives webhooks, sends replies
- Supabase: Knowledge base (products, FAQs, business info)
- Vector search: Matches questions to relevant answers
- AI layer: Groq API for questions that need reasoning
- Handoff system: Escalates to humans when needed
How It Works
Step 1: Intent Detection
When a message comes in, the system first tries to identify what the customer wants. Common patterns are matched immediately—"ราคา", "shipping", "สั่งซื้อ", etc.
Step 2: Knowledge Base Search
The message is searched against a database of products, FAQs, and business information. If there's a high-confidence match, that answer is used.
Step 3: AI Enhancement (if needed)
For questions that need interpretation, the AI takes the retrieved context and generates a natural response. This handles variations like "how much does the blue one cost" when the product is called "Navy Linen Shirt".
Step 4: Handoff (if needed)
If confidence is low, or the customer asks to talk to a person, the system tags the conversation for human follow-up and lets the customer know someone will respond.
The Knowledge Base
The chatbot is only as good as its data. We built a comprehensive knowledge base with:
- 200+ products: Name, price, description, stock status, categories
- 50+ FAQs: Common questions with multiple phrasings
- Business info: Hours, locations, shipping rates, payment methods
- Order tracking: Integration with their shipping system
Staff can update the knowledge base through a simple admin panel. New product? Add it. New FAQ? Add it. Changes reflect instantly.
Timeline
Results After 3 Months
- Messages handled: 15,000+ per month
- Auto-resolved: 80% (no human needed)
- Escalated: 20% (complex questions, sales)
- Customer satisfaction: Up from 3.2 to 4.5 stars
- Staff time saved: ~15 hours/week
Staff now spend their time on conversations that actually need a human—sales discussions, complaints, complex orders. They're less burned out and more effective.
What Didn't Work (At First)
Transparency: we had to iterate on several things.
- Initial responses were too robotic. We rewrote them to sound more natural and match the brand voice.
- Thai/English mixing caused issues. Many customers mix both in one message. Had to improve the language detection.
- Product search was too strict. "กางเกง" should find "pants" too. Added synonym mapping.
- Handoff threshold was too low. Initially escalated too many conversations. Adjusted confidence thresholds.
Costs
- LINE Messaging API: Free (under 500 messages/day)
- Supabase: Free tier (easily handles this load)
- Groq AI API: Free tier (8,000+ requests/day)
- Hosting: Free (Vercel)
- Total: ฿0/month
At higher volume, Groq costs ~$0.05 per 1M tokens. Would need 500k+ messages/month to exceed free tier.
Should You Build One?
A LINE chatbot makes sense if:
- You get 50+ repetitive questions per day
- Staff are spending hours answering the same things
- You want 24/7 response capability
- You have structured data (products, FAQs) to pull from
It might not be worth it if:
- Your questions are mostly unique/complex
- You have low message volume (<20/day)
- Personal relationships drive your business (luxury, high-end services)
Need a chatbot for your LINE?
I build LINE chatbots that actually help your customers and your team.
Let's Talk