Back to blog

AI agent for Defontana: from the balance sheet to your customer's WhatsApp

How to connect Defontana with an AI agent in a Chilean or LATAM company: API integration, typical use cases and how to get started.

Defontana is one of the most widely used cloud ERPs in Chile and is growing in other Southern Cone countries. This post explains how it connects to an AI agent, what it automates first and what your company needs to get started. We wrote it for someone who already operates Defontana and wants to add an AI layer on top of the ERP's data.

The advantage of Defontana versus other LATAM ERPs is that it's cloud-native and has a documented API. That simplifies AI agent integration: no need to touch databases or set up intermediate layers. The connection happens between two cloud services talking over HTTP. What changes is what sits on top — the conversation with the customer, the decision about what to do with each case, the traceability.

What kind of company uses Defontana

Small and mid-sized Chilean companies, with growing adoption in Argentina, Peru and Colombia. Focus on accounting, electronic invoicing for Chile's SII, receivables control, payroll and purchasing. Typical sectors: professional services, retail, distribution, light manufacturing, construction.

The typical internal profile: an accountant or administrative lead who operates Defontana as the central system, an administrative team of 2 to 10 people depending on size, and monthly financial reports built from the data living in the ERP. Operational decisions (who to collect from, what to bill, what to pay) are made with Defontana data.

When we propose automating with an AI agent on top of Defontana, the right mental picture is: the ERP remains the source of truth, the agent reads the data it needs, runs WhatsApp conversations with customers, and logs each interaction for the team to see. Without migrating anything, without changing administrative operations.

Why connect Defontana with an AI agent

Four processes where the combination pays off quickly.

Receivables recovery. The agent reads overdue invoices from Defontana and runs WhatsApp collections respecting Chilean business hours. More detail in how to automate WhatsApp collections.

Accounting reports in natural language. "Which customers have the highest open balance this quarter?", "What was the average collections rotation last month?". The agent queries Defontana and replies without anyone hand-building a report.

Payment validation. Against the movements recorded in Defontana, without entering the system. When a customer reports paying, the agent verifies the next day and closes the case if confirmed.

Product mix analysis. With Defontana's billing data, the agent can tell you which products grew, which dropped, which customer changed their buying pattern. Useful for management and for the sales team.

How Pacunex connects to Defontana

The preferred path is the official Defontana API with tokenized authentication. That's what Defontana covers as a cloud product and what scales best. Critical queries — customers, pending invoices, payments, products — are exposed as REST endpoints.

Standard procedure:

  1. Request API credentials from Defontana. The process is internal to the customer: someone with administrative permissions at the company requests API access through Defontana's support or from the console if enabled.
  2. Identify the relevant endpoints for the processes to automate. For collections: customers, receivable documents, payments. For reports: sales documents, products. The exact list is validated during rollout per the customer's version.
  3. Configure authentication and rate limits in the agent. Defontana, like most corporate APIs, has usage limits. The agent must respect them with caching and spaced queries.
  4. Test against the staging environment when available. Validation with real data is done on a contained scope before enabling full operation.

For cases where the official API doesn't cover a specific need, the fallback path is database read. Less common with Defontana because it's cloud, but hybrid installations exist. The three general integration paths with any ERP are covered in how to connect your ERP with WhatsApp.

What the agent can do with Defontana data

Once connected, the agent can:

  • Manage 30-60-90 day receivables with HSM templates approved for WhatsApp Chile, respecting business hours and national holidays.
  • Confirm payments against movements recorded in Defontana the day after the payment is reported.
  • Generate natural-language reports by cost center, branch, salesperson or product.
  • Escalate complex cases to the team with full history: customer, invoice, age, prior exchanges, detected intent in the last message.
  • Build sales briefings from Defontana's sales history, useful for field sales teams.
  • Detect receivables anomalies — customers who changed their payment pattern, invoices stalled for too long, upcoming due dates without action.

Each interaction is logged with timestamp, content, detected intent and action taken. Traceability is complete and exportable when audit is needed.

