Inti Sakura Solutions
BerandaホームHome Tentang会社概要About LayananサービスServices Kontakお問い合わせContact BlogブログBlog
| |

Studi Kasus: Asisten AI WhatsApp untuk Toko Retail di Bandung 事例:バンドンの小売店向けWhatsApp AIアシスタント Case Study: WhatsApp AI Assistant for a Retail Store in Bandung

30 Mei 2026 · AI, WhatsApp · Status: Prototipe (live, dalam pengujian) 2026年5月30日 · AI、WhatsApp · ステータス:プロトタイプ(稼働中・テスト段階) May 30, 2026 · AI, WhatsApp · Status: Prototype (live, in testing)

Stack: Claude API · Supabase · Twilio · Python · Railway 技術スタック:Claude API・Supabase・Twilio・Python・Railway Stack: Claude API · Supabase · Twilio · Python · Railway

Masalah 課題 The Problem

Sebuah toko retail di Bandung yang menjual produk plastik rumah tangga — kursi, jerigen, dan berbagai produk sejenis — dengan lebih dari 3.000 item di inventaris. インドネシア・バンドンにある日用プラスチック製品(椅子・ジェリカン・収納用品など)の小売店です。取扱SKUは3,000点以上にのぼります。 A retail shop in Bandung, Indonesia, selling plastic household goods — chairs, storage bins, and similar items — with over 3,000 SKUs in inventory.

Setiap hari, pelanggan mengirim pesan WhatsApp ke toko dengan dua pertanyaan yang selalu sama: 毎日、顧客からWhatsAppに同じ内容のメッセージが届きます: Every day, customers send WhatsApp messages to the shop asking the same two questions:

  • "Berapa harga kursi merk Chitose?"「Chitoseブランドの椅子はいくらですか?」"Berapa harga kursi merk Chitose?" — What is the price of a Chitose brand chair?
  • "Ada stok jerigen 20 liter?"「20リットルのジェリカンは在庫ありますか?」"Ada stok jerigen 20 liter?" — Is the 20-litre jerry can in stock?

Karyawan menghabiskan banyak waktu untuk menjawab pertanyaan berulang ini secara manual. Di sisi lain, harga barang sering berubah — dengan ribuan item, mudah sekali bagi staf untuk memberikan harga yang sudah tidak berlaku. スタッフはこれらの繰り返しの問い合わせに多くの時間を費やしていました。さらに、商品価格は頻繁に変動するため、3,000点もの商品の最新価格をスタッフが把握し続けることは困難で、誤った価格を案内するリスクがありました。 Human clerks were spending a significant portion of their day answering these repetitive queries manually. At the same time, prices fluctuate frequently — keeping up with thousands of items makes it easy for staff to quote outdated prices.

Dampaknya: waktu karyawan terbuang untuk tugas bernilai rendah, dan kadang pelanggan mendapat informasi harga yang salah. 問題のまとめ:スタッフの工数が低付加価値業務に浪費され、価格案内のミスも発生しやすい状況。 The cost: clerk time wasted on low-value repetitive tasks, and occasional wrong price quotes due to outdated information.

Solusi ソリューション The Solution

Asisten WhatsApp bertenaga AI yang menjawab pertanyaan harga dan stok secara otomatis, dengan mengambil data langsung dari database inventaris toko secara real-time. 在庫データベースからリアルタイムで情報を取得し、価格・在庫の問い合わせに自動で回答するAI搭載WhatsAppアシスタントを構築しました。 An AI-powered WhatsApp assistant that answers price and stock questions automatically, pulling live data directly from the shop's inventory database.

Pelanggan tetap mengirim pesan ke nomor WhatsApp toko seperti biasa. Asisten menjawab secara instan, 24/7, dengan data yang selalu akurat. 顧客はこれまで通り店のWhatsApp番号にメッセージを送るだけ。アシスタントが24時間365日、常に最新データをもとに即座に回答します。 Customers message the shop's WhatsApp number as they normally would. The assistant handles the query instantly, 24/7, with accurate real-time data.

WhatsApp conversation where the assistant replies with the price and stock status of a jerry can
Percakapan WhatsApp nyata — pelanggan bertanya harga, asisten membalas dengan harga dan stok yang benar 実際のWhatsAppの会話例 — 顧客が価格を質問し、アシスタントが正確な価格と在庫を返答 A real WhatsApp conversation — customer asks for a price, assistant replies with the correct price and stock

