Skip to main content

Electronic invoicing in France is built around a decentralized CTC model where domestic B2B invoices must be exchanged and messages called "lifecycle status" must be sent between the buyer and the seller in response to some business events. This implies that a French company will be sending and received electronic communications through the life of each invoice from posting and, eventually, being paid. The sending and receiveing of the communication will be done using ExFlow e-Invoicing with Pagero integration and will require setting up 3 main areas:

  1. Microsoft D365 Finance data regarding the legal entity, its customers and its vendors to assure the transactions are posted according to the rules set by French accounting and French e-invoicing mandate.
  2. ExFlow Document Integration and ExFlow AP module to assure data posted in D365 Finance is gathered and send/receive from business partners via Pagero.
  3. Pagero system to assure that e-invoices can be correctly routed and archived.

The French reform also includes e-reporting obligations and these obligations will be fulfilled using standard D365 Finance functionality provided by Microsoft, hence the legal company must be correctly setup as per point 1 above.

Below is a high-level overview of how it works with ExFlow E-Invoicing and Pagero integration.

  • Validate the D365 Finance application version and build used by the customer. Microsoft France e-invoicing and e-reporting capabilities are delivered through recent D365 Finance releases and the required setup depends on the version and feature availability.

  • Do not mix the Microsoft standard France connector setup with the ExFlow/Pagero setup unless this has been explicitly agreed in this documentation. Microsoft standard documentation may describe Microsoft-provided French e-invoicing features and a standard PA connector, while this page describes the ExFlow Document Integration process with Pagero.

  • Assure your Pagero account is enabled for France and contains the required PA onboarding, company identifiers, technical connection data and routing setup.

  • Assure your ExFlow Document integration is updated to 1.4.0 and make sure the upgrade script has been run using the following instructions

Upgrade script

  • Open table browser for table “EXF_tDataUpgradeScriptsLog” by adding “?mi=SysTableBrowser&TableName=EXF_tDataUpgradeScriptsLog” to your D365 FO URL: medium

  • Make sure these records are added to the table: medium

  • If the records do not exist, ExFlow document integration upgrade script needs to be run in your environment.

  • To run ExFlow document integration upgrade script manually in an environment, please follow the following steps: Add “?mi=SysClassRunner&cls=EXFI_cDataUpgradeScriptsController” to your application URL: “Your D365 FO application URL”/ ?mi=SysClassRunner&cls=EXFI_cDataUpgradeScriptsController&cmp="Your Legal Entity" medium

  • A dialog will be shown with parameters to choose how to run the script: medium

  • Choose “Run all” to run all the upgrade scripts and click “OK”:

medium

  • A scheduled batch jobs will be added to queue. Go to System administrator => Inquiries => Batch jobs and look and filter the job description on “Document Integration: Data upgrade scripts” medium

  • Make sure that you have these 3 batch jobs ran in your environemt:

  1. Document Integration: Data upgrade scripts (insertEXF_tCustTableFromCustTable)
  2. Document Integration: Data upgrade scripts (insertEXF_tVendTableFromVendTable)
  3. Document Integration: Data upgrade scripts (UpdateExFlowArchiveParameterForFrance)
  • Check the batch jobs Infolog to see that the jobs are run successfully.

  • Open table browser for table “EXF_tDataUpgradeScriptsLog” by adding “?mi=SysTableBrowser&TableName=EXF_tDataUpgradeScriptsLog” to your D365 FO URL: medium

  • Make sure these records are added to the table: medium

Microsoft setup

  • The invoice XML generation is done using Microsoft D365 Finance Electronic Reporting technology. Therefore, Electronic Reporting must be enabled and the required ER configurations must be imported from Dataverse and tested before sending invoices to Pagero.

  • Follow the steps described in Microsoft D365 Finance documentation to assure the invoice xml is generated according to FR mandate. Test that your specific business invoice processes are supported by Microsoft ER Configuration.

Clarify internal tax and routing data

Ensure you know for the French legal entity as describe here: https://learn.microsoft.com/en-us/dynamics365/finance/localizations/france/emea-fra-einv-ereport?context=/dynamics365/context/finance#set-up-registration-numbers https://learn.microsoft.com/en-us/dynamics365/finance/localizations/france/emea-fra-einv-ereport?context=/dynamics365/context/finance#configure-legal-entity-data

  • French VAT number.

  • SIREN number.

  • SIRET number for each establishment used in invoicing or reporting.

  • Electronic invoicing address used to receive invoices.

  • Electronic address used to receive lifecycle statuses for issued invoices, if different.

  • PA assignment and validity period in the French Directory.

  • VAT regime and whether VAT is payable on debits or on payment receipt, since this impacts payment reporting and the Payment received status.

For customers and vendors:
https://learn.microsoft.com/en-us/dynamics365/finance/localizations/france/emea-fra-einv-ereport?context=/dynamics365/context/finance#configure-customer-data

  • Country/region and VAT registration status.

  • SIREN, SIRET and routing code where applicable.

  • Electronic invoicing address registered in the French Directory for domestic B2B customers and vendors.

  • VAT number or foreign registration identifier for cross-border counterparties.

  • Classification of the transaction as domestic B2B e-invoicing, B2G, cross-border B2B, B2C or payment reporting.

