Import Status Polling
Import Status Polling
After submitting invoices to the Platform Agréée, NomaUBL tracks the PA's internal processing asynchronously. The -import command (and the Retrieve Statuses web page) poll the PA to retrieve the final import decision and subsequent lifecycle events.
Overview
When an invoice is submitted:
- The PA returns a transaction UUID immediately (
status: pending) - The PA processes the invoice asynchronously (typically within seconds to minutes)
- NomaUBL polls
GET {paApiImportEndpoint}/{uuid}to retrieve the final result - Once the PA returns
status: success, the invoice is marked Deposited (code10)
Running the import poller
From the CLI:
From the web interface: open Retrieve Statuses and click the Retrieve button.
Automated (recommended): schedule as a cron job:
What the poller does
ImportStatusHandler executes the following steps:
- Queries
F564231for all invoices with status code9906(Pending) - For each invoice, reads the PA transaction UUID from
F564230.FEUKIDSZ - Calls
PAImportStatusClientto GET the current status from the PA - Updates the Oracle tables based on the response:
PA response format
UUID fields in F564230
| Field | Content | Set when |
|---|---|---|
FEUKIDSZ (first write) |
PA transaction UUID from POST /import |
Invoice submitted (status 9903) |
FEUKIDSZ (update) |
PA invoice UUID from GET /import/{uuid} |
PA returns success (status 10) |
On a success response, FEUKIDSZ is overwritten with invoiceUuid (the PA's definitive identifier for the accepted invoice). This is the UUID to use for subsequent status queries (PA lifecycle events).
Subsequent PA lifecycle events
After the invoice reaches status 10 (Deposited), the PA sends further lifecycle updates as the invoice moves through the buyer's workflow:
| Code | Status | Meaning |
|---|---|---|
43 |
Received | Buyer's PA received the invoice |
45 |
Under Processing | Buyer is processing the invoice |
47 |
Payment Processed | Payment has been transmitted |
1 |
Approved | Buyer approved the invoice |
8 |
Rejected | Buyer rejected the invoice |
46 |
Disputed | Invoice is in dispute |
50 |
Refused | Definitively refused |
These updates are polled from InvoiceStatusesClient and stored in F564231 (current status) and F564235 (lifecycle history).
Monitoring pending invoices
Use the Invoice List page in the web interface, filtered by status 9906 (Pending), to see all invoices awaiting PA confirmation. If an invoice has been pending for more than a few hours, check:
- PA API connectivity (try the E-Directory lookup as a connectivity test)
- Whether the PA UUID in
FEUKIDSZis valid - PA platform status for outages