Cara Kerja 仕組み How It Works

Pelanggan mengirim pesan WhatsApp
        ↓
Twilio menerima pesan, meneruskan ke aplikasi Python (hosting di Railway)
        ↓
Aplikasi Python memanggil Claude API dengan pesan pelanggan
        ↓
Claude memutuskan tool mana yang dipanggil:
  → get_item_info(item_name)   — untuk pertanyaan harga
  → get_stock(item_name)       — untuk pertanyaan stok
        ↓
Tool mengambil data dari database Supabase secara live
        ↓
Claude menerima hasil, menyusun balasan yang natural
        ↓
Balasan dikirim ke pelanggan via Twilio → WhatsApp顧客がWhatsAppでメッセージ送信
        ↓
Twilioがメッセージを受信し、Pythonアプリへ転送(Railwayでホスティング)
        ↓
PythonアプリがClaude APIを呼び出し
        ↓
Claudeが必要なツールを判断・呼び出し:
  → get_item_info(item_name)   — 価格の問い合わせ
  → get_stock(item_name)       — 在庫の問い合わせ
        ↓
ツールがSupabaseデータベースをリアルタイムで検索
        ↓
Claudeが結果を受け取り、自然な返答を生成
        ↓
Twilio経由でWhatsAppに返信Customer sends WhatsApp message
        ↓
Twilio receives message, forwards to Python app (hosted on Railway)
        ↓
Python app calls Claude API with the customer's message
        ↓
Claude decides which tool to call:
  → get_item_info(item_name)   — for price queries
  → get_stock(item_name)       — for stock queries
        ↓
Tool queries live Supabase database
        ↓
Claude receives result, composes natural reply
        ↓
Reply sent back to customer via Twilio → WhatsApp

Detail Teknis 技術詳細 Technical Details

  • Model AI: Claude API (Anthropic) dengan tool use / function callingAIモデル:Claude API(Anthropic)— ツールユース(Function Calling)機能を使用AI Model: Claude API (Anthropic) with tool use / function calling
  • Database: Supabase (PostgreSQL) — data inventaris real-timeデータベース:Supabase(PostgreSQL)— リアルタイム在庫データDatabase: Supabase (PostgreSQL) — live inventory data
  • Pesan: Twilio WhatsApp APIメッセージング:Twilio WhatsApp APIMessaging: Twilio WhatsApp API
  • Backend: Python, hosting di Railwayバックエンド:Python(Railwayでホスティング)Backend: Python, hosted on Railway
  • Pencarian: Fuzzy search case-insensitive (ilike) — menangani nama produk yang tidak lengkap検索方式:大文字小文字を区別しない部分一致検索(ilike)— 商品名の一部入力にも対応Search: Case-insensitive fuzzy search (ilike) — handles partial product names

Claude menggunakan tool use (function calling) — Claude sendiri yang memutuskan kapan dan apa yang perlu dicari di database, bukan menerima semua data sekaligus. Ini membuat sistem lebih akurat, hemat biaya, dan skalabel seiring bertambahnya inventaris. 本システムでは、Claudeのツールユース機能を採用しています。事前にすべてのデータをプロンプトに詰め込む方式ではなく、Claudeが必要なタイミングで必要なデータのみをデータベースに問い合わせます。これにより、精度・コスト効率・スケーラビリティが大幅に向上しています。 Claude uses tool use (function calling) — it decides when and what to query, rather than receiving a pre-loaded data dump. This keeps the system accurate, cost-efficient, and scalable as inventory grows.

System prompt menggunakan XML tags terstruktur untuk membatasi perilaku Claude: hanya menjawab pertanyaan terkait toko, membalas dalam bahasa pelanggan (Indonesia atau Inggris), dan memberikan respons fallback yang sopan ketika item tidak ditemukan. システムプロンプトにはXMLタグ構造(<role>・<scope>・<fallback>)を使用し、Claudeの応答範囲を明確に制限。店舗関連の質問にのみ回答し、顧客の言語(インドネシア語または英語)で返答、商品が見つからない場合は適切なフォールバック応答を返します。 The system prompt uses structured XML tags to constrain Claude's behavior: it only answers shop-related questions, replies in the customer's language (Indonesian or English), and falls back gracefully when an item isn't found.

Code editor showing the structured XML system prompt with role, scope, context, output_format, and fallback tags
Struktur system prompt di code editor コードエディタ上のシステムプロンプト構造 The system prompt's structure in the code editor

