All Posts
NL-to-SQLaccount datasubscription supportdatabasecustomer data

NL-to-SQL in Support: Account Data Questions Your Bot Can Answer Safely

The previous post in this series covered order-status lookups. Account questions are the same pattern on different tables — and the stakes are higher, because the answers are personal. Here are the five account questions worth automating, the ones to keep with a human, and the guardrails that decide whether customers trust the bot with their data.

CChatonn Team9 min read

The order-status lookup was the easy case. An order is a fact with a date on it: shipped, delivered, refunded. The customer asks, the bot reads one row, the answer is verifiable in seconds.

Account questions are the same pattern on different tables, with higher stakes. A balance, a plan tier, a renewal date, a loyalty-points total — these are personal, and showing the wrong person's money is a data breach in miniature. Get the guardrails right and you have automated the second-biggest block of repetitive support questions after order status.

The five account questions worth automating

Not every account question belongs to a bot. Start with the five that are read-only, verifiable, and high-volume:

1. What is my current balance? The amount owed, or the credit on the account, as of right now.

2. What plan am I on, and what does it include? Plan name, included limits, and what is used so far this cycle.

3. When does my subscription renew, and for how much? Renewal date and the amount that will be charged.

4. How many loyalty points do I have, and when do they expire? Points balance, expiry date, and what they are worth.

5. What is my usage so far this month? Seats used, conversations used, API calls made — whatever your product meters.

These five share three properties. Each one is a single row, or a simple aggregation, in a table you already own. Each one has an answer the customer can verify themselves in their account page. And each one is asked often enough that answering it by hand is pure repetition.

The questions a bot must not answer

Some account questions look similar and are not. A bot should never answer these, no matter how confident it feels:

  • Full payment details. Never show a card number, bank account, or any credential in chat. The most a bot should say is the last four digits and the expiry month, and only after identity is verified.

  • Anything that changes money. Refunds, credits, plan changes, cancellations. The bot can check the current state and hand the request to a human. It must not execute the change.

  • Another customer's data. This sounds obvious until a customer asks about a team account, a family plan, or an invoice for "our company". If the person asking is not the account holder or an authorised member, the answer is no, with a handoff.

  • Why a charge happened, when the reason is not in the data. A bot can report the charge: date, amount, invoice number. Explaining why it happened is a judgement call that belongs with a person who can see the full history.

The line is simple: the bot reports what is, a human decides what should change.

Identity verification comes first, every time

With order lookups, identity was a guardrail. With account data, it is the foundation. A balance shown to the wrong person is a data breach in miniature, and it happens the same way every time: the bot matched the wrong account.

1. A logged-in session. If the customer is authenticated on your site, the widget already knows who they are. Design for this case first.

2. Email plus one more fact. The email on the account plus an account number, an invoice number, or the last four digits of the payment method. One identifier on its own is not enough for financial data.

3. Never an email alone. An email address is easy to know and easy to guess. For a balance or a renewal amount, email alone is not verification.

Two more rules. First, if two accounts match, the bot says so and asks the customer to pick. It never picks for them. Second, verification happens before any account detail is shown, not after the first answer. A bot that answers first and verifies later has already leaked the data.

What the bot needs to reach, and what it must never reach

NL-to-SQL works by translating a plain-English question into a query against your database, and the translation is only as good as the schema it can see. For account questions, the schema needs to expose, at minimum: the account (holder, plan tier, status, renewal date), billing (current balance, last payment, next invoice date), usage (metered usage this cycle against the plan limit), and loyalty (points balance, expiry date, redemption value).

It must not expose everything sitting next to those tables. An accounts table often lives beside payment-method tables, password hashes, internal notes, and other customers' records. Table-level access control decides exactly which tables and columns a query may touch, and the answer for account data is narrow: the columns needed for the five questions above, and nothing else.

Read-only enforcement is the other half of the same rule. The bot asks questions of your database; it never changes it. A customer asking for a refund or a plan change gets a human, with the verified account summary attached, not a bot with write access.

Two practical checks before launch. First, confirm that a query for one customer cannot return another customer's rows — the query must always be scoped to the verified account, not just filtered by it. Second, confirm that sensitive columns are unreachable even if the model phrases the question cleverly. "Show me the card on file" should return a refusal, not a column.

