CASE STUDY · F&B AI Financial Intelligence
From bank statements and POS data to a CFO in the founder's pocket.
15+ months of PDF statements and POS records, ingested, structured and made answerable — a daily 7am brief and a two-way AI assistant on Telegram, for a family-run cafe in Kuala Lumpur.
CLIENT
Didi's Cafe & Bakery — Wangsa Maju, Kuala Lumpur
INDUSTRY
F&B — cafe & bakery, family run
SCOPE
Data engineering · AI · automation
STACK
Supabase · StoreHub POS API · workflow automation · Telegram
EXECUTIVE SUMMARY
The problem wasn't effort. It was infrastructure.
Didi's Cafe & Bakery is a family run cafe operating in Wangsa Maju, Kuala Lumpur. The founder, like most SME owners, was spending significant time manually reviewing bank statements, estimating her cash position, and struggling to answer the financial questions her investors needed answered quickly.
There was no unified system connecting banking data, POS sales, and operating costs into a single, intelligent view of the business. 15 months of transaction history sat locked in PDF statements. The POS system held sales data that no one was analyzing systematically
9,112
bank transactions ingested
26,000+
POS records synced
15+
month of history, banking and POS
7am
daily CFO brief, before opening
DBedge built a complete AI-powered financial intelligence system from scratch — automated data pipelines, a structured financial database, and a two-way AI assistant delivered via Telegram. The owner now receives a daily CFO-style brief every morning, and the entire team, including three investor-lawyer stakeholders, can ask natural language questions about business performance at any time
THE PROBLEM
Visibility without infrastructure is guesswork.
The financial picture was scattered across disconnected sources. Assembling a clear view required manual effort — and the picture was always slightly out of date by the time it was ready.
Bank statements in PDF. 15+ months of history locked in documents nobody could query.
Investor questions unanswered. Every request meant hours of manual data preparation.
Transactions unclassified. No categorization meant no meaningful breakdown of where money went.
Manual reporting overhead. Effort spent assembling numbers instead of acting on them.
No P&L visibility. Cash position was an estimate, checked reactively when something felt wrong.
POS data siloed. Sales records sat in StoreHub, disconnected from anything financial.
WHAT WE BUILT
Four automated workflows, one continuous loop.
Data flows in from banking and POS sources, gets structured and categorized, and flows out as daily briefs and real-time Q&A answers.
Workflow 01
Financial Database Load
A Google Drive upload triggers automated PDF ingestion. Bank statements are parsed into structured transaction records and inserted into the financial database with deduplication.
Workflow 02
Storehub POS Sync
Scheduled daily at 6:00 AM. Syncs products, transactions and line items from the StoreHub POS API into Supabase, enabling cross-database revenue and sales analysis.
Workflow 03
Daily Financial Brief
Scheduled at 7:00 AM daily. Queries the financial database, generates a CFO-style summary via AI, and delivers it to Telegram before the working day begins.
Workflow 04
Financial Chat Assistant
A two-way AI assistant on Telegram. Natural language questions trigger SQL generation, database execution and CFO-grade answers. Supports both owner and investor access roles.
The pipeline follows a four-stage data engineering methodology and is deliberately source-agnostic: new data sources connect at the ingestion layer without disrupting downstream logic.
What the stakeholders get every day
Three capabilities, all delivered through a messenger they already use.
The 7am CFO Brief
Every morning at 7:00 AM the owner receives a structured financial summary before the working day begins. It covers the previous day's activity and month-to-date position, written by AI in plain business language, not raw database output.
The brief understands business context — the difference between card terminal settlements and bank processing fees, and which months contain pre-opening capital to exclude from operational figures automatically.
Operational & Sales Queries
The owner and investors can ask operational questions at any time. The system queries the financial database, runs analysis across both banking and POS data, and returns structured answers in seconds.
Supplier spending, salary totals, top-selling products, payment method breakdowns and daily revenue are answered directly — no spreadsheet, no waiting, no manual preparation.
Agentic CFO Reasoning
The most powerful capability: the system reasons across both banking and POS datasets simultaneously to answer strategic questions — the kind usually reserved for an actual CFO or financial consultant.
For complex questions the AI generates multiple SQL queries across different data dimensions, merges the results, and synthesizes a structured strategic answer.
INTELLIGENCE COVERAGE
What the system knows.
The assistant draws on two integrated data sources — 15+ months of bank transaction history and 15+ months of POS sales data — to answer questions across four intelligence domains. A fifth becomes available once product cost data is entered.
Cash Flow Intelligence
Position, inflows and outflows, supplier and salary spend.
Sales Intelligence
Top products, daily revenue, payment method breakdowns.
CFO Reasoning
Cross-database strategic questions — hires, expansion, affordability.
Profit Intelligence · pending
Unlocks once product cost prices are entered in the POS.
UNDER THE HOOD
Three engineering decisions underpin the accuracy of the system.
These are not features — they are constraints by design, ensuring financial data is always correct and answers are always drawn from real records.
INGESTION
Deterministic data extraction
Statement parsing is rule-driven, not guessed. The same PDF always produces the same records, and deduplication stops a re-upload from double-counting.
QUERY
Two-stage AI query architecture
The AI writes SQL, the database answers it. Numbers come from real records, never from the model's own recall.
CLASSIFICATION
Capital vs revenue separation
The AI writes SQL, the database answers it. Numbers come from real records, never from the model's own recall.
SECURITY MODEL
Access is controlled by a Telegram user ID whitelist with role-based response logic. Unauthorized users are silently rejected.
Owner
Full transaction-level detail, including staff names and individual amounts.
Investors
Aggregated totals only — no individual staff or transaction data.
Always live
Every query executes against the live database. There is no static report that can become stale.
LIMITATION & ROADMAP
What we know, and what's coming.
Product cost data — gross profit pending
COGS, gross margin and a true P&L require product cost prices in the POS. 176 of 197 products currently have null cost prices. One action from the owner unlocks an entire profit intelligence layer.
WhatsApp as alternative delivery
Telegram is the current channel. WhatsApp integration is planned, though Meta manager verification is proving a challenge for both sides. It would let clients receive briefs and query data without leaving their primary messaging app.
Budget vs actual comparison
A budgets table is the next infrastructure addition. Once live, every financial query can be answered in the context of targets, not just actuals — the natural next step after the P&L layer is active.
Peak hour & seasonal analysis
15+ months of POS data now exists — enough to identify peak trading hours and seasonal patterns. Next on the development roadmap, requiring UTC+8 timezone conversion and pattern detection queries.
RESULTS & BUSINESS IMPACT
BEFORE
AFTER
No daily financial visibility — the owner only checked statements after something felt wrong
CFO-style brief delivered at 7am every day; first financial awareness before the cafe opens
15+ months of bank history fully ingested; 9,112 transactions categorized and queryable in seconds
Manual PDF review to understand cash position — reactive, never proactive
Three investor stakeholders query financial performance directly via Telegram, no preparation needed
Investor questions required hours of manual data preparation per request
Pre-opening capital cleanly separated; every revenue figure is operationally accurate
Capital injections mixed with operational revenue, inflating the P&L picture
Strategic questions (“can we afford a second outlet?”) required a consultant or manual modelling
AI generates multi-query cross-database analysis for strategic questions on demand
Both databases unified; cross-database CFO reasoning answers expansion and hire questions in real time
POS and banking data completely siloed — no cross-system analysis possible
Ready to give your business its own C-Suite brain?
From raw bank statements and POS data to daily AI-powered briefs and real-time financial Q&A. DBedge builds the complete intelligence stack for F&B, retail and SME businesses.
