How to Build an AI Agent for Billing & Trust Unlocks
Learn how to build an AI customer service agent for duplicate billing and trust unlocks. Integrate SGP or IXC APIs securely and automate your ISP support.
- AI for ISPs
- Customer Service
- Process Automation
- Telecom AI

The Monthly Nightmare of ISP Billing Support
If you run a regional Internet Service Provider (ISP), you already know what happens during the first week of every month. Your support queues explode. Customers who forgot to pay their bills suddenly find their connections blocked and flood your WhatsApp lines.
They usually want two things: a duplicate billing slip (2ª via de boleto) or a temporary connection restore. Handling these requests manually is a massive drain on your team. It slows down responses for real technical issues and frustrates customers who just want to pay you.
The solution? Building an AI customer service agent that handles these specific financial requests instantly, 24/7. Let's break down the exact step-by-step process to automate your duplicate slips and temporary unblocks securely.
Step 1: Customer Authentication and Data Security
Before an AI can hand over financial documents or alter connection statuses, it must know exactly who it is talking to. A robust AI customer service agent starts every interaction with strict identity verification.
When a customer messages your WhatsApp asking for a bill, the AI should prompt them for their CPF or CNPJ. But asking for a document number isn't enough for true data security. The system must cross-reference this input with the registered phone number in your database.
If the WhatsApp number matches the one linked to the CPF in your ERP, the AI proceeds. If not, it can trigger a secondary security question, like the customer's date of birth or the installation address. This prevents unauthorized access to sensitive billing information.

Step 2: Debt Consultation via ERP Integration
Once the customer is authenticated, the AI needs to check their financial status. This is where API integrations become the backbone of your automated operation. The AI performs a real-time debt consultation directly within your management software.
If you use popular Brazilian ISP systems, you will likely connect the AI using the IXC API or the SGP API. These APIs allow the AI to "read" the customer's profile without any human intervention.
- Check open invoices: The AI identifies which bills are overdue and calculates updated interest or late fees.
- Verify connection status: The system checks if the customer is currently active, reduced, or fully blocked due to non-payment.
- Identify payment methods: It retrieves the specific Pix copy-paste code or the PDF barcode linked to that exact invoice.
The beauty of this process is that you can integrate seamlessly without changing your system. The AI acts as a digital bridge between your customer's WhatsApp and your ERP's database.
Step 3: Setting Eligibility Rules for Trust Unlocks
Not every blocked customer should be allowed to unlock their internet automatically. A trust unlock (desbloqueio de confiança) is a temporary courtesy, usually lasting 48 to 72 hours, giving the customer time to process their payment.
To protect your ISP from abuse, your AI must enforce strict eligibility rules. During the API consultation, the AI evaluates the customer's history against your business logic.
| Eligibility Criteria | AI Action |
|---|---|
| First request in 30 days | Approves trust unlock automatically |
| Invoice is more than 15 days late | Denies request, transfers to human agent |
| Customer already used a trust unlock this month | Denies request, offers Pix code for instant payment |
| High-risk customer profile | Denies request, explains policy politely |
By hardcoding these rules into your AI workflow, you eliminate human error. Your support agents won't be manipulated into granting unblocks to chronic non-payers, ensuring your cash flow remains protected.
Step 4: Executing the Action and Delivering the Slip
The final step is execution. The AI has authenticated the user, checked the debt, and validated the rules. Now, it must deliver the requested service flawlessly in a matter of seconds.
If the customer requested a duplicate slip, the AI uses the SGP API or IXC API to generate a fresh, updated billing link. It sends a friendly message: "Here is your updated invoice. You can pay using this Pix code: [Code] or download the PDF here: [Link]."
If the customer requested a trust unlock and is eligible, the AI sends a POST request to your ERP. This command automatically provisions the router to restore the connection. The AI then replies: "Great news! Your connection has been temporarily restored for 48 hours. Please ensure the payment is made by tomorrow to avoid a new block."

The Business Impact of Automating Financial Support
Implementing an AI for these specific tasks transforms your ISP. A typical regional provider processing 5,000 subscribers might handle over 800 billing-related messages a month. That is dozens of hours wasted on repetitive clicks.
When an AI takes over, your human agents are suddenly free to handle complex technical support or proactive sales. Customer satisfaction skyrockets because nobody likes waiting 40 minutes in a queue just to get a barcode to pay a bill.
Furthermore, offering instant Pix codes via WhatsApp dramatically reduces your default rates. The easier you make it for a customer to pay, the faster money enters your account. It is a simple upgrade that pays for itself in the first few weeks of operation.
Frequently Asked Questions
What is a trust unlock (desbloqueio de confiança)?
It is a temporary restoration of internet service for a customer who was blocked due to non-payment. It usually lasts 2 to 3 days, giving them time to pay their overdue invoice without losing connectivity.
Is it safe to integrate my ERP with an AI?
Yes. By using official endpoints like the IXC API or SGP API, the AI only accesses the specific data it needs. Strict data security protocols, such as CPF and phone number matching, ensure that billing info is never leaked to the wrong person.
Can the AI deny a trust unlock if the customer abuses it?
Absolutely. You can set custom parameters in the AI's logic. If a customer has already used their allowed unblocks for the month, the AI will politely deny the request and offer a payment link instead.
Do I need a new billing system to use an AI customer service agent?
No. Modern AI solutions connect directly to your existing software. As long as your current ERP has an accessible API, the AI can read invoices and send unblock commands seamlessly.
