Aller au contenu principal

Invoice Status Codes

Invoice Status Codes

NomaUBL uses two sets of status codes stored in F564231.K74RSCD and F564235.K74RSCD:

  • PA platform codes (200-series) — assigned by the Platform Agréée during the invoice lifecycle
  • Internal 99xx codes — assigned by NomaUBL to represent the local processing workflow

The full catalog is defined in config-lists.json under the statuses template. The property value format is:

"<code>": "<CONSTANT>|<label_FR>|<label_EN>||<paStatus>"

Where paStatus=1 means the code comes from the PA, and paStatus=0 means it is an internal NomaUBL code.


PA platform status codes (200-series)

These codes are received from the Platform Agréée via lifecycle updates.

CodeConstantLabel (FR)Label (EN)
200STATUS_DEPOSITEDDéposéeDeposited
201STATUS_ISSUEDEmise par la plateformeIssued by platform
202STATUS_RECEIVEDReçue de la plateformeReceived by platform
203STATUS_MADE_AVAILABLEMise à DispositionMade available
204STATUS_UNDER_PROCESSINGPrise en chargeUnder processing
205STATUS_APPROVEDApprouvéeApproved
206STATUS_PARTIALLY_APPROVEDApprouvée PartiellementPartially approved
207STATUS_DISPUTEDEn litigeDisputed
208STATUS_SUSPENDEDSuspendueSuspended
209STATUS_COMPLETEDComplétéeCompleted
210STATUS_REFUSEDRefuséeRefused
211STATUS_PAYMENT_PROCESSEDPaiement TransmisPayment transmitted
212STATUS_PAYMENT_RECEIPTEncaisséePayment received
213STATUS_REJECTEDRejetéeRejected
214STATUS_TARGETEDViséeTargeted
220STATUS_CANCELLEDAnnuléeCancelled
221STATUS_ROUTING_ERRORErreur de routageRouting error
224STATUS_DIRECT_PAYMENT_REQUESTDemande de Paiement DirectDirect payment request
225STATUS_FACTOREDAffacturéeFactored
226STATUS_FACTORED_CONFIDENTIALAffacturée ConfidentielFactored confidential
227STATUS_ACCOUNT_CHANGEChangement de Compte à PayerPayment account change
228STATUS_NOT_FACTOREDNon AffacturéeNot factored
501STATUS_IRRECOVERABLEIrrecevableIrrecoverable
600STATUS_EMAILErreur EmailEmail error

Internal workflow codes (99xx)

These codes are set by NomaUBL to represent the processing state within the JDE/NomaUBL system, before and during PA interaction.

CodeConstantLabel (FR)Label (EN)Set when
9900STATUS_CREATEDFacture crééeInvoice createdInvoice record created in F564231
9901STATUS_VALIDATEDValidation réussieValidation successfulAll validation layers pass with no errors
9902STATUS_VALIDATED_WARNValidation avec avertissementsValidation with warningsValidation passes but warnings exist
9903STATUS_SENT_TO_PAEnvoi à la PASent to PAPOST to PA succeeds, UUID received
9904STATUS_ERROR_SENTEchec d'envoi à la PASend failedPOST to PA returns HTTP error
9905STATUS_ERROR_VALIDATIONEchec de validationValidation failedXSD or Schematron errors found
9906STATUS_PENDINGEn attente de traitement par la PAPending PA processingAwaiting PA import result
9907STATUS_FAILED_IMPORTEchec d'import par la PAPA import failedPA returns status: failed

Normal invoice lifecycle

9900 (Created)

├─ Validation errors ──► 9905 (Validation failed) [stop]

9901 or 9902 (Validated)

├─ sendToPA=N ──► [stop here, no PA interaction]

9903 (Sent to PA)

├─ HTTP error ──► 9904 (Send failed) [stop]

9906 (Pending — awaiting -import poll)

├─ PA still processing ──► [unchanged, re-poll later]
├─ PA import failed ──► 9907 (PA import failed) [stop]

200 (Deposited)

├─ 201 (Issued by platform)
├─ 202 (Received by platform)
├─ 204 (Under processing)
├─ 205 (Approved) / 210 (Refused) / 213 (Rejected)
├─ 207 (Disputed)
├─ 211 (Payment transmitted)
└─ 212 (Payment received) → 209 (Completed)

Status transitions in Oracle tables

At each step, the following tables are updated by InvoiceStatusCatalog.StatusTransition.apply():

StepF564231.K74RSCDF564235 row inserted
Invoice created9900Yes
Validation OK9901 or 9902Yes
Validation failed9905Yes + errors in F564236
Sent to PA9903Yes
Send error9904Yes
Pending9906
PA deposited200Yes
PA subsequent updatenew PA codeYes
PA import failed9907Yes with error messages

Using InvoiceStatusCatalog

// Simple transitions
InvoiceStatusCatalog.created().apply(dbHandler);
InvoiceStatusCatalog.validated().apply(dbHandler);
InvoiceStatusCatalog.validatedWithWarnings().apply(dbHandler);
InvoiceStatusCatalog.sentToPA().apply(dbHandler);
InvoiceStatusCatalog.pending().apply(dbHandler);
InvoiceStatusCatalog.deposited().apply(dbHandler); // → code 200

// Error transitions with messages
InvoiceStatusCatalog.errorValidation(errorList).apply(dbHandler);
InvoiceStatusCatalog.errorSent(httpError).apply(dbHandler);
InvoiceStatusCatalog.failedImport(errorsString).apply(dbHandler);

// Custom status (e.g. from PA response mapping)
InvoiceStatusCatalog.custom("205", "Approuvée").apply(dbHandler);