What your company needs to start

Defontana API credentials. Obtained from the console or by requesting from support. This is the condition that most often causes delays when not anticipated.

WhatsApp Business API account. If you don't have one, it's set up with an authorized BSP during rollout.

Clear operating rules. Business hours, Chilean holidays, escalation amount threshold, monthly contact cap per customer. Ideally, a one-page document with the written rules.

A project owner. Ideally whoever oversees collections or interacts with Defontana daily. Automation works better when someone in the company operates and improves it.

Typical cases

Chilean importer with 600 B2B customers. The collections agent automates 30+ day receivables. The administrative team is freed from repetitive management and handles only complex cases and disputes. Coverage of receivables contacted in the first 7 days rises significantly. The +60 portfolio, previously written off, gets worked again.

Construction company with 12 active projects. The analyst agent answers natural-language questions per project: how much was billed, what's pending, which customers are current. Management queries without waiting for reports. The administrative team doesn't build spreadsheets by hand.

Chilean SaaS services company with monthly subscriptions. Monthly recovery without chasing the customer. The agent identifies overdue subscriptions, contacts with the right tone, registers promises, validates payments. Churn from payment failure drops.

Chilean compliance and operation

Chile has a clear personal data protection framework in Ley 19.628. Three practical points for a WhatsApp collections operation:

  • Explicit consent. Each customer must have agreed to receive commercial or collections communications via WhatsApp at some point. If you can't demonstrate consent, you can't make contact.
  • ARCO rights. The customer can request access, rectification, cancellation or opposition. The agent must be ready to respond to a "delete my data" or "don't send me more messages".
  • Hours and forms. By convention and good judgment, collections between 8:00 and 20:00 local time. No messages on national or regional holidays.

Full per-country compliance detail in WhatsApp Business compliance for LATAM companies.

How to measure if it works

Operational (weekly). Coverage of receivables contacted. Customer reply rate. Human escalation rate.

Financial (monthly). Average days sales outstanding. Evolution of receivables by bracket. Promises registered vs. kept. Effective recovery.

Team (monthly). Time spent on repetitive management, before vs. after. Cases where the team added real value (negotiation, refinancing, customer retention).

As in any automation project, serious measurement requires a baseline. Without it, every change looks like improvement.

Common mistakes when rolling out on Defontana

Not anticipating the API credential lead time. Defontana, like any cloud vendor, requires an internal process to deliver API access. Start the request on day one of the project.

Saturating the API. If the agent queries without caching, rate limits fill quickly. The architecture should prioritize necessary queries and cache the stable parts (product catalog, active customer list).

Generic template messages. This isn't a Defontana problem, it's an agent problem: each message must use customer name, specific invoice and exact amount pulled from the ERP.

Not mapping Chilean holidays. Defontana has the accounting data; the agent separately needs the holiday calendar to avoid contacting on inappropriate dates.

Why Defontana makes automation easier than other ERPs

It's worth naming why Defontana is particularly comfortable for adding an AI agent, compared to traditional on-premise ERPs.

It's cloud-native. No VPN tunnels or intermediate servers to set up. The API is accessible over HTTPS from any authorized point.

It has documented APIs. Endpoints are published, no reverse engineering needed. The implementation team can read the docs and move forward without waiting for support replies.

It manages identity and permissions. API tokens are managed with clear platform policies. The company can revoke access without touching infrastructure.

It supports third-party integration as standard practice. Unlike ERPs where external integration is exceptional and disruptive, Defontana expects external services to connect. That eases interactions with their support and reduces internal friction.

For companies coming from local ERPs and migrating to Defontana, this difference is one of the major practical benefits of moving to the cloud. For companies already on Defontana, it's an advantage worth leveraging.

Next steps

Tell us about your Defontana setup on WhatsApp and which process you want to automate first. We'll give you a concrete plan with the exact endpoints we'll use and the proposed initial templates for Chile. More detail on per-ERP integrations in AI agents by ERP.