Report lost or stolen cards with AI chat
Workflow purpose
This guide shows how to build a lost or stolen card reporting workflow using Proto’s AI agent. The workflow handles a distressed customer with immediate empathy, verifies their identity conversationally using an <action-tag>LLM Action<action-tag>, identifies the affected card via API, triggers an immediate block, and logs a support ticket – all without manual intervention from bank staff. Every step runs within the AI agent’s Actions, with no code required.
Who can benefit from this guide:
- Retail and digital banking fraud and card-services teams
- Customer support managers reducing IVR wait times for urgent card cases
- Fintech card issuers offering 24/7 self-service blocking
- IT teams deploying conversational AI across WhatsApp, web, and mobile banking channels
- Any financial institution that needs to block a card the moment a customer reports loss or theft
Step 1: Create the trigger
Set up a new workflow to capture lost and stolen card reports.
- Navigate to the Actions tab in the AI agent settings.
- Click + New workflow and select Message received as the trigger type.
- Set Name to:
Lost or Stolen Card - Set Description to: Triggers when a customer reports a lost, stolen, or compromised card.
- Add training phrases: My card is lost, I lost my card, My card was stolen, Block my card, Someone stole my card, I can’t find my debit card, Cancel my card immediately.

Step 2: Send an empathetic opening message
Reassure a likely-distressed customer and explain what happens next before collecting any details.
- Add a <action-tag>Send Message<action-tag> action under the trigger.
<callout-msg>I’m sorry to hear that – I can block your card right away to prevent any unauthorised use. I just need to verify a few details first. This only takes a minute. Please share your full name, date of birth, registered phone number, and national ID number and I’ll get started.<callout-msg>
Step 3: Verify the customer’s identity
Confirm the customer’s identity conversationally before exposing any account details or triggering a card block.
Capture the message
- Add a <action-tag>Set Chat Variable<action-tag> after the <action-tag>Send Message<action-tag>. Set
identity_inputto_user_input.
Configure the LLM action
- Add an <action-tag>LLM Action<action-tag>. Set Model to
GPT-4o, Input text to{identity_input}, and Output variable toidentity_details.
You are an identity verification assistant for a banking lost or stolen card service.
Extract the following fields from the customer’s message:
full_name (string or null) – full name as it appears on the card
date_of_birth (string or null) – customer’s date of birth
phone (string or null) – registered phone number
id_number (string or null) – national ID or CNIC number
follow_up_question (string) – one conversational question targeting
the most important missing required field
Rules:
1. Extract only what is explicitly stated. Do not infer.
2. full_name is highest priority. If missing, ask for it first.
3. If full_name is present but date_of_birth is missing, ask for it.
4. If full_name and date_of_birth are present but phone is missing, ask for it.
5. If all three are present but id_number is missing, ask for it.
6. If all required fields are present, set follow_up_question to "none".
7. follow_up_question pattern:
[Empathy if customer is distressed] + [What is needed]
+ [What the customer should do next].
Examples:
"I completely understand – let’s get this sorted quickly.
Could you share your full name as it appears on the card?"
"Got it. Could you also share your date of birth so I can
verify your identity?"
8. The follow_up_question must be in {language}.
9. Do not add extra fields.
10. Output must be a valid JSON object only. No explanations.
Do NOT wrap in markdown or code blocks.
Do NOT include ```json or ``` anywhere in the response.
Inside the Success branch
- Add a <action-tag>Set Chat Variable<action-tag> as the first action – set
identity_detailsto_.json_parse(identity_details). - Add an <action-tag>If/Else<action-tag> with condition:
identity_details["follow_up_question"] != "none" and identity_details["follow_up_question"] != none
<branch-block>If true – follow-up needed<branch-block>
- Add a <action-tag>Send Message<action-tag>:
{identity_details["follow_up_question"]} - Add an <action-tag>Ask Survey<action-tag> – Variable:
more_identity, Type: Text, Skip: On. - Add a <action-tag>Set Chat Variable<action-tag> – set
identity_inputto{identity_input} {more_identity}. - Add a <action-tag>Jump to Trigger/Action<action-tag> back to the LLM action.
<branch-block>Else – all details collected<branch-block>
Add four <action-tag>Set Chat Variable<action-tag> actions to unpack the response fields:
| Variable | Chat script |
| --- | --- |
| full_name | identity_details["full_name"] |
| date_of_birth | identity_details["date_of_birth"] |
| phone | identity_details["phone"] |
| id_number | identity_details["id_number"] |
- Add a <action-tag>Send API Request<action-tag> to validate identity against the bank’s customer system. Pass
{full_name},{date_of_birth},{phone},{id_number}. Set Output variable toverification_response. - Add a <action-tag>Set Chat Variable<action-tag> – set
verification_responseto_.json_parse(verification_response). - Add an <action-tag>If/Else<action-tag>: if
verification_response["status"] == "verified", continue to Step 4. Otherwise route to <action-tag>Human Handoff<action-tag>.
<callout-msg>I wasn’t able to verify those details in our system. Let me connect you with a member of our team who can help you directly.<callout-msg>
Inside the Error and Timeout branches
- Add a <action-tag>Jump to Trigger/Action<action-tag> back to the LLM action to re-run.
Step 4: Identify the affected card
Retrieve the customer’s active cards and confirm which one needs to be blocked.
- Add a <action-tag>Send API Request<action-tag> to fetch active cards using
{verification_response["customer_id"]}. Set Output variable tocustomer_cards. - Add a <action-tag>Set Chat Variable<action-tag> – set
customer_cardsto_.json_parse(customer_cards). - Add a <action-tag>Send Message<action-tag> with quick reply options from
{customer_cards}, each showing card type and last 4 digits (e.g. Visa Debit •••• 4421). Add a <action-tag>Set Chat Variable<action-tag> immediately after – setselected_cardto_user_input. - Add a <action-tag>Send Message<action-tag>: What happened to the card? Add quick replies: <qr-pill>Lost<qr-pill> <qr-pill>Stolen<qr-pill> <qr-pill>Compromised / suspicious activity<qr-pill> <qr-pill>Damaged<qr-pill>
- Add a <action-tag>Set Chat Variable<action-tag> – set
incident_typeto_user_input.
Step 5: Block the card via API
Trigger an immediate card block so the card cannot be used for further transactions.
- Add a <action-tag>Send API Request<action-tag> action. Set Method to
POSTand URL to your card block endpoint. - Set the request body to:
{"customer_id": "{verification_response[customer_id]}", "card": "{selected_card}", "reason": "{incident_type}"} - Set Output variable to
block_response. Add a <action-tag>Set Chat Variable<action-tag> – setblock_responseto_.json_parse(block_response). - Add an <action-tag>If/Else<action-tag>: if
block_response["status"] == "success", continue to Step 6. Otherwise route to <action-tag>Human Handoff<action-tag>.
<callout-msg>I’m sorry – I wasn’t able to block the card automatically. Let me connect you with someone from our team right away so they can action this immediately.<callout-msg>
Step 6: Create a ticket and confirm
Log the card block as a support ticket for follow-up and send the customer a clear confirmation.
- Add a <action-tag>Create Ticket<action-tag> action. Set Subject to Card block: {full_name} – {selected_card}. Set Tags to
card-blockand{incident_type}. - Add a <action-tag>Send Message<action-tag> with the confirmation:
<callout-msg>All done, {full_name}. Your card ending {selected_card} has been blocked (reference: {block_response["reference"]}). A replacement will be arranged and our fraud team will follow up if any suspicious activity is detected. Stay safe.<callout-msg>
- Add a <action-tag>Send Message<action-tag> with quick replies: <qr-pill>Order replacement card<qr-pill> <qr-pill>Review recent transactions<qr-pill> <qr-pill>I’m done<qr-pill>
- Add a <action-tag>Set Chat Variable<action-tag> – set
next_stepto_user_input.
Step 7: Test the flow
Validate the full lost or stolen card sequence using the AI agent tester before going live.
- Open the AI agent tester panel on the right side of the workflow builder.
- Type My card was stolen – confirm the empathetic opening message appears.
- Provide only a name – confirm the LLM asks for date of birth next.
- Provide all identity details in one message – confirm the API verification fires and the card selection appears.
- Select a card and incident type – confirm the block API fires and the ticket is created.
- Confirm the confirmation message displays the correct
{block_response["reference"]}and{selected_card}. - Simulate a failed identity verification – confirm the flow routes to <action-tag>Human Handoff<action-tag> with an empathetic message.
- Simulate a failed card block – confirm the flow routes to <action-tag>Human Handoff<action-tag> immediately.
15‑minute live demo























