From Indrajeet Sengupta: E-Invoicing with Revenue Cloud
What is E-Invoicing?
Imagine instead of printing an invoice, putting it in an envelope, and mailing it or emailing it, you create it in your accounting software and send it directly to your customer’s accounting software in a structured digital format. That’s e-invoicing in a nutshell.
E-invoicing is the issuance and exchange of invoices in a structured electronic data format, designed for machine-to-machine readability and automated processing. Crucially, a true e-invoice is not simply a PDF or scanned document; it is a structured file, often in XML, UBL, or EDI formats, that can be automatically validated, consumed, and posted directly into a recipient’s accounting or ERP system. The exchange typically occurs through standardized Peppol networks or dedicated government portals. This systematic approach eliminates manual data entry and establishes a transparent, auditable flow of fiscal transaction data between trading partners.
For any multinational enterprise, implementing einvoicing correctly and efficiently is an imperative compliance measure. Governments—particularly those with VAT/GST systems—are imposing mandates to gain real-time or near real-time visibility into business transactions, a strategy designed to combat fraud and close the tax gap. Failure to comply with country-specific standards results in penalties and can prevent a business from legally trading in key jurisdictions. Operationally, this required automation reduces significant administrative costs (paper, postage, labor), eliminates manual data entry errors, and accelerates Accounts Receivable and Accounts Payable cycles, directly improving cash flow.
2. The Benefits of Going Digital
Why are businesses and governments so excited about e-invoicing? The advantages are clear:
- Cost Savings: Say goodbye to expenses on paper, printing, and postage. More importantly, you save countless hours of manual processing time.
- Faster Payments: Because e-invoices are received and processed instantly, the approval and payment cycle is significantly shorter. This greatly improves cash flow.
- Reduced Errors: Manual data entry is prone to human error. E-invoicing eliminates this, ensuring accuracy and reducing the back-and-forth of correcting mistakes.
- Enhanced Security: E-invoices are exchanged over secure networks, drastically reducing the risk of invoice fraud, phishing scams, and interception compared to paper or PDF invoices sent via email.
- Improved Compliance: With governments increasingly mandating e-invoicing for tax purposes, adopting it ensures you stay compliant with tax regulations automatically.
- Environmental Friendliness: Less paper means a smaller carbon footprint.
3. The Global Trend: E-Invoicing Mandates
Governments worldwide are recognizing the power of e-invoicing to combat tax evasion and digitize their economies. This has led to a wave of mandates requiring businesses to adopt e-invoicing. The trend is moving from a “post-audit” model (where tax authorities check records later) to a “clearance” model (where invoices must be cleared by the government in real-time).
Here’s a snapshot of the global landscape:
| Country/Region | Mandate Status | Key Go-Live Dates | Official Source Link |
| Americas | |||
| Brazil | Mandatory (Fragmented) | NFCom: 1 Nov 2025; National NFS-e: 2026 | http://www.nfe.fazenda.gov.br/portal |
| Mexico | Mandatory | Live (CFDI 4.0 since 1 Apr 2023) | https://www.sat.gob.mx/portal/public/tramites/factura-electronica |
| Chile | Mandatory | Live (since Feb 2018) | https://www.sii.cl/servicios_online/ |
| Colombia | Mandatory | Live (since Nov 2020) | https://micrositios.dian.gov.co/sistema-de-facturacion-electronica/ |
| Peru | Mandatory | Live (since 2022) | https://cpe.sunat.gob.pe/ |
| Argentina | Mandatory | Live (since 2019 for most sectors) | https://www.afip.gob.ar/fe/ |
| Costa Rica | Mandatory | Live (since 2019) | https://www.hacienda.go.cr/ATV/login.aspx |
| Europe | |||
| France | Phased Mandate | Reception: 1 Sep 2026; Issuance (Large/Mid): 1 Sep 2026; Issuance (SME): 1 Sep 2027 | https://www.impots.gouv.fr/professionnel/je-decouvre-la-facturation-electronique |
| Germany | Phased Mandate | Reception: 1 Jan 2025; Issuance (Large): 1 Jan 2027; Issuance (All): 1 Jan 2028 | https://en.e-rechnung-bund.de/ |
| Italy | Mandatory | Live (since 1 Jan 2019) | https://www.agenziaentrate.gov.it/portale/aree-tematiche/fatturazione-elettronica/fatturazione-elettronica-site-area |
| Poland | Phased Mandate | Issuance (Large): 1 Feb 2026; Issuance (All): 1 Apr 2026 | https://www.podatki.gov.pl/ksef/ |
| Spain | Mandate Pending Regs | Projected 2027/2028 | https://www.facturae.gob.es/factura-electronica/Paginas/factura-electronica.aspx |
| Denmark | B2G(Mandatory) / B2B (Phased) | 1 January 2005: B2G , 1 January 2024 – 1 January 2026: Phased Implementation for B2B | https://danishbusinessauthority.dk/requirements-digital-bookkeeping-systems |
| Belgium | Mandatory | 1 Jan 2026 | https://einvoice.belgium.be/en |
| Romania | Mandatory | Reporting: 1 Jan 2024; E-invoicing: 1 Jul 2024 | https://www.anaf.ro/anaf/internet/ANAF/despre_anaf/strategii_anaf/proiecte_digitalizare/e.factura |
| Serbia | Mandatory | Live (since 1 Jan 2023) | https://www.efaktura.gov.rs/ |
| Austria | B2G Mandatory | Live (B2G since 1 Jan 2014) | https://www.usp.gv.at/en.html |
| Bulgaria | B2G Mandatory | Live (B2G since 1 Jul 2017) | https://www.e-docs.bgsait.com/ |
| Canary Islands | Mandate Pending Regs | Same as Spain (Projected 2027/2028) | https://www.gobiernodecanarias.org/tributos/ |
| Croatia | B2G Mandatory | Live (B2G since 1 Jul 2019) | https://www.fina.hr/servis-e-racun |
| Cyprus | B2G Mandatory | Live (B2G since 1 Apr 2020) | https://www.uat.gov.cy/ |
| Czech Republic | B2G Mandatory | Live (B2G since 1 Oct 2016) | https://www.nakh.cz/cs/ |
| Denmark | Mandatory | Live (B2G since 2005, B2B since 2024 for bookkeeping) | https://erhvervsstyrelsen.dk/ |
| Estonia | B2G Mandatory | Live (B2G since 1 Jul 2019) | https://www.rtk.ee/ |
| Finland | B2G Mandatory | Live (B2G since 1 Apr 2020) | https://www.valtiokonttori.fi/ |
| Great Britain (UK) | B2G (NHS) Mandatory | Live (NHS since 2019) | https://www.gov.uk/government/publications/public-procurement-policy-note-0318 |
| Iceland | Mandatory | Live (B2G since 2015, B2B since 2016) | https://www.fjs.is/ |
| Ireland | B2G Mandatory | Live (B2G since 18 Apr 2020) | https://ogp.gov.ie/e-invoicing-in-ireland/ |
| Luxembourg | Phased Mandate | Live (Large: May 2022; Mid: Oct 2022; Small: Mar 2023) | https://gouvernement.lu/en/dossiers/2021/facturation-electronique.html |
| Netherlands | B2G Mandatory | Live (B2G since 18 Apr 2019) | https://www.logius.nl/producten/e-factureren |
| Norway | B2G Mandatory | Live (B2G since 1 Jan 2019) | https://www.digdir.no/ |
| Portugal | Phased Mandate | Live (B2G since Jan 2021; B2B since Jan 2023) | https://www.espap.gov.pt/ |
| Slovenia | B2G Mandatory | Live (B2G since 1 Jan 2015) | https://www.ujp.gov.si/ |
| Sweden | B2G Mandatory | Live (B2G since 1 Apr 2019) | https://www.digg.se/ |
| APAC & Middle East | |||
| Saudi Arabia | Phased Mandate | Phase 2 (Integration) live since 1 Jan 2023 in waves | https://zatca.gov.sa/en/E-Invoicing/Pages/default.aspx |
| India | Phased Mandate | Live (Threshold: AATO > Rs. 5 Crore) | https://einvoice1.gst.gov.in/ |
| Japan | Qualified Invoice System | Live (since 1 Oct 2023) | https://www.nta.go.jp/taxes/shiraberu/zeimokubetsu/shohi/keigenzeiritsu/invoice_about.htm |
| Australia | Phased Mandate | B2G Live (since 1 Jul 2022) | https://www.ato.gov.au/Business/eInvoicing/ |
| New Zealand | Phased Mandate | B2G Capability: 1 Jan 2026 | https://www.einvoicing.govt.nz/ |
| Malaysia | Phased Mandate | Issuance (Large): 1 Aug 2024; Issuance (All): 1 Jul 2025 | https://www.hasil.gov.my/en/e-invoice/ |
4. How Does It Work? The E-Invoicing Process
The process involves a few key steps and players for both the seller and the buyer.
For the Seller:
- Invoice Creation: The seller creates an invoice in their ERP or accounting system as usual.
- Tax Determination: Often, a specialized tax vendor solution is integrated to automatically calculate the correct VAT/GST based on the transaction details, ensuring tax accuracy.
- Conversion & Validation: The invoice data is converted into a structured e-invoice format (like XML).
- Sending to Partner: The seller sends this e-invoice to their chosen invoicing partner (e.g., Vertex, Sovos, Pagero, Avalara). This partner acts as an access point to the e-invoicing network.
- Transmission: The partner validates the invoice against country-specific rules and transmits it securely through the required network (like PEPPOL or a government portal) to the buyer’s access point. In “clearance” models, this step includes sending the invoice to the tax authority for real-time approval before it’s sent to the buyer.
For the Buyer:
- Receiving: The buyer’s invoicing partner receives the e-invoice from the network.
- Data Ingestion: The partner sends the structured data directly into the buyer’s ERP or accounts payable (AP) system.
- Automated Processing: The AP system automatically processes the invoice, matching it against purchase orders and goods receipts without any manual keying.
- Approval & Payment: The invoice is routed for digital approval and scheduled for payment, all within the same system.
5. Common Formats for E-Invoices
Because e-invoices are meant for machines to read, they use structured data formats. You’ll often hear these terms:
- XML (eXtensible Markup Language): The foundation for many e-invoice standards.
- UBL (Universal Business Language): A popular library of standard XML business documents, widely used in e-invoicing.
- Factur-X / ZUGFeRD: A hybrid format popular in France and Germany that embeds an XML file within a human-readable PDF.
- PEPPOL BIS Billing 3.0: The standard format used across the PEPPOL network.
6. Common E-Invoicing Networks
E-invoices don’t just travel over the open internet; they use secure, standardized networks.
- PEPPOL (Pan-European Public Procurement On-Line): The most widespread international network. It’s not just for Europe; countries like Australia, New Zealand, Singapore, and Japan have adopted it. It works as a “four-corner model” where the seller (corner 1) sends to their Access Point (corner 2), which sends to the buyer’s Access Point (corner 3), which delivers to the buyer (corner 4).
- Government-Centralized Platforms: Many countries, particularly in Latin America (e.g., Mexico’s CFDI, Brazil’s NF-e) and Europe (e.g., Italy’s SdI), operate a centralized government hub. All invoices must pass through this single platform for validation and clearance.
- Service Provider Networks: Companies like Sovos, Tungsten, and Tradeshift operate large networks that can connect businesses to each other and to various government platforms, simplifying compliance across multiple countries.
7. How do you do it in Revenue Cloud
Salesforce Revenue Cloud is a powerful engine for managing complex billing, and can be functionality expanded where needed to connect to government portals and standardized networks such as PEPPOL. Additionally, Revenue Cloud can connect to and utilize external service providers to manage e-invoicing requirements across the globe
So, how do you bridge this gap? The answer lies in a well-architected middleware integration. While Salesforce’s recommended IPaaS (Integration Platform as a Service) is MuleSoft, you can also build a custom solution. This guide breaks down the entire process, showing you how to turn Revenue Cloud into a compliant, global e-invoicing machine.