The answer format: the number, the date, and nothing extra

Account answers should be even shorter than order answers. A customer asking about their balance wants two facts: how much, and when it is due. A reply shaped like this covers it:

"Your current balance is $42.00, due on 1 December. Your plan renews on the same date for $49.00."

What does not work is dumping the query result: a table of billing rows, internal plan codes, or a usage history the customer did not ask for. The bot's job is to translate twice, once from English into SQL, and once from the query result back into a sentence a customer can read in five seconds.

Mask by default. Show the last four digits of a card, never more. Show a points balance, not the full transaction history behind it.

The edge cases that decide whether customers trust it

A bot that handles the happy path and fails everything else is worse than no bot, because the customer believed the first answer. Test these five cases before launch:

  • Multiple accounts under one email. The customer has a personal account and a business account. The bot lists both by plan and creation date, and asks which one. It never answers for the wrong one.

  • Expired or cancelled subscription. The account exists but the plan has ended. The bot states the status and the end date, then stops. It does not offer to reactivate.

  • Pending payment. A payment is still processing, so the balance is unclear. The bot says so plainly, gives the expected clearance time, and does not present the pending amount as the final balance.

  • Points about to expire. A loyalty balance with an expiry date inside the next 30 days deserves a mention in the same reply: "You have 1,200 points, and 400 of them expire on 15 December."

  • No account found. The email matches nothing. The bot says so, asks whether the account might be under a different email, and after one retry offers a human. It never invents an account.

Every one of these ends the same way when the bot cannot answer with confidence: a handoff to a human with a brief, not a transcript dump. The brief is the intent in one line, what was already verified, what was already tried, and the account identifier.

Testing before launch: twenty real questions

Do not launch an account lookup on synthetic questions. Take twenty real account questions from your own ticket queue, including the awkward ones: a customer with two accounts, a balance question asked without any identifier, a renewal question from someone whose payment just failed. Run them through the bot and check three things for each: did it identify the right account, did it answer from the live record rather than a policy page, and did it hand off instead of guessing when it could not?

Keep the ones it gets wrong. That list is your golden set: re-run it every time you change the schema, the access rules, or the handoff wording.

Rollout: balance first, then the rest

Start with the current balance only. That is the highest-volume account question and the easiest to verify, because every answer can be checked against the billing system in seconds. Once a week of live answers shows no wrong-account replies and clean handoffs, add plan and renewal, then loyalty points, then usage. Order-status lookups, covered in the previous post in this series (https://www.chatonn.com/blog/nl-to-sql-order-status-lookups), follow the same rollout logic on different tables, and the two together cover most of the repetitive questions in a support queue.

The setup itself is small. In Chatonn, Database Connect is a paid feature, included in the Pro plan with no per-query billing: connect PostgreSQL, MySQL or SQLite, check the schema in the explorer, set table-level access to the account and billing tables only, and test a query before the widget goes live.

FAQ

Which account questions can a bot answer safely?

The read-only, verifiable ones: current balance, plan and included limits, renewal date and amount, loyalty-points balance and expiry, and usage so far this cycle. Anything that changes money or reveals payment details stays with a human.

How does the bot know which account is mine?

Identity is verified first, before any account detail is shown: ideally a logged-in session, otherwise the email on the account plus one more fact, such as an account or invoice number. Email alone is not enough for financial data.

Can the bot change my plan, issue a refund, or update my payment method?

No. Queries are read-only by design. Changes go to a human through a ticket or live-chat handoff, with the verified account summary attached.

What happens if I have two accounts under one email?

The bot lists both by plan and creation date and asks which one you mean. It never answers for the wrong account.

How much does it cost?

Database Connect is a paid feature, included in the Pro plan with no per-query billing. Chatonn pricing is flat: Free BYOK, Pro $49/mo, Business $149/mo, with no per-seat or per-resolution fees. The cost calculator (https://www.chatonn.com/tools/ai-support-cost-calculator) shows the comparison against per-seat and per-resolution tools.

Sources: Chatonn docs, Database Connect section, checked live 2026-11-24; the general NL-to-SQL post (https://www.chatonn.com/blog/nl-to-sql-chatbot-database-queries) and the order-status lookup post linked above. Prices last verified 2026-11-25.

Share & Cite