Configure mandatory notes Sales order and Free text invoices:
https://learn.microsoft.com/en-us/dynamics365/finance/localizations/france/emea-fra-einv-ereport?context=/dynamics365/context/finance#configure-mandatory-notes

Project invoices:
https://learn.microsoft.com/en-us/dynamics365/finance/localizations/france/emea-fra-einv-ereport?context=/dynamics365/context/finance#configure-mandatory-notes-for-project-invoices

ExFlow setup

  • Make sure ExFlow Document Integration is fully set up for Pagero integration as described in the Pagero Service page: ExFlow document integration / Setup / Shared parameters ExFlow document integration / Setup / Parameters ExFlow document integration / Setup / Export setup

  • Make sure the legal entity is configured for CTC and French mandate flows where required: ExFlow document integration / Setup / Parameters / General ExFlow document integration / Setup / Lifecycle status

Lifecycle status

France requires lifecycle status handling for invoice transmission and business processing.

The minimum mandatory scope includes:

  • Submitted / Filed: the invoice has been received and validated by the PA.

  • Rejected: the invoice has failed technical, format, validation or routing checks.

  • Refused: the buyer refuses the invoice for business reasons.

  • Payment received: the supplier confirms that payment has been received where the status or payment reporting is required.

Additional statuses may be used depending on the customer scope, such as Made available, Received, Approved, Partially approved, Disputed, Suspended, Completed and Payment transmitted. ExFlow Document Integration exposes acknowledgements, errors and lifecycle history so the user can monitor the document and take corrective action where required.

Open ExFlow document integration | Setup | Lifecycle status

In the Overview tab:

FieldDescription
CodeContains the lifecycle status code as determined by the French AFNOR: (mandatory) 200, 210, 212, 213 (optional) 204, 205, 206,207,208, 209, 211
DescriptionContains the standard text for the status code as defined by AFNOR
PA statusContains the code used by Pagero for that status. Combination of PA status and Description is used to provide user information
AutomatedSets if the status will be sent automatically by a batch job
ER ConfigurationSets the Electronic reporting configuration that will be used to generate the xml message

In order to assure correct transmission and reception of the lifecycle status, use the below values:

CodeDescriptionPA status
200DéposéeSUBMITTED
201Émise par la plateformeISSUED_BY_PLATFORM
202Reçue de la plateformeRECEIVED_BY_PLATFORM
203Mise à dispositionMADE_AVAILABLE
204Prise en chargeIP
205ApprouvéeAP
206Approuvée partiellementPARTIALLY_ACCEPTED
207En litigeUQ
208SuspendueON_HOLD
209ComplétéeINFORMATION_PROVIDED
210RefuséeRE
211Paiement TransmisPAYMENT_INITIATED
212EncaisséePAYMENT_RECEIVED
213RejetéeVF
214ViséeENDORSED
220AnnuléeSUPERSEDED
224Demande de Paiement DirectREQUEST_PAYMENT
225AffacturéeFACTORED
226Affacturée ConfidentielFACTORED_CONFIDENTIAL
227Changement de Compte à payerACCOUNT_CHANGED
228Non AffacturéeFACTORING_CANCELLED

Some of the codes require a predefined list of motives as stated by AFNOR (XP_Z12-012 Annexe A). The code motives can be entered by selecting the code and then "Motives" in the menu. Alternatively, Excel can be used to populate or edit this page. While the list of motives should be retrieved from AFNOR, for convenience, you can find here a summary. Check with AFNOR for any chanes or updates:

Code motiveMotive TextDescriptionREFUSÉE B2BEN LITIGEAPPROUVÉE PARTIELLEMENTSUSPENDUEDÉPOSÉE
NON_TRANSMISEDestinataire non connectéCe motif est utilisé UNIQUEMENT avec le statut ""DÉPOSÉE"" pour signifier que la facture n'a pas pu être transmise parce que le destinataire (ACHETEUR), bien que présent dans l'Annuaire PPF, n'a aucune adresse de réception de facture active (c’est-à-dire connectée à une Plateforme Agréée en réception).X
JUSTIF_ABSJustificatif absent ou insuffisantCe motif doit être utilisé s'il manque des pièces jointes pour le traitement de la facture (statut ""Suspendue""). Elle devra faire l'objet d'un renvoi par l'émetteur d'un cycle de vie au statut ""Complétée"" avec la ou les pièce(s) jointe(s) manquante(s)X
AUTRE AutreCe motif nécessite une explication en Note de CDVXX
COORD_BANC_ERRErreur de coordonnées bancairesLes références bancaires sur la facture ne correspondent pas à ce qui est paramétré chez le Payeur / Acheteur)XX
TX_TVA_ERR Taux de TVA erroné Un taux de TVA utilisé n'est pas celui qui aurait dûXX
MONTANTTOTAL_ERRMontant Total ErronéUn des montants totaux de la facture est erronée, par exemple Net à payerXX
CALCUL_ERRErreur de calcul de la factureSoit détecté au schematron, soit après (pour les lignes, ou arrondi non accepté)XX
NON_CONFORMEMention légale manquanteToute mention légale non contrôléeXX
DOUBLONFacture en doublon (déjà émise / réçue)Facture en doublon (même numéro même fournisseur et même année de la date de facture)XX
DEST_INCDestinataire inconnuA l'émission, le destinataire est inconnu. Il n'existe pas dans l'annuaire.
DEST_ERRErreur de destinataireL'entité juridique destinataire de la facture n'est pas la bonne (n° de SIREN du Destinataire). Par exemple en cas de multi-société dans un groupe, il arrive que la société facturée ne soit pas celle qui aurait dû l'être.XX
TRANSAC_INCTransaction inconnueLa facture ne correspond pas à une livraison effectuée ou une prestation de service livrée.XX
EMMET_INCEmetteur inconnuL'émetteur de la facture est inconnu du Destinataire (anti-spam)XX
CONTRAT_TERMContrat terminéContrat terminé, plus de facture possibleXX
DOUBLE_FACTDOUBLE FACTUREPrestation ou livraison déjà facturé sur une autre factureXX
CMD_ERRN° de COMMANDE Incorrect ou manquantN° de commande erroné, inexistant ou déjà facturé. Ne peut être utilisé avec un stratut REFUSÉE que si le numéro de camaande a été fourni par l'ACHETEUR AVANT LA FACTURATION.XXXX
ADR_ERRL'adresse de facturation électronique erronéeL'adresse de facturation électronique du destinataire (BT-49 ou BT-34) est absente ou erronéeXX
SIRET_ERRSIRET Erroné ou absentLe SIRET du destinataire est erroné ou absent si exigéXXX
CODE_ROUTAGE_ERRCODE_ROUTAGE Absent ou ErronéLe CODE_ROUTAGE du destinataire est erroné ou absent si exigéXXX
REF_CT_ABSENTRéférence contractuelle nécessaire pour le traitement de la facture manquanteRéférence exigée contractuellement est absente (liste à encadrer) et à identifier dans le CDV : BT-12 (N° de contrat), N° de BL (BT-16), Ref Acheteur (BT-10), Objet Facturé (BT-18), Référence Projet (BT-11), Facture antérieure (BG-3), …XXXX
REF_ERRRéférence incorrecteA préciser dans les autres données du CDV de quelle référence il s'agitXXX
PU_ERRPrix Unitaires incorrectsUn prix Unitaire n'est pas celui attenduXX
REM_ERRRemise erronéeUne remise est absente ou n'est pas celle attendueXX
QTE_ERRQuantité facturée incorrecteUne quantité facturée n'est pas celle attendueXX
ART_ERRArticle facturé incorrectUn article facturé n'est pas le bon ou est erronéXX
MODPAI_ERRModalités de paiement incorrectesLes modalités de paiement (date d'échéance par exemple) n'est pas celle escomptéesXX
QUALITE_ERRQualité d'article livré incorrecteUn des articles livré est défectueuxXX
LIVR_INCOMPProblème de livraisonLivraison incomplète, non conformeXX
REJ_SEMANRejet pour erreur sémantiqueAnalyse du format sémantique
REJ_UNIRejet sur contrôle unicitéContrôle d'unicité
REJ_COHRejet sur contrôle Cohérence de donnéesContrôle cohérence de données (les balises et les référentiels)
REJ_ADRRejet sur Contrôle d'adressageContrôle d'adressage
REJ_CONT_B2GRejet sur Contrôles métier B2GContrôles B2G (vérification du n° d'engagement…)
REJ_REF_PJRejet sur Référence de PJRéférence de PJ
REJ_ASS_PJRejet sur Erreur d'association de la PJErreur d'association de la PJ

Truvio ExFlow AP automation


Due to standard French practices and the e-invoicing mandate, the vendor sender of an invoice may identify itself in the invoice by using the SIREN or SIRET number. Male sure you setup the Vendor identifiers rules considering these 2 identifiers. https://docs.signupsoftware.com/finance-operations/docs/user-manual/import-methods/vendor-identifier-rules#vendor-identifier-rules


Additionaly, make sure the archive functionality is enabled in:
ExFlow AP | Setup | Parameters | General Archive = Yes.


Common D365 Finance localization & master data

Import the Microsoft provided configurations from Dataverse for the xml invoice generation and the Truvio provided ER configurations for the lifecycle status xml generation and verify they are confirmed as compatible with the project scope and the Pagero integration.

medium

Go to Organization administration / Electronic reporting / Configurations and assure that all required parent ER configurations are available.

Validation, error handling and resubmission

If Pagero or PPF validation fails, the document or report is not considered successfully processed.

The user must:

  1. Review the error in ExFlow Document Integration.

  2. Use Communication log and Error information to identify the root cause.

  3. Correct the data in D365 Finance or in the relevant ExFlow setup.

  4. Regenerate the ER output where required.

  5. Resubmit the document or report from ExFlow Document Integration.

Typical correction areas include missing SIREN/SIRET, invalid routing address, incorrect VAT setup, missing tax exemption reason, invalid XML content or unsupported document classification.