Hasil 成果 Results

  • Karyawan tidak lagi menghabiskan waktu menjawab pertanyaan harga/stok yang berulang via WhatsAppスタッフがWhatsAppでの繰り返し問い合わせ対応に費やす時間をゼロにClerks no longer spend time answering repetitive price/stock questions via WhatsApp
  • Akurasi harga meningkat — jawaban diambil langsung dari database, bukan dari ingatan staf価格精度の向上 — データベースから直接取得するため、記憶ベースの案内ミスがなくなったPrice accuracy improved — answers come from the live database, not from memory
  • Tersedia 24/7 — pelanggan mendapat balasan instan di luar jam toko24時間365日対応 — 営業時間外でも顧客が即座に回答を得られるAvailable 24/7 — customers get instant replies outside shop hours
  • Saat ini dalam tahap prototipe — sedang diuji dengan traffic pelanggan nyata現在プロトタイプ段階 — 実際の顧客トラフィックでテスト中Currently in prototype stage — being tested with real customer traffic

Yang Saya Pelajari 得られた知見 What I Learned

  • Tool use adalah pola yang tepat untuk chatbot berbasis database — bukan prompt stuffing. Claude yang memutuskan kapan query dijalankan, lebih bersih dan lebih andal.データベース連携型チャットボットにはツールユースが最適 — プロンプトへのデータ一括埋め込みより、Claudeが必要に応じてクエリを実行する方式の方がクリーンで信頼性が高いTool use is the right pattern for database-backed chatbots — not prompt stuffing. Claude decides when to query, which is cleaner and more reliable.
  • Struktur system prompt sangat penting. Menggunakan XML tags (<role>, <scope>, <fallback>) membuat perilaku bot jauh lebih konsisten dan mudah di-debug.システムプロンプトの構造が品質を左右する — XMLタグを使った構造化により、動作の一貫性とデバッグ効率が大幅に改善System prompt structure matters. Using XML tags (<role>, <scope>, <fallback>) made the bot's behavior significantly more consistent and easier to debug.
  • Data nyata itu berantakan. 3.000 SKU dengan kode singkatan adalah keterbatasan yang diketahui — kolom keywords/alias direncanakan untuk meningkatkan pencocokan bahasa natural.実業務データには不整合がある — 略称SKUが3,000点あることが既知の課題。キーワード・別名カラムの追加で自然言語マッチングを改善予定Real data has messy names. 3,000 SKUs with abbreviated codes is a known limitation — a keywords/aliases column is planned to improve natural language matching.

Keterbatasan Saat Ini 現在の制限事項 Current Limitations

  • Pencocokan nama produk mengandalkan pencarian teks parsial — SKU yang disingkat bisa membingungkan pertanyaan dalam bahasa natural (perbaikan sudah dalam backlog)商品名の照合は部分テキスト検索に依存しており、略称SKUによる自然言語クエリの誤マッチが発生することがある(バックログで対応予定)Product name matching relies on partial text search — abbreviated SKUs can confuse natural language queries (fix in backlog)
  • Tahap prototipe — belum menangani edge case seperti pemesanan massal atau harga khususプロトタイプ段階 — まとめ買いや特別価格などのエッジケースは未対応Prototype stage — not yet handling edge cases like bulk orders or custom pricing
  • Belum ada memori percakapan antar sesiセッション間の会話記憶機能は未実装No conversation memory between sessions yet

Ringkasan Stack 技術スタック一覧 Stack Summary

KomponenコンポーネントComponent ToolツールTool
Model AIAIモデルAI ModelClaude API (Anthropic)
DatabaseデータベースDatabaseSupabase (PostgreSQL)
WhatsAppTwilio
BackendバックエンドBackendPython
HostingホスティングHostingRailway

Dibuat oleh developer AI independen berbasis di Bandung, Indonesia. Tersedia untuk proyek serupa — hubungi saya. インドネシア・バンドン在住の独立系AIデベロッパーが開発。同様のプロジェクトのご相談も承っております — お問い合わせ。 Built by an independent AI developer based in Bandung, Indonesia. Available for similar projects — contact me.

← Kembali ke Blog ← ブログ一覧へ ← Back to Blog

Inti Sakura Solutions — Bandung, Indonesia Indonesia · Inggris · Jepang インドネシア語・英語・日本語 Indonesian · English · Japanese