Contact Centres

Request a bank statement through AI chat

Workflow purpose

This guide demonstrates how to use Proto's AI agent to let customers request a bank statement for the account and period they need, and receive it in the chat as a document.

The workflow verifies the customer, asks which account and which period, and asks what the statement is for. Everyday statements are generated by your core banking system and sent straight away. Statements that need a stamp and signature – for a visa application, an embassy or another lender – and periods longer than your system can produce on demand go to your back office as a ticket, with every detail already collected.

Statement requests are frequent, simple and often urgent, and a customer who needs one for a visa appointment shouldn't have to queue at a branch to get it.

Who can benefit from this guide:

  • Banks and credit unions
  • Microfinance institutions and savings cooperatives
  • Digital banks and mobile money providers
  • Branch and back-office teams that prepare official statements

Request a bank statement

This workflow verifies the customer and sends the statement they need, or routes official requests to your team, 24/7. See how to build a bank statement workflow.

Just starting with the platform?
For initial setup of your AI agent – including workspace setup, agent training, and channel deployment – please start here. This workflow guide assumes your AI agent is set up and ready for more advanced configurations.

1. Create a trigger

Start the flow when a customer asks for a statement.

  • Navigate to the Workflows tab in the AI agent settings.
  • Click New workflow and select Message received as the Workflow type.
  • Name the trigger (e.g. “Bank Statement”) and add a short description (e.g. “Triggers if the customer wants a bank statement, account statement or proof of transactions for a period, including stamped statements for a visa or loan.”).
  • Add training phrases (e.g. “I need a bank statement”, “Send me my statement for last month”, “Statement for my visa application”, “Six months of statements for a loan”, “Proof of income from my account”).

2. Verify the customer

Statements are sensitive documents – confirm who you’re talking to before anything is generated.

On a signed-in Webchat, the customer is already known: add a Branch action that checks {_customer.email}, and if it’s set, pass it to your core banking system in the next step instead of asking for details.

Otherwise, add an Ask survey action. Action title: Customer identification

Field Variable Type Invalid reply
Customer number or account number customer_ref Text Please enter your customer or account number
Registered mobile number mobile Phone Please enter the mobile number registered with us

Keep Enable skip off. Then send a one-time PIN through your OTP service with a Send API action, collect it with an Ask survey and check it with a second Send API action. Allow three attempts before handing over to a live agent.

3. Choose the account

Only ask which account when there’s a choice to make.

Add a Send API action:

  • HTTP method: GET
  • URL endpoint: your core banking system’s accounts endpoint, passing the verified customer reference
  • Headers: the authorisation key your system requires
  • Resulting variable: accounts

Add a Branch action:

  • If len(accounts) == 1: add a Set variable action that stores accounts[0] as selected_account and skip to Step 4.
  • Else: add a Send message that lists each account by product name and last four digits, numbered, with quick replies 1, 2, 3 and so on. Under each, add a Set variable action that stores the matching account as selected_account.

Show only the last digits of an account number in the chat.

4. Choose the period and the purpose

Ask how far back the statement should go, and what it’s for – the purpose decides whether it needs a stamp.

Add a Send message with quick replies: Last month | Last 3 months | Last 6 months | Other dates. Under each, add a Set variable action for date_from and date_to. Under Other dates, add an Ask survey:

Field Variable Type Invalid reply
Start date date_from Text Please give a date, e.g. 01/03/2025
End date date_to Text Please give a date, e.g. 31/08/2025

Then add a Send message with quick replies: For my own records | Visa or embassy | Loan or mortgage application | Other official use, and store the answer as statement_purpose.

5. Decide how the statement is produced

Send standard statements at once and route the rest to your team.

Add a Send API action (HTTP method: GET) that asks your core banking system how many months the chosen period covers and whether it can be generated on demand. Resulting variable: period_check.

Add a Branch action:

Condition Next step
statement_purpose != "For my own records" Official statement – Step 7
period_check["months"] > 12 Long period – Step 7
period_check["on_demand"] == false Older than your online history – Step 7
Else Generate now – Step 6

Set the 12-month limit to whatever your core banking system can generate in one request.

6. Generate and send the statement

Produce the document and deliver it in the chat.

Add a Send API action:

  • HTTP method: POST
  • URL endpoint: your core banking system’s statement endpoint, passing selected_account, date_from and date_to
  • Headers: the authorisation key your system requires
  • Resulting variable: statement

Ask your system to return a password-protected PDF and a short-lived download link, so the file can’t be opened if the chat is seen on a shared device.

Under Success, add a Send attachment action. File format: Document. Source: Chat script, e.g. statement["url"]. Then add a Send message:

“Here’s your statement for the account ending {selected_account[“last4”]}, from {date_from} to {date_to}. The PDF password is your date of birth in the format DDMMYYYY. The link expires in 24 hours.“

Under Error and Timed out, add a Send message apologising and a Jump action to Step 7, so the request becomes a ticket instead of being lost.

Finish with a Send message with quick replies Another statement | That’s all. Under Another statement, add a Jump back to Step 3. Under That’s all, add a Send message (“For your security, I’m closing this chat.”) and a Close chat action.

7. Route official and long-period requests

Collect what your back office needs to prepare, stamp and deliver the statement.

Add an Ask survey action. Action title: Official statement

Field Variable Type Invalid reply
Who should the statement be addressed to? addressee Text Please give the name of the embassy, lender or organisation
How would you like to receive it? delivery_method Text, with quick replies: By email, Collect from a branch Please choose an option
Which branch? branch Text Please give the branch name
Your email address email Email Please provide a valid email address
When do you need it by? needed_by Text Please give a date

Turn on Enable skip for the addressee and branch fields. On a signed-in Webchat, take the email from {_customer.email} instead of asking for it.

Add a Create ticket action:

  • Assignee: your statements or back-office team
  • Subject: Statement request – {statement_purpose} – account ending {selected_account[“last4”]}
  • Description: account, period, purpose, addressee, delivery method, branch and date needed
  • Full name and Email: the customer’s details
  • Auto-apply tags: statement-request, plus stamped or long-period
  • Custom fields: purpose and date needed, so the team can sort by urgency
  • Email template: a confirmation sent to the customer with the ticket reference and any fee from your tariff

Then add a Send message:

“I’ve passed your request to our team. Stamped and long-period statements usually take 2 working days. We’ll email {email} when it’s ready.”

8. Escalate requests that wait too long

A statement for a visa appointment is useless a day late.

Check the teamspace’s overdue rule in Settings › Tickets › Overdue rules – it applies to every ticket, not just statement requests. For example:

  • Apply overdue status after: 2 days
  • Exclude weekends: on
  • Reassign ticket to live agent: the back-office team lead

If you promise a shorter turnaround for statements, put it in the ticket description and have the back office keep an Inbox view filtered on the statement-request tag.

The team replies to the customer from the ticket in the Inbox – attaching the statement or confirming it’s ready to collect – and sets the ticket to Resolved.

9. Test the flow

Validate every path before going live using the AI agent tester side panel.

  • Request a three-month statement for your own records and check the PDF and message arrive.
  • Test a customer with one account and confirm the account question is skipped.
  • Choose Visa or embassy and confirm a ticket is created with the stamped tag.
  • Ask for a 24-month period and confirm it’s routed to the back office.
  • Make the statement call fail and check the request still becomes a ticket.
  • Build and test in an undeployed version – Duplicate the live version first – then Deploy it once every path passes.

Finalise the AI agent deployment by configuring your preferred channels and languages.