Case Study: F&B AI Financial Intelligence System

Client: Didis Cafe and Bakery

Industry: F&B, Cafe & Bakery

Scope: Data Engineering, Ai, Automation

Executive Summary: From Bank Statements & POS system to Business Intelligence

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.

The problem wasn't effort, it was infrastructure. 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.

Dbedge built a complete AI-powered financial intelligence system from scratch — automated data pipelines ingesting over 9,100 bank transactions and 26,000+ POS records, 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

Before the system was built, 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.

  • Monthly Maybank statements required manual review. No automated extraction, no trend tracking across months.

  • Stakeholders needed regular financial visibility. Getting them answers required hours of manual preparation.

  • Raw bank data has no business context. Supplier payments, salary runs, card settlements, and capital injections all looked the same.

  • Revenue, supplier costs, operating expenses - all lived in different places. No consolidated profit & loss picture existed.

  • StoreHub POS had sales data, but it was disconnected from banking data, no way to reconcile revenue or track COGS.

  • Every financial review required significant manual effort, pulling data, formatting summaries, calculating totals by hand.

What We Built: A Four-Layer Intelligence System

The DBedge system is built on four automated workflows, each with a distinct role in the intelligence pipeline. Together they form a 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..

Financial Database Load

Google Drive upload triggers automated PDF ingestion. Bank statements are parsed into structured transaction records and inserted into the financial database with deduplication.

WORKFLOW 1

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 2

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 3

Financial Chat Assistant

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.

WORKFLOW 4

Data Architecture: The Intelligence Pipeline

The system follows a four-stage data engineering methodology. Each stage has a defined role, transforming raw, unstructured source data into actionable business intelligence. The pipeline is designed to be source-agnostic: new data sources connect at the ingestion layer without disrupting downstream logic.

The Three Capabilities: What Didis' Stakeholder Gets Every Day

The system follows a four-stage data engineering pipeline. Each stage has a defined role — transforming raw, unstructured source data into actionable business context. The pipeline is designed to be source-agnostic: new data sources connect at the ingestion stage without disrupting downstream layers.

Take note: Due to data privacy and security obligations, below snapshots are purely demonstrative but resonates the output of the C-Suite system. Book a call to find out more.

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. It knows the difference between card terminal settlements and bank processing fees. It knows which months contain pre-opening capital and excludes them 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.

Questions about 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 can reason across both banking and POS datasets simultaneously to answer strategic business 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. This is cross-database analysis in plain language.

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 domain becomes available once product cost data is entered.

    • Monthly cash in / cash out / net position

    • Salary and payroll totals by month

    • Supplier spend (category + keyword matched)

    • Rent, utilities, EPF statutory costs

    • Capital injection tracking (isolated from revenue)

    • Investor payment records

    • Daily and monthly POS revenue

    • Top selling products with category breakdown

    • Payment method split (Card / DuitNow / Cash)

    • Average transaction value trends

    • Channel analysis (dine-in vs delivery)

    • Transaction volume and frequency patterns

    • Expansion and hire affordability analysis

    • Fixed vs variable cost breakdown

    • Revenue trend and quarterly analysis

    • Break-even calculations

    • Second outlet viability with targets

    • Cash reserve and runway assessment

    • Gross profit margin per product

    • COGS per transaction

    • Full P&L statement

    • Margin by product category

Under the Hood: What Makes it Reliable

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

  • Bank statement parsing uses rule-based logic, not AI, for structured transaction data. This eliminates hallucination risk, ensures complete field accuracy, and removes per-document AI costs. AI is reserved for interpretation, never extraction.

  • Financial questions trigger a two-step process: the AI generates targeted SQL, the database executes it and returns only the relevant rows, then a second AI call formats the CFO-grade answer. Answers are always drawn from real data, never approximated from context.

  • The system enforces strict classification of capital injections vs. operational revenue. Pre-opening funding is tagged and excluded from all revenue calculations. Financial reporting is clean by architecture, not by remembering to filter manually.

Security Model

Access is controlled by a Telegram user ID whitelist with role-based response logic. The owner receives full transaction-level detail including staff names and individual amounts. Investors receive aggregated totals only — no individual staff or transaction data. Unauthorized users are silently rejected. Every query is executed against the live database, there is no static report that can become stale.

Limitations & Roadmap: What We Know, What's Coming

Below is a roadmap on what’s in the pipeline.

Product cost data — gross profit pending

COGS, gross margin, and true P&L require product cost prices to be entered in the POS system. 176 of 197 products currently have null cost prices. One action from the owner unlocks an entire profit intelligence layer.

WhatsApp as alternative delivery channel

Telegram is the current delivery channel. WhatsApp integration is planned but meta manager verifications is proving to be a challenge for both sides. This however enables clients the option to receive briefs and query data without leaving their primary messaging app.

Budget vs actual comparison

A budgets table is planned as the next infrastructure addition. Once live, every financial query can be answered in context of targets, not just actuals. This is the natural next step after the P&L layer is active.

Peak hour and seasonal pattern analysis

Sufficient POS data (14+ months) now exists to identify peak trading hours and seasonal patterns. This analysis layer is next on the development roadmap — requiring UTC+8 timezone conversion and pattern detection queries.

Technology Stack: Built on Production-Grade Infrastructure

  • Technology: n8n v2.12

    Role: Orchestrates all 4 workflows — ingestion, daily brief, chat assistant, POS sync.

  • Technology: Supabase ((PostgreSQL)

    Role: Central storage

  • Technology: Claude Sonnet — Anthropic API

    Role: SQL generation, CFO brief writing, cross-database reasoning, answer formatting.

  • Technology: StoreHub REST API

    Role: Daily sync of products, transactions, line items — 197 products, 26,000+ transactions.

  • Technology: Maybank PDF Statements

    Role: Monthly data ingested, 20 categories assigned.

  • Technology: Telegram Bot

    Role: Push delivery for daily brief; inbound webhook for real-time Q&A; role-gated access.

Results & Business Impact

Before

  • Manual PDF review to understand cash position, done reactively, never proactively.

  • No daily financial visibility, owner only checked statements after something felt wrong.

  • Investor questions required hours of manual data preparation per request.

  • Capital injections mixed with operational revenue, inflated P&L picture.

  • POS and banking data completely siloed, no cross-system analysis possible.

  • Strategic questions (can we afford a second outlet?) required consultant or manual modelling.

After

  • 15 months of bank history fully ingested; 9,112 transactions categorized and queryable in seconds.

  • CFO-style brief delivered at 7am every day; first financial awareness before the cafe opens.

  • Three investor stakeholders can query financial performance directly via Telegram, no preparation needed.

  • Pre-opening capital cleanly separated; every revenue figure is operationally accurate.

  • Both databases unified; cross-database CFO reasoning answers expansion and hire questions in real time.

  • AI generates multi-query cross-database analysis for strategic questions on demand.

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 across Malaysia.

Previous
Previous

End-to-End Data Analytics & Engineering for Subscription Growth