GST + UPI Reconciliation Copilot (India)
Perform deterministic reconciliation between GST invoice CSV data and UPI transaction CSV data.
Generate four outputs: reconciled rows, GST-unmatched rows, UPI-unmatched rows, and a summary JSON.
Quick workflow
- 1. Confirm both input files are CSV and represent:
- GST invoices/sales register
- UPI collections/statement
- 2. Validate required intent-level fields exist (invoice id/date/total, txn date/amount/status).
- Run:
CODEBLOCK0
- 4. Read and report key metrics from
*_summary.json:
- matched rows
- unmatched GST rows
- unmatched UPI rows
- reconciliation coverage %
- 5. Provide next actions for unmatched rows (follow-up / corrections / data cleanup).
Matching policy
- - Match only UPI rows with success-like status:
success, completed, captured, paid. - Require amount match (±0.01 tolerance).
- Enforce date window (default 7 days).
- Boost confidence if invoice number or customer tokens appear in UPI note/txn_id/UTR.
- Ensure one UPI transaction maps to one invoice only.
Edge-case handling
- - Ignore failed/pending/reversed UPI statuses for settlement matching.
- Preserve GST rows with empty/invalid dates as unmatched (do not force guesswork).
- Preserve UPI rows with missing amount as unmatched.
- Support flexible date formats in both files.
- Handle currency symbols and commas in amount fields.
Required outputs to share with user
Always return:
- 1. Reconciliation snapshot:
- matched rows / total GST rows
- matched amount / total GST amount
- 2. File paths generated:
-
*_reconciled.csv
-
*_gst_unmatched.csv
-
*_upi_unmatched.csv
-
*_summary.json
- 3. Priority action items:
- high-value unmatched GST invoices
- suspicious UPI rows (success + high amount + no invoice)
References
- - Read
references/csv-schemas.md for accepted columns and alias mapping.
GST + UPI 对账助手(印度版)
对GST发票CSV数据与UPI交易CSV数据执行确定性对账。
生成四类输出:已对账行、GST未匹配行、UPI未匹配行以及汇总JSON文件。
快速工作流程
- 1. 确认两个输入文件均为CSV格式,分别代表:
- GST发票/销售登记簿
- UPI收款/交易流水
- 2. 验证必要的意图级字段是否存在(发票编号/日期/总额,交易日期/金额/状态)。
- 运行命令:
bash
python3 scripts/reconcilegstupi.py \
--gst-csv /路径/gst.csv \
--upi-csv /路径/upi.csv \
--output-prefix /路径/输出/recon202603 \
--date-window-days 7
- 4. 从*_summary.json中读取并报告关键指标:
- 已匹配行数
- 未匹配GST行数
- 未匹配UPI行数
- 对账覆盖率%
- 5. 针对未匹配行提供后续操作建议(跟进/修正/数据清理)。
匹配策略
- - 仅匹配状态为成功类的UPI行:success、completed、captured、paid。
- 要求金额匹配(±0.01容差)。
- 强制日期窗口(默认7天)。
- 若发票编号或客户标识出现在UPI备注/交易ID/UTR中,则提高匹配置信度。
- 确保一笔UPI交易仅对应一张发票。
边缘情况处理
- - 忽略失败/待处理/冲正的UPI状态,不纳入结算匹配。
- 保留日期为空或无效的GST行作为未匹配(不强制猜测)。
- 保留金额缺失的UPI行作为未匹配。
- 支持两个文件中的灵活日期格式。
- 处理金额字段中的货币符号和逗号。
需向用户提供的必要输出
始终返回以下内容:
- 1. 对账快照:
- 已匹配行数 / GST总行数
- 已匹配金额 / GST总金额
- 2. 生成的文件路径:
- *_reconciled.csv
- *
gstunmatched.csv
- *
upiunmatched.csv
- *_summary.json
- 3. 优先处理事项:
- 高价值未匹配GST发票
- 可疑UPI行(成功状态+高金额+无对应发票)
参考资料
- - 查阅references/csv-schemas.md了解可接受的列名及别名映射。