The Foundation in Salesforce
Before you can build any bridges, you need a solid foundation. This involves preparing your Salesforce org to hold all the necessary data and track the e-invoicing lifecycle.
Data Capture
Ensure all required data points for e-invoicing are captured in Salesforce. This data often lives across multiple objects. Key objects include Invoice, Account, Billing Schedule Group, InvoiceLine, InvoiceLineTax, Contact, BillingProfile.
E-Invoicing Status Field
On the Invoice object, create a custom picklist field named “E-Invoicing Status”. This field is crucial for tracking the invoice’s journey and triggering the automation.
Example Statuses:
- Pending: The invoice has been created but is not yet ready for submission.(Draft Status of Invoice)
- Canceled: DRAFT invoice not used, so canceled it.
- Ready for E-Invoicing: The invoice has been finalized and is ready to be sent to the network. This status will be our trigger.
- Sent to Network: The middleware has successfully sent the invoice data.
- Acknowledged by Network: The network has received the invoice and confirmed its validity.
- Approved: The invoice has been approved by the tax authority (for clearance models).
- Rejected: The invoice was rejected by the network due to errors.
- Correction Needed: Data needs correction.
- Correction Addressed: Correction has been made and can be resent for Approval.
- Error: The integration process failed.
- Exempt: Invoice is exempted from E-Invoicing Process.
- Voided invoice – No need to send for E-Invoicing.
This can be made more granular based on the country level specifications
E-Invoicing Fields on Invoice
There can be various details that might need to be captured, creating fields for these. Here are some example fields:
- E-Invoicing Status
- Idempotency Key
- Issue Date
- Document Number
- Document ID
- IRN Number (India)
- IdSdi (Italy)
- UUID (Mexico)
- Chave de Acesso (Brazil)
- Transmission DateTime
- PDF Document (or use Invoice Files)
Create Custom Salesforce Event for Invoice Posted
Salesforce does not generate an event whenever a custom field like “E-Invoicing Status” field is set to a particular value. To do this, we will create an event that is a lightweight message containing key identifiers, like the InvoiceId and AccountId. Using this the middleware will be able to fetch the invoice details
The Integration Process: A Detailed Breakdown

