DEV Community

Cover image for OrderlyAI: Turning Messy Customer Messages into Orders with Local AI
Sathvika Talari
Sathvika Talari

Posted on AI-assisted

OrderlyAI: Turning Messy Customer Messages into Orders with Local AI

OrderlyAI: Turning Messy Customer Messages into Orders with Local AI

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

What I Built

OrderlyAI — Smart Orders. Local AI. Greater Control.

Small businesses receive customer orders through WhatsApp messages, SMS, and other informal text conversations. Turning these messages into organized records takes time, and mistakes in product quantities, prices, or delivery instructions can cause problems.

I built OrderlyAI, an AI-powered order management application that transforms unstructured customer messages into structured, editable order drafts.

Instead of manually copying every product into a spreadsheet, a shopkeeper can paste a customer message into OrderlyAI. The application uses Gemma 3 to extract available customer details, products, quantities, prices, and delivery instructions. The shopkeeper can review and correct the extracted information before confirming the order.

Key Features

  • AI-Powered Order Extraction: Converts natural-language customer messages into structured order details using Gemma 3.
  • Review Before Saving: Allows users to edit customer information, product quantities, units, and prices before confirming an order.
  • Order Calculations: Calculates line-item totals and the overall order total.
  • Order Management: Provides a searchable order directory with order-status updates.
  • Business Dashboard: Displays order activity and recorded sales.
  • CSV Export: Allows users to export order records for spreadsheets and business reporting.
  • Offline Fallback: Uses a local heuristic parser for basic extraction when Ollama is unavailable.
  • Document Processing: Includes tested parsing components for CSV, Excel, and plain-text files, with PDF extraction implemented.
  • System Diagnostics: Helps users inspect the local AI service, installed models, and database status.

OrderlyAI is designed for grocery shops, kirana stores, bakeries, home-food businesses, independent retailers, and other small sellers who want to reduce repetitive data entry.

My goal is to make AI genuinely useful for everyday business operations while keeping the shopkeeper in control of the final order.

Demo

Try OrderlyAI: Open the deployed application

Watch the demonstration: View the OrderlyAI demo video

The demonstration is intended to show how a customer message becomes an editable order, followed by order confirmation, tracking, and CSV export.

Note: Local Ollama availability and AI extraction on the hosted application depend on the deployed configuration. The local AI setup has been verified separately.

Code

GitHub Repository: SathvikaTalari/OrderlyAI

The repository contains the application source code, AI extraction logic, database operations, and supporting tests.

You can explore the implementation, run the application locally, and extend it for different small-business workflows.

How I Built It

OrderlyAI is built with Python and Streamlit. Its modular architecture separates the user interface, AI processing, and database operations.

Technology Stack

  • Gemma 3: The open-weight language model used to interpret unstructured customer order messages.
  • Ollama: Runs the model locally and provides an API for the Python application.
  • Python: Powers the application logic, extraction pipeline, and database operations.
  • Streamlit: Provides the interactive dashboard and order-management interface.
  • SQLite: Stores orders and associated order items in the local configuration.
  • Pandas: Supports tabular data processing and CSV exports.
  • Pytest: Tests database operations, extraction handling, file parsing, and error handling.
  • PyPDF and Openpyxl: Support PDF and Excel file processing.

How the AI Workflow Works

The main workflow is:

Customer Message → AI Extraction → Validation → Human Review → Confirmation → Saved Order

The application sends a customer message to the configured Ollama service, where Gemma 3 processes the prompt and generates structured order information.

The extraction pipeline handles JSON responses, validates extracted values, and preserves missing information rather than intentionally filling gaps with invented details.

Users can correct the extracted information before saving an order.

When Ollama is unavailable, the application can fall back to basic rule-based extraction and continue supporting manual order management.

This approach combines AI assistance with human verification rather than treating every model response as automatically correct.

Testing and Verification

I ran the automated test suite and performed checks on the local database, Ollama service, and document-processing components.

Automated test results: 21/21 passed

The Pytest suite completed successfully in 10.49 seconds.

The tests cover:

  • Database operations: Initialization, order creation and retrieval, search and filtering, status updates, deletion, and DataFrame export.
  • AI extraction: JSON parsing, Markdown-fenced responses, invalid JSON handling, missing-value normalization, and prevention of invented information.
  • Offline resilience: Heuristic fallback extraction and handling of unavailable Ollama services.
  • File processing: CSV, Excel, and plain-text parsing, file-size formatting, empty-file handling, and unsupported formats.
  • AI service error handling: Ollama offline-status and completion-failure handling.

Database integrity

The local SQLite database passed its structural integrity check. At the time of verification, it contained:

  • 4 orders
  • 12 associated order items
  • 17 product-catalog entries

Local AI verification

The Ollama service responded successfully at http://localhost:11434/api/tags, and the gemma3:4b model was installed and recognized.

Testing environment: Windows, Python 3.14.0, and Pytest 9.1.1.

These results verify the listed automated tests and local component checks. They do not, by themselves, establish extraction accuracy across all real-world messages or prove that every feature works end to end in the hosted deployment. Further testing with realistic customer messages and actual users is an important next step.

Why Does Open Innovation Matter?

For OrderlyAI, open innovation is not simply a technology choice. It changes how small businesses can access, control, and adapt AI.

1. Privacy and Local Data Control

In the local configuration, Ollama runs Gemma 3 on the user's computer. Customer messages can be processed without sending them to a hosted AI inference API.

This gives businesses greater control over their customer information, provided the application is configured to use only local services.

2. Offline Operation

After Ollama, the model, and the required software have been installed, local AI inference and database operations can work without an internet connection.

If the AI service becomes unavailable, the application can fall back to basic extraction or manual order management.

3. Freedom to Experiment

Using an open-weight model gives me the flexibility to modify extraction prompts, validate outputs, experiment with compatible models, and adapt the application to different business requirements.

For example, future versions could improve support for informal messages and mixed Telugu-English communication used by small businesses in Telangana.

4. A Different Cost Structure

Local inference avoids per-request charges from a hosted AI API. This can make repeated order processing more economical for some users.

However, local inference still requires suitable hardware, electricity, software maintenance, and model storage. It is not automatically cost-free.

5. Transparency and Human Control

Local model access makes it possible to inspect and experiment with the extraction workflow. Since language models can misunderstand quantities, prices, and informal messages, OrderlyAI combines AI-generated results with editable fields and explicit user confirmation.

The objective is not to replace the shopkeeper's judgment. It is to reduce repetitive work while leaving important business decisions with the user.

Gemma 3 is an open-weight model, and its applicable terms of use must be followed. OrderlyAI demonstrates how open-weight AI can be incorporated into a practical application without making a paid hosted AI API a requirement for the local workflow.

Prize Categories

  • Best Use of Gemma

Conclusion

OrderlyAI started with a simple question:

What if a small shopkeeper could turn a messy customer message into an organized order in seconds, without manually entering every detail?

By combining Gemma 3, Ollama, Python, Streamlit, and SQLite, I built an application that explores this idea through AI-assisted order extraction, editable order drafts, order tracking, and business reporting.

The project is an ongoing effort to make local AI practical for small businesses. My next priority is to test it with real shopkeepers, measure extraction accuracy and time saved, and improve the experience based on their feedback.

Smart Orders. Local AI. Greater Control.

Top comments (0)