No-code chatbot for duplicate payment slips: the step-by-step flow
Build a bot that requests and validates a Brazilian tax ID (CPF), queries your system and delivers a duplicate payment slip — handing over to an agent when something goes off script.
Gerivia Team · · 3 min read
Duplicate payment slips are the top support request in many operations. The task is repetitive, follows the same format and customers want a quick resolution. It is ideal for your first chatbot flow — provided the bot knows when to step aside.
This is the flow we use in the interactive demo. You can build the same flow in Gerivia by dragging blocks.
1. A short opening menu
Start with a Menu block with just three or four options. More than that and customers read the whole list, give up and type “agent”.
- Duplicate payment slip
- Order status
- Speak to an agent
Each option is an output connected to the next step. The menu also has an extra output for “I didn't understand”: this handles anything outside the list. Connect it to a second attempt or directly to an agent.
2. Ask for the CPF — and validate it
The Question block stores the answer in a variable (for example, {{cpf}}) and can validate its format. With CPF/CNPJ validation enabled, the bot checks the check digits before continuing: “123” or a CPF with a mistyped digit never reaches your system.
Set the number of attempts allowed. After the last one, the “I didn't understand” output hands the conversation to a person — nobody gets stuck in a loop.
3. Query your system
The HTTP request block calls your ERP or financial system endpoint with the CPF variable and stores the response — amount, due date, payment code and slip link — in new variables.
Three safeguards built into the block:
- it only accepts https addresses with a fixed domain — customers cannot change where the request goes;
- internal network addresses are blocked;
- if the query fails, the block follows the “error”output, which you connect to a clear message and an agent.
4. Reply and offer the next step
A Message block builds the reply using variables: “I found 1 unpaid payment slip: R$ 189.90, due September 20”. Then a short menu: “Can I help with anything else?”. If not, Endsays goodbye and resolves the conversation.
5. Test before publishing
In the simulator, talk to the bot as a customer would. The path lights up on the flowchart, making it easy to see where an invalid CPF went or why a query failed. Publish only after testing: new conversations use the published version, while ongoing conversations finish on the previous version.
What to avoid
- Don't hide the agent. A “Speak to an agent” menu option reduces frustration — the bot resolves more requests when customers know there is a way out.
- Don't request data you won't use. If the query only needs a CPF, don't ask for a phone number and email “for registration”.
- Don't leave outputs disconnected. The builder warns about disconnected outputs. If published that way, customers reaching them are sent to the default team.