Here’s how the magic happens, step by step, following an event-driven architecture.
1. Trigger
The process kicks off inside Salesforce. An automation rule (using a Salesforce Flow or Apex Trigger) monitors the Invoice object. When a user updates an invoice’s “E-Invoicing Status” to “Ready for E-Invoicing” or “Correction Addressed”, the trigger fires. This E-Invoicing Status could change automatically once the Invoice is in Posted State or manually depending on business conditions. Customers can write flows to change this based on their business requirements.
2. Event
Upon firing, the trigger doesn’t call the middleware directly. Instead, it publishes a Custom Platform Event within Salesforce which can be read by the middleware or Mulesoft. This decouples Salesforce from the middleware, making the system more robust and scalable.
3. Listen
Your middleware layer is continuously listening for this specific Platform Event from Salesforce. When it catches a new event, it knows it has a new e-invoice to process.
4. Extract
The middleware takes the InvoiceId from the event message and makes a Composite API call back to Salesforce. This is highly efficient, as it allows the middleware to query the Invoice record and all its related parent records (like the Account for the Tax ID and the BSG for the PO number) in a single, consolidated API call.
5. Transform
This is the middleware’s primary job. It takes the JSON data extracted from Salesforce and transforms it into the required e-invoicing format for the target country. This usually means mapping the Salesforce fields to a structured XML format, such as UBL (Universal Business Language) or a country-specific standard like Factur-X.
6. Send
Once the e-invoice file is created, the middleware authenticates with the external E-Invoicing Network’s API and sends the transformed payload. The middleware then updates the “E-Invoicing Status” in Salesforce to Sent to Network.
7. Reconcile
The E-Invoicing Network will respond. This can happen in two ways:
- Synchronous Response: An immediate reply confirming the file was received and is structurally valid. The middleware can use this to update the status in Salesforce to Acknowledged by Network.
- Asynchronous Response: The final approval or rejection from a government tax authority may come minutes or hours later. The network typically sends this status back via a webhook, which is a URL pointing to your middleware. The middleware listens for this incoming webhook to receive the final status.
8. Update Back SF
Upon receiving the final reconciliation status (e.g., Approved or Rejected), the middleware makes one last API call to Salesforce. It updates the Invoice record with:
- The final “E-Invoicing Status” (Approved or Rejected).
- The unique Reference Number provided by the tax authority.
- Any error messages in case of rejection.
- Any other necessary fields that needs to be captured.
9. Accounting
Considering you implement the accounting features on the org, as outlined here https://help.salesforce.com/s/articleView?id=ind.billing_financial_accounting.htm&type=5, you will be able to find the journal entries generated to the transaction journal.
You can look at the following post for an example how this is done.
