We are implementing a deployment freeze on the following dates: Nov 20th - Dec 2nd and Dec 18th - Jan 4th

Generating transaction data (flows 10.1/10.3)

Prev Next

Once your invoices and your Company are configured, the generation of Transaction data (flows 10.1 and 10.3) can happen automatically or, on an ad hoc basis, for a specific period.

To visualize how your data is linked together before generation, here is the simplified data model (objects and field names) that feeds this flow:

Automatic generation

In practice, every day, a scheduled automation triggers a check for your Company:

  1. The configured VAT scheme is read, along with today's date.

  2. If today's date does not exactly match a filing deadline for that scheme, nothing happens.

  3. If today's date matches a deadline date, the module checks that no initial submission (IN) already exists for this Company Name and period. If one already exists, nothing happens.

  4. Otherwise, the eligible invoices for the relevant period are retrieved.

  5. If at least one eligible invoice exists, the XML file is generated and a Deposit is created with the status Deposit Ready.

Two equivalent mechanisms enable this automation:

  • A Flow scheduled per Company, which calls the Generate e-reporting XML for the current period action. This action protects itself: it can and should be called every day, and it does nothing on days that are not filing dates.

  • A scheduled Apex batch covering all entities (EReportingScheduledBatch), useful if you submit declarations for several Company Names: a single job processes all entities with a configured VAT regime every day, for both transaction data and payment data.

    It can be scheduled from Setup > Scheduled Apex Jobs.

    If generation fails for one entity (for example, due to an invalid SIREN), the other entities in the same batch are still processed. The error is logged without blocking the remaining entities.

At the end of the batch execution, a notification (and an email in case of an error) indicates the exact number of XML files generated, not the number of invoices processed, as a single file can contain many invoices.

On days when no declaration is due, the batch does not send any notification.

No blank filing

If no invoice matches the period on the filing date, nothing is generated — no file, no Deposit. This is the intended behavior: e-reporting does not require an empty declaration.

No duplicate protection

Before generating the files, both the Flow and the batch check that no initial submission (IN) already exists for the same Company Name, the same period, and the same data type (transactions or payments).

If one already exists, nothing happens.

You can therefore schedule the automation to run every day, and even run it again on the same day, without any risk of creating duplicates.

This protection does not apply to corrections (RE) or to manual generation for a specific period: running them again will intentionally create a new Deposit.

Once the Deposit has been created, its submission to your certified platform is handled by another batch. Please refer to the article Send your deposits to Ecosio and track their status.

Generate manually without waiting for the batch (Apex script)

To test e-reporting, especially in a sandbox, you can manually trigger the generation of transaction data for a Company Name, without waiting for the scheduled Flow or batch to run. The script calls the same global action as the Flow.

To run the script:

  1. Get the Company Name ID: open the Company Name record in Salesforce and copy the 18-character ID from the URL (it usually starts with a0X).

  2. Open the Developer Console (⚙️ icon > Developer Console), then go to Debug > Open Execute Anonymous Window.

  3. Paste the script below, replacing the Company Name ID and the reference date:

fiix.GenerateCurrentEReportingXmlAction.GenerateCurrentEReportingXmlRequest req =
    new fiix.GenerateCurrentEReportingXmlAction.GenerateCurrentEReportingXmlRequest();
req.raisonSocialeId = 'a0X...';                 // Company Name ID
req.referenceDate   = Date.newInstance(2026, 11, 20);
fiix.GenerateCurrentEReportingXmlAction.generateEReportingXmlForCurrentPeriod(
    new List<fiix.GenerateCurrentEReportingXmlAction.GenerateCurrentEReportingXmlRequest>{ req }
);
  1. Click Execute. If a reporting period is generated, a Deposit and its XML file are created (see the article Find the Generated Data).

You cannot choose the start and end dates: the period is calculated based on the Company's VAT regime and the reference date. For companies using the monthly standard VAT regime, this period is a 10-day period.

⚠️ The reference date must be exactly the submission deadline for the period to be generated, as indicated in the DGFiP calendar (see the article Submission Calendar) — not a date within the 10-day period.

The format is Date.newInstance(year, month, day).

[IMAGE: DGFiP submission calendar table]

Examples for a Company Name using the monthly standard VAT regime:

Period to report

Submission deadline

Reference date to enter

September 11–20, 2026

30/09/2026

Date.newInstance(2026, 9, 30)

November 1–10, 2026

20/11/2026

Date.newInstance(2026, 11, 20)

November 21–30, 2026

10/12/2026

Date.newInstance(2026, 12, 10)

Which invoices are included?

An invoice is included only if all three of the following conditions are met:

  • Its invoice date falls within the period.

  • It has been sent (the IsSent__c checkbox is selected).

  • Its E-reporting Customer Type (EReportingCustomerType__c) is filled in (BtoBi or BtoC).

Nothing is generated if no reporting period is open on the reference date (the date is not a submission deadline for the Company's VAT regime), if no eligible invoices exist for the period, or if the period has already been reported (an IN Deposit already exists).

To regenerate a period that has already been submitted, use a correction (RE).

Manual generation for a specific period (Flow)

To rerun or test a specific period outside the automatic schedule, you need to create a Salesforce Flow that calls the Generate e-reporting XML for period action. Then specify a start date and an end date to run your Flow.

⚠️ This action with an explicit period applies to all reporting entities. Only use it if a single Company Name has invoices during the selected period, to avoid mixing data from multiple entities.

⚠️ This generation process is not protected against duplicates: each execution creates a new Deposit.