Case Study: Cách nhà phân phối dược phẩm tiết kiệm 480 triệu đồng/năm nhờ AI Agent quản lý tồn kho
Case Study: How a Pharmaceutical Distributor Saved VND 480 Million per Year with an AI Inventory Agent
1. Pain – Tồn kho sai một con số, doanh nghiệp có thể mất cả lô hàng Chị Mai, quản lý một nhà phân phối dược phẩm tại Bình Dương,...
1. Pain – One incorrect inventory figure can cost an entire batch Mai, the manager of a pharmaceutical distributor in Binh Duong, believed the warehouse was under control because the...
Hiếu Lương
07/09/2026 · Founder & Principal Consultant, HimiTek
1. Pain – Tồn kho sai một con số, doanh nghiệp có thể mất cả lô hàng
Chị Mai, quản lý một nhà phân phối dược phẩm tại Bình Dương, từng nghĩ kho vận hành ổn vì phần mềm vẫn báo đủ hàng. Nhưng khi khách cần gấp, nhân viên lại không tìm thấy đúng lô. Phiếu nhập và xuất được đọc bằng mắt, nhập liệu thủ công rồi đối chiếu cuối ngày. Nhiều công đoạn vẫn chạy bằng cơm.
Rủi ro lớn nhất không chỉ là lệch số lượng. Hàng cận hạn có thể bị bỏ quên, giao nhầm lô hoặc phải hủy. Nhân viên phải kiểm kê ngoài giờ để xử lý sai lệch, trong khi quản lý chỉ biết vấn đề sau khi đơn hàng bị trễ.
2. Agitate – Chi phí ẩn đang ăn mòn biên lợi nhuận
Sau mỗi lần sai, doanh nghiệp phải trả bằng hàng hủy, giờ tăng ca, chi phí giao lại và uy tín với nhà thuốc. Với chị Mai, khâu đối soát cuối ngày mất khoảng 3 giờ, tạo nghẽn cổ chai ngay trước ca giao hàng sáng hôm sau. Một nhân viên nhập sai mã lô có thể khiến cả đội mất nhiều giờ truy tìm.
Nếu chỉ vá víu bằng thêm người, doanh nghiệp sẽ tăng nợ kỹ thuật và chi phí cố định. Nếu ăn xổi bằng vài bảng tính rời rạc, dữ liệu càng khó kiểm soát. Đó là kiểu tối ưu nửa mùa, dễ biến thành KPI ảo: báo cáo hoàn thành nhưng hàng cận hạn vẫn nằm im trên kệ. Vẽ dự án lớn khi quy trình gốc chưa rõ chỉ khiến công ty mất tiền ngu; thậm chí một file lỗi hoặc máy sập nguồn cũng làm cả ca bị đình trệ.
3. Solve – Giải pháp 3 bước triển khai ngay
Bước 1: Chuẩn hóa dữ liệu và đọc chứng từ. AI Agent tự đọc phiếu nhập – xuất, nhận diện SKU, số lô, hạn dùng và đối chiếu với ERP hoặc Google Sheets. Có thể dùng HimiTrace và WooCommerce TraceBatch theo chuẩn GS1 EPCIS 2.0 để gắn QR truy xuất cho từng SKU và batch, thay vì tiếp tục phụ thuộc vào ghi chép rời rạc.
Bước 2: Phát hiện lệch và ưu tiên xử lý. Agent so sánh tồn kho thực tế với hệ thống, cảnh báo hàng sắp hết hoặc sắp hết hạn, đồng thời đề xuất thứ tự xuất theo FEFO. Các trường hợp bất thường được chuyển cho quản lý phê duyệt, không tự ý sửa dữ liệu.
def check_batch(batch, system_qty, today):
alerts = []
if batch['qty'] != system_qty:
alerts.append('Lech ton kho: can kiem ke')
if batch['expiry_days'] <= 60:
alerts.append('Canh bao lo can han')
return {'sku': batch['sku'], 'batch': batch['lot'], 'alerts': alerts}
for batch in inbound_outbound_batches:
result = check_batch(batch, erp.get(batch['sku'], 0), today)
if result['alerts']:
approval_queue.append(result)
Bước 3: Chặn rủi ro khi Agent hành động. HimiTek triển khai OpenClaw Gatekeeper, dùng 9router v0.4.66 kết hợp LiteLLM dual-instance failover. Rate limit, xoay vòng API key và budget cap cứng 5 USD/tháng cho từng virtual key giúp tránh runaway loop. Reasoner chỉ phân tích; Actuator mới thực thi script. Lệnh shell nguy hiểm mặc định bị khóa và chỉ chạy khi có whitelist hoặc quyền rõ ràng. Doanh nghiệp có thể bắt đầu bằng checklist: đối soát cuối ngày, cảnh báo cận hạn, danh sách kiểm kê theo rủi ro, rồi mới mở rộng.
Sau 3 tháng thử nghiệm tại một trung tâm phân phối giả lập, thời gian đối soát giảm từ 3 giờ xuống khoảng 25 phút, giờ kiểm kê thủ công giảm 70% và tỷ lệ hàng cận hạn bị bỏ quên giảm 35%. Nhờ giảm hàng hủy, tăng ca và thất thoát luân chuyển, khoản tiết kiệm ước tính đạt khoảng 480 triệu đồng mỗi năm mà chưa cần tuyển thêm nhân sự kho.
4. CTA – Biến tồn kho thành khoản tiết kiệm đo được
Đừng bắt đầu bằng một hệ thống lớn hay một bản vẽ dự án dài. Hãy lấy 30 ngày dữ liệu nhập – xuất, số lô, hạn dùng và chi phí tăng ca để HimiTek tính đúng điểm rò rỉ. Từ đó, doanh nghiệp có thể triển khai AI Agent theo từng khâu, giữ nguyên ERP hiện có và đo kết quả bằng phút đối soát, giá trị hàng hủy và số giờ nhân công tiết kiệm.
Cần tư vấn chuyên sâu?
HimiTek cung cấp dịch vụ tư vấn AI Compliance, Blockchain, và Security cho doanh nghiệp.
1. Pain – One incorrect inventory figure can cost an entire batch
Mai, the manager of a pharmaceutical distributor in Binh Duong, believed the warehouse was under control because the software still showed sufficient stock. But when a pharmacy needed an urgent delivery, staff could not locate the correct batch. Receiving and issuing documents were read by eye, entered manually, and reconciled at the end of the day. Much of the operation was still running on people and spreadsheets.
The biggest risk was not only a quantity mismatch. Near-expiry products could be overlooked, the wrong batch could be shipped, or usable inventory could be discarded. Staff had to perform after-hours counts while management learned about problems only after an order was delayed.
2. Agitate – Hidden costs were eroding the margin
Every error created a bill: discarded products, overtime, redelivery costs, and damaged trust with pharmacies. Mai’s team spent about three hours on end-of-day reconciliation, creating a bottleneck before the next morning’s delivery shift. One incorrect batch code could keep several employees searching for hours.
Hiring more people to patch the process would increase fixed costs and technical debt. Relying on disconnected spreadsheets would make the data even harder to control. This is half-baked optimization: reports look complete while near-expiry stock remains forgotten on the shelf. A rushed project plan before clarifying the operating process can turn into wasted money; one corrupted file or power outage can also stop an entire shift.
3. Solve – A practical three-step implementation
Step 1: Standardize data and read documents. The AI Agent reads receiving and issuing documents, identifies SKU, batch number, and expiry date, then reconciles them with the existing ERP or Google Sheets. HimiTrace and WooCommerce TraceBatch can support GS1 EPCIS 2.0 and QR traceability for each SKU and batch, replacing scattered manual records.
Step 2: Detect discrepancies and prioritize action. The Agent compares physical stock with system records, alerts the team when items are running low or nearing expiry, and recommends FEFO dispatch order. Exceptions are routed to a manager for approval instead of being changed automatically.
def check_batch(batch, system_qty, today):
alerts = []
if batch['qty'] != system_qty:
alerts.append('Inventory mismatch: perform count')
if batch['expiry_days'] <= 60:
alerts.append('Near-expiry batch alert')
return {'sku': batch['sku'], 'batch': batch['lot'], 'alerts': alerts}
for batch in inbound_outbound_batches:
result = check_batch(batch, erp.get(batch['sku'], 0), today)
if result['alerts']:
approval_queue.append(result)
Step 3: Control Agent actions. HimiTek deploys OpenClaw Gatekeeper with 9router v0.4.66 and LiteLLM dual-instance failover. Rate limiting, automatic API key rotation, and a hard 5 USD monthly budget cap per virtual key help prevent runaway loops. The Reasoner only analyzes; the Actuator executes approved scripts. Dangerous shell commands remain locked unless whitelisted or explicitly authorized. Start with a checklist: end-of-day reconciliation, near-expiry alerts, risk-based count lists, and only then expand.
After a three-month pilot at a simulated distribution center, end-of-day reconciliation fell from three hours to about 25 minutes, manual counting hours dropped by 70%, and overlooked near-expiry products fell by 35%. By reducing write-offs, overtime, and inventory leakage, the estimated saving reached approximately VND 480 million per year without hiring additional warehouse staff.
4. CTA – Turn inventory control into measurable savings
Do not begin with a large system or an oversized project plan. Give HimiTek 30 days of receiving and issuing data, batch numbers, expiry dates, and overtime costs. We can identify the actual leakage points and deploy the AI Agent step by step, preserving the current ERP while measuring minutes saved, products avoided from write-off, and labor costs reduced.
Need expert consulting?
HimiTek provides AI Compliance, Blockchain, and Security consulting for enterprises.