FlowSync Maestro Project Story — Updated with P2P Invoice Reconciliation Agent
FlowSync Maestro unifies humans, robots, AI agents, and systems into a single BPMN 2.0 orchestration layer that runs on UiPath Maestro. The platform coordinates approvals, RPA execution, and cognitive decisioning so every procure‑to‑pay handoff happens at the right time with the right performer.
Performers Model P
P = {H, R, A, S}
- H Humans handle approvals and exceptions.
- R Robots execute repetitive tasks via UiPath Studio and Orchestrator.
- A AI Agents perform cognitive work such as document extraction, 3‑way matching, fraud assessment, and routing decisions.
- S Systems provide authoritative data via ERP and CRM APIs.
New Agent Role P2P Invoice Reconciliation Agent
Purpose
The P2P Invoice Reconciliation Agent is an AI actor embedded in the BPMN flow to perform intelligent 3‑way matching (Purchase Order × Goods Receipt Note × Invoice), classify discrepancies, assess fraud risk, and emit a structured routing decision that drives the next Maestro exclusive gateway.
Core responsibilities
- Extract invoice data from PDFs or structured payloads.
- Validate and reconcile header and line items against PO and GRN.
- Apply tolerance rules and compute variance metrics.
- Detect fraud indicators and vendor anomalies.
- Produce a single structured JSON routing decision with auditable reasoning and citations for Maestro to act on.
Key outputs
- matchStatus and recommendation (AUTO_APPROVE, ESCALATE_TO_MANAGER, ESCALATE_TO_AP, RETURN_TO_VENDOR, BLOCK_PAYMENT).
- confidenceScore and numbered reasoning audit trail.
- discrepancies list with IDs and severities.
- processingMetadata.documentsProcessed listing PO, GRN, INVOICE.
Extraction and Decisioning Pattern
File handling
- Prefer a lightweight extractor for simple invoices and a deep RAG pipeline for multi‑page or complex PDFs.
- Extraction must return structured fields: invoice header, bank details, subtotal, tax, total, and full line‑item tables. Missing extraction reduces confidence and triggers escalation.
Matching logic
- Header match: compute varianceAmount and variancePercentage; apply dual thresholds (2% and $5 floor).
- Line match: align PO lines to invoice lines by line number or semantic similarity; flag EXTRA_LINE_ITEM and LINE_ITEM_MISSING. Cross‑check GRN quantities for over‑invoicing.
- Fraud checks: bank detail changes, round numbers, blocked vendors, future invoice dates, duplicate indicators.
Routing hierarchy
- Critical fraud → BLOCK_PAYMENT / fraud_hold_path
- Blocked vendor → BLOCK_PAYMENT / fraud_hold_path
- Critical discrepancies or missing data → ESCALATE_TO_AP / ap_review_path
- Invoice > managerApprovalLimit → ESCALATE_TO_MANAGER / manager_approval_path
- MISMATCH with HIGH severity → RETURN_TO_VENDOR / vendor_dispute_path
- MEDIUM severity → ESCALATE_TO_AP / ap_review_path
- Full match within tolerance and ≤ autoApproveLimit → AUTO_APPROVE / auto_approve_path
- Full match within tolerance and > autoApproveLimit → ESCALATE_TO_MANAGER / manager_approval_path
Architecture Integration
Where the agent sits
- Deployed in the Agent Layer and invoked by a Maestro service task inside the P2P BPMN flow.
- Receives PO, GRN, invoiceFile or structured invoice, vendorContext, and approval thresholds as inputs.
- Returns a validated JSON payload that drives the exclusive gateway to the next performer.
Traceability and auditability
- Every decision includes a numbered reasoning trail and page‑level citations for extracted data.
- Discrepancy and action IDs are deterministic (DISC-001, ACT-001) to simplify downstream tracking and SLA reporting.
Benefits Realized
- Faster cycle times through automated 3‑way matching and clear routing.
- Reduced manual effort for routine invoices and consistent escalation for exceptions.
- Improved fraud detection by codifying bank change and round‑number heuristics.
- Audit‑ready outputs with structured reasoning and document citations for compliance.
Next Steps and Roadmap
- Expand agent memory for contextual vendor history and dispute resolution patterns.
- Publish reusable BPMN templates and agent connectors to the UiPath Marketplace.
- Add configurable thresholds and explainability controls in the Maestro UI for business owners.
- Pilot multi‑tenant logging and analytics to measure reconciliation accuracy and time‑to‑resolution.
Built With
- autogen
- crewai
- crm-connectors
- erp-connectors
- forms
- langchain
- rest-apis
- uipath
- uipath-agent-builder
- uipath-automation-cloud
- uipath-maestro
- uipath-orchestrator
- uipath-studio



Log in or sign up for Devpost to join the conversation.