AI-powered invoice processing
When data is the business, how it is generated matters just as much as the analysis that follows.
At Clickie, a company specialized in analyzing and optimizing utility consumption, this is especially critical. Its operation depends on transforming invoices —electricity, water, and gas— into structured information that enables period comparisons, deviation detection, and optimization opportunities.
The company operates from Chile, serving clients across Latin America, including Peru and Mexico. This regional context, combined with business growth, introduced a key variable: diversity. Diversity in formats, providers, and regulations.
And with that, a new challenge: scaling invoice processing without compromising quality or traceability.
When data depends on processes that don’t scale
Invoice digitization was a fully manual process. Specialized teams collected documents from multiple sources —emails, self-service portals, or automations— downloaded them, and manually entered each field into the system.
This approach ensured quality, but had clear limits.
As the number of clients and markets grew, so did complexity:
Higher document volume
More formats and layouts
More provider- and country-specific rules
The friction point emerged from the combination of these factors. operational effort grew faster than processing capacity, making it difficult to sustain growth.
Each new variation required more configuration, more monitoring, and higher costs.
The challenge was not automating a single process, but building a solution capable of adapting to variability without constant adjustments.
Beyond digitization: an intelligent processing problem
This type of challenge falls into a broader category: intelligent document processing.
It’s not just about reading information, but transforming it into structured, validated data ready for critical operations.
A common misconception here is assuming that artificial intelligence can fully replace human judgment.
In practice, especially with financial documents, value comes from combining:
Automated reading and extraction
Business rules for validation
Explicit exception handling
Review and approval workflows
AI accelerates the process, but data governance remains the responsibility of systems and people.
From OCR to language models: a shift in approach
What is a OCR?
OCR (Optical Character Recognition) is a technology that converts text within images or scanned documents into editable digital text. In other words, it takes a pdf or an image (for example, an invoice) and transforms it into text that a system can read, process, and store.
The starting point was a traditional approach: template-based OCR.
This works well when formats are stable, but as the business scaled, its limitations became evident. Maintaining rules and configurations for each variation became the main bottleneck —in both cost and implementation time.
The decision was to shift the approach: instead of parametrizing every invoice, the focus moved to generalization. This meant adopting language and vision models for extraction, complemented by business validations and human approval.
To support this, a scalable and traceable architecture was designed:
Asynchronous processing via queues, with concurrency control based on model limits
Document state management with event-driven reactions (e.g., approvals)
Decoupled backend exposed via GraphQL API
Secure authentication for data operations
This design enables elasticity, clear separation of concerns, and full traceability across the document lifecycle.
As with any architectural decision, there were trade-offs. Time-to-market and adaptability were prioritized over case-specific optimization, implying model usage costs and higher operational complexity.
But it enabled something critical: scaling without redesigning the system for every new variation.
A processing pipeline designed to evolve
The implemented solution works as a pipeline where each stage plays a specific role.
Documents enter the system (manually or automatically) and go through an orchestration process:
Documents are queued for processing
The extraction engine interprets and structures the data
States, validations, and exceptions are recorded
Users intervene when review or approval is needed
The entire flow is logged, ensuring end-to-end traceability.
Technologically, the solution relies on serverless services for elastic, event-driven execution, along with a GraphQL accessible data model. The system’s core —orchestration, validation logic, and state flow— is fully custom, tailored to the billing domain.
The role of IA in the system
Artificial intelligence solves a specific problem: standardizing invoice reading across diverse layouts into a unified data model.
Using language models such as Google’s Gemini, the system interprets documents from different services, providers, and countries, accelerating the transformation from document to structured data. However, its use has clear limits.
AI does not define business rules, make final decisions, or replace accountability over data. Its role is to prepare information for efficient validation and use.
This is a supervised automation approach, where technology augments human capabilities rather than replacing them.
A new balance between scale and control
Document processing shifts from fully manual input to an automated flow, where human intervention is focused on exceptions and validation.
This enables:
Increased processing capacity without proportional team growth
Onboarding new formats without creating specific rules
A unified review and approval workflow
Complete and auditable traceability
Key takeaways: human-in-the-loop model
Beyond this specific case, there are recurring lessons in these scenarios.
Defining a human-in-the-loop model from the start, clearly separating processing stages (extraction, validation, persistence), and explicitly managing model usage are decisions that directly impact system sustainability.
There are also non-technical factors: success depends heavily on internal alignment and sponsorship to drive operational change.
For organizations with high document volume, multi-country operations, and heterogeneous formats, the path is usually similar: start small, define clear metrics, and treat AI as a governed accelerator —not a shortcut.
When volume doesn’t justify it, or when validation workflows are unclear, the complexity of these solutions may not pay off.
Scaling also means rethinking the problem
Not all automation challenges are solved by adding more rules. In contexts where variability is the norm, scaling means designing systems that can adapt from the start.
This case shows that combining architecture, data, and artificial intelligence is not just a technical decision —it’s a different way of building processes designed to grow.
Interested in this approach and thinking about implementing something similar in your organization?
Let’s talk. Coffee’s on us 😉☕️
