Approval flow and ERP export
Approval and export are the point where recognized data becomes a financial transaction. This layer must be strict, auditable, and recoverable.
Approval types
Document-level approval
Used when the whole invoice must be approved by one or more people.
Examples:
- total amount above 1,000 EUR;
- new supplier;
- low OCR confidence;
- finance director approval for high risk;
- duplicate suspicion.
Line-level approval
Used when invoice lines belong to different departments, projects, cost centers, or responsible users.
Example:
- IT service line approved by IT manager;
- transport line approved by logistics;
- material line approved by warehouse manager.
Approval rules
Rules can use:
- amount threshold;
- supplier;
- buyer company;
- cost center;
- project;
- document type;
- currency;
- VAT mismatch;
- confidence score;
- duplicate reason;
- source channel;
- user delegation.
Delegations
Delegations allow another user to approve during absence. A delegation should have:
- from user;
- to user;
- start date;
- end date;
- scope;
- reason;
- audit event.
ERP export lifecycle
stateDiagram-v2
[*] --> ReadyForExport
ReadyForExport --> DryRun
DryRun --> ExportQueued
DryRun --> ExportBlocked
ExportQueued --> Exported
ExportQueued --> ExportFailed
ExportFailed --> Retry
Retry --> ExportQueued
Dry-run
Dry-run validates export without posting to ERP. It should check:
- required fields;
- supplier mapping;
- account mapping;
- VAT logic;
- currency;
- dimensions;
- line totals;
- duplicate ERP reference;
- API connectivity.
Mapping UI
ERP mapping should be configurable in UI:
- document field to ERP field;
- line field to ERP line field;
- fixed values;
- lookup values;
- conditional mappings;
- supplier code mapping;
- cost center and project mapping;
- fallback behavior.
Rivile priority
For Lithuanian accounting workflows, Rivile should be the first certified ERP path:
- supplier lookup;
- invoice header mapping;
- line mapping;
- VAT mapping;
- dry-run;
- error explanation;
- retry;
- payload audit;
- customer-specific configuration.
Export error screen
A useful export error screen should show:
- failed document;
- failed profile;
- ERP endpoint;
- mapped payload preview;
- exact error;
- suggested fix;
- retry button;
- mark as resolved;
- audit history.
Batch export
Batch export is useful only after validation. The UI should show:
- selected count;
- ready count;
- blocked count;
- dry-run summary;
- export progress;
- partial failures;
- retry failed only.