Frisbii e-invoice generates invoices in XML CII (Cross Industry Invoice) Extended format, the standard chosen by Frisbii among the reform's 3 base formats. If you choose your own Approved Platform, make sure it accepts this format — and familiarise yourself with its structure for your tests. This guide covers the two available methods: manual generation from an invoice, and bulk generation via Apex or Flow.

Prerequisites before generating
Before you can use the e-invoice features, check the following points:
The Frisbii e-invoice extension package is installed in your Salesforce org.
Your Frisbii app version is ≥ 3.247.
The "Frisbii E-Invoicing" Permission Set is assigned to the relevant users (see below).
Your customer database is qualified: SIREN, SIRET, electronic billing address, customer type…
The Region/Country (States and Territories) picklists are enabled on your Salesforce org.
Assign the Frisbii E-Invoicing Permission Set
The Frisbii E-Invoicing permission set controls access to the electronic invoicing features. It must be assigned to every user who needs to generate or view electronic invoices.
To assign it:
Go to Setup → Permission Sets.
Select Frisbii E-Invoicing.
Click Manage Assignments → Add Assignments.
Select the relevant users and save.
⚠️ Without this permission set, the generation button and e-invoice fields will not be visible to the user, even if the package is installed.
Conditions for CII generation
To be able to generate an XML invoice from Frisbii, here are the preliminary conditions:
The invoice must be issued
The invoice must include at least one invoice line
A valid SIREN must be present on the customer Account and on the issuing legal entity
The Region/Country (States and Territories) picklists must be enabled on your Salesforce org
Method 1 — Manual generation from an invoice (button)
This is the simplest method, suited to case-by-case use or your initial tests.
Add the E-Invoice XML button to your Invoice page layout
The generation button isn't added automatically to your page layout during installation. You need to add it manually once.
From any Frisbii invoice, click the Setup icon (⚙️) in the page header, then select Edit Page.

Click the action buttons sidebar and click Add Action.

In the list of actions, search for and select E-Invoice XML.
Click Save, then make sure the page is properly activated for your user profiles. Without activation, the button won't be visible.

Generate the CII from an invoice
Once the button is in place:
Open the Frisbii invoice for which you want to generate the XML.
Click the E-Invoice XML button in the action bar.
The XML CII file is generated and automatically attached to the invoice in the Notes & Attachments section.


💡 You can download the XML file from Notes & Attachments and open it in a text editor to check the data. This is especially useful during your testing phases.
Method 2 — Bulk generation via Apex
To process a large volume of invoices in a single operation, Frisbii e-invoice exposes a dedicated Apex method.
The method
fiix.EInvoicingService.saveXmlsAsFilesFromInvoiceIds(invoicesIds, isPdfToAttach);Arguments
Parameter | Type | Description |
|---|---|---|
|
| List of Salesforce record IDs of the invoices to process |
|
| If |
What the method does
For each invoice in the list, the method:
Generates the corresponding XML CII file.
Saves it as a ContentDocument (Salesforce File).
Links the file to the invoice record in its Notes & Attachments list.
Important notes on processing
⚠️ Asynchronous (batch) processing beyond 25 invoices. If the input list contains more than 25 invoices, processing automatically switches to asynchronous batch mode. The limit is set by the Salesforce platform in a batch context with QueryLocator.
⚠️ Batch processing from 8 invoices when custom mappings are used. If you have defined custom mappings on the EInvoicing Mappings page, batch mode activates from 8 invoices or more in the input.
⚠️ If an error occurs, the batch of invoices is not blocked. Only the invoice with the error is isolated, and its submission status changes to “Failed,” but the other invoices continue to be generated.
Example call from the developer console
List<Id> ids = new List<Id>{
'a0XXXXXXXXXXXXXXX',
'a0YYYYYYYYYYYYYYY'
};
fiix.EInvoicingService.saveXmlsAsFilesFromInvoiceIds(ids, true);Method 3 — Bulk generation via Flow (Invocable method)
The equivalent of the Apex method is available for Salesforce Flows, without needing any code.
In your Flow, add an Action element and search for the action:
Generate e-invoicing XMLs from Invoice records to FilesThe parameters are identical to the Apex method: the list of invoice record and the boolean for attaching the PDF.
From this workflow, you’ll be able to define your input conditions, such as:
E-invoicing applies only to B2B invoices between French taxable entities; therefore, only invoices where the billing country is France should be generated (this is an example—you can choose another criterion, such as the presence of a SIREN/SIRET number on the account…)
Do not include e-reporting; if an invoice has the “E-reporting Category Code” field, then no XML should be generated for that invoice
Do not include invoices of the “Internal Credit Memo” type. The Reform specifies that in the event of a refusal or rejection of an electronic invoice, an internal credit memo must be issued but not submitted to the PA; this is solely an internal accounting document.
💡 This method is ideal for automating CII generation whenever an invoice's status changes (e.g. an automatic trigger when an invoice moves to "Finalised" or "Issued" status).
Testing your electronic invoice
Before connecting your PA, or while waiting for the Ecosio interconnection to be deployed, you can validate your generated CII files directly using an online tool.
B2B Router — The recommended tester
B2B Router is an e-invoicing test platform that lets you validate an XML CII file, without needing a PA.
How to test:
Generate a CII from a test invoice in your Frisbii sandbox (manual method via the button).
Download the XML file from the invoice's Notes & Attachments.
Upload your XML file.
B2B Router analyses the file and reports compliance errors or warnings.
💡 This is the tool to use during your acceptance testing phase, before connecting your PA. Each error reported by B2B Router corresponds to a field that's missing or incorrectly filled in on your invoice or in your Salesforce database. You can report any errors you encounter by opening a Frisbii support ticket.