action.skip

Setting Up Avalara E-Invoicing and Live Reporting (ELR)

DE E-Rechnung
FR e-facture

← Configuring E-Invoice Creation

To support enterprise and public e-invoicing, JustOn Billing & Invoice Management can prepare electronic invoices.

Be aware that there are various e-invoice formats, distribution channels, and operators. To help get a wider reach, JustOn Billing & Invoice Management integrates with Avalara E-Invoicing and Live Reporting (ELR). This global e-invoicing network supports many protocols and document formats and interoperates with tax authority platforms and exchange networks worldwide, enabling automated e-invoicing across multiple countries and tax jurisdictions.

Avalara E-Invoicing and Live Reporting (ELR) is a paid service. Before you can use Avalara ELR with JustOn Billing & Invoice Management, you must enter into a corresponding contract with Avalara.

Prerequisites

Avalara User account

Prior to using Avalara ELR with JustOn Billing & Invoice Management, your organization must create a user account with Avalara.

  • Active Avalara account with ELR service enabled
  • Client ID and client secret credentials of your Avalara account
  • Access to the Avalara Cockpit (management console)
Country activation

As an Avalara user, you explicitly activate e-invoicing for countries across the world. For details, see E-Invoicing Activation | Avalara Knowledge Center.

  • Countries activated for e-invoicing in your Avalara Cockpit
  • Required country mandates enabled for your target markets
Business entity
To use Avalara ELR with JustOn Billing & Invoice Management, you must properly set up your business entity as described in Preparing Business Entity.

Configuring Avalara ELR Connection

To access the Avalara ELR service, you must provide authentication credentials and configure the connection settings. To do so:

  1. Click to access the App Launcher, and select JustOn Billing Configuration.
  2. Open the Avalara ELR Configuration tab.
  3. Select the Connection sub-tab.
  4. In the Environment field, select the relevant Avalara ELR service environment to which to connect.

    There are two options:

    Environment Intended Use
    Production Live operations
    Sandbox Development and testing
  5. Enter your Avalara user credentials.

    • Client ID – your Avalara account username
    • Client Secret – the password for your Avalara account

    Find these credentials in your Avalara Cockpit.

  6. Optionally, click Refresh next to the Signature Key field to create a new signature key to be used for signed incoming messages from Avalara.

    Copy the produced value to the corresponding field in the Avalara Cockpit. For details, see Add webhook | Avalara Knowledge Center.

  7. Click Get URL next to the Notification URL field to retrieve the URL used for incoming messages from Avalara.

    Copy the produced value to the corresponding field in the Avalara Cockpit. For details, see Add webhook | Avalara Knowledge Center.

  8. Click Save.

    This saves the current configuration.

  9. Click Test Connection to test the connection to the Avalara ELR service.

    This checks the connection with the currently stored credentials.

  10. Click Activate.

    This checks the current configuration and activates the connection if successful.

Info

The produced values for Signature Key and Notification URL must be manually synchronized with your Avalara account.

Remember to copy the values to the clipboard and to transfer them to the Avalara Cockpit.

Configuring Avalara ELR Country Mandates

Each country to which you want to send e-invoices with Avalara ELR requires an individual country mandate.

Note

Before using an Avalara ELR country mandate with JustOn Billing & Invoice Management, you must activate the country in the Avalara Cockpit. For details, see E-Invoicing Activation | Avalara Knowledge Center.

Adding Country Mandate

Once you have activated a country in the Avalara Cockpit, you import the Avalara ELR country mandate to JustOn Billing & Invoice Management. To do so:

  1. Click to access the App Launcher, and select JustOn Billing Configuration.
  2. Open the Avalara ELR Configuration tab.
  3. Select the Country Mandates sub-tab.
  4. Click Add Mandate.

    This opens a dialog that lists the available Avalara ELR country mandates.

    If you cannot find a specific country mandate you may have to activate it in the Avalara Cockpit first.

  5. Select the Avalara ELR mandate you want to add.

  6. Click Next.

    This opens the Select Business Entity dialog.

  7. In the Business Entity field, select the business entity that will use the selected country mandate.

  8. Click Add

    This adds the selected Avalara ELR country mandate. To make it actually available to the selected business entity for e-invoicing, you must add the country mandate as e-invoice format and activate it.

Info

For each Avalara ELR country mandate, JustOn Billing & Invoice Management saves a dedicated Configuration record, where the type is always Avalara ELR Mandate and the subtype specifies the particular country mandate.

Activating or Deactivating Country Mandate

To activate (or deactivate) an Avalara ELR country mandate:

  1. Click to access the App Launcher, and select JustOn Billing Configuration.
  2. Open the Avalara ELR Configuration tab.
  3. Select the Country Mandates sub-tab.
  4. Click the configuration name for the mandate you want to activate (or deactivate).

    This opens the country mandate configuration detail page.

  5. Click Activate (or Deactivate).

    This activates (or deactivates) the selected Avalara ELR country mandate, allowing (or disallowing) the use for e-invoicing with JustOn Billing & Invoice Management.

Info

Only valid mandates can be activated. Before actually activating a mandate, JustOn Billing & Invoice Management automatically executes a validation.

Customizing Country Mandate

Avalara ELR country mandates include standard mappings for invoices and credits from JustOn Billing & Invoice Management fields to Avalara ELR country mandate fields. Generally, these mappings work out of the box for most use cases. However, particular business cases may require some modification, for example, if a specific country mandate requires data that JustOn Billing & Invoice Management does not provide by default.

Understanding data mapping

For each country mandate, there are two mapping files that define the relations between JustOn Billing & Invoice Management fields and Avalara ELR country mandate fields (in JSON notation). These JSON files are saved as Content Version records that are associated with the relevant country mandate configuration.

File Purpose
Avalara ELR Invoice Field Configuration Maps invoice data to the relevant e-invoice fields
Avalara ELR CreditNote Field Configuration Maps credit data to the relevant e-invoice fields

For each e-invoice field, the mapping file includes two keys to hold the data relations:

  • ONB2_Standard_Mapping_Information – specifies the default mapping (read-only)
  • ONB2_Custom_Mapping – configures custom overrides using either a field mapping or static values (editable)

→ Map to a specific object and field

"ONB2_Standard_Mapping_Information" : {
    "SourceObject" : "ONB2__Invoice__c",
    "Field" : "ONB2__Date__c"
},
"ONB2_Custom_Mapping" : {
    "SourceObject" : "ONB2__Invoice__c",
    "Field" : "CustomDate__c"
}
  • SourceObject – specifies the Salesforce API name of the object that contains the field you want to map
  • Field – specifies the Salesforce API name of the field (on SourceObject) you want to map

JustOn Billing & Invoice Management supports the following objects for Avalara ELR field mappings:

Object API Name Description
Invoice ONB2__Invoice__c Main invoice record
Invoice Line Item ONB2__InvoiceLineItem__c Individual line items on invoices
Business Entity ONB2__Tenant__c The business entity (company)
Account Account Customer account records
Contact Contact Individual contact records
Payment Instrument JPAY1__PaymentInstrument__c Payment method information
Examples by object
  • Map from Invoice field:

    "ONB2_Custom_Mapping": {
      "SourceObject": "ONB2__Invoice__c",
      "Field": "ONB2__Date__c"
    }
    
  • Map from Business Entity field:

    "ONB2_Custom_Mapping": {
      "SourceObject": "ONB2__Tenant__c", 
      "Field": "ONB2__TaxID__c"
    }
    
  • Map from Account field:

    "ONB2_Custom_Mapping": {
      "SourceObject": "Account",
      "Field": "BillingStreet"
    }
    

→ Provide a fixed value instead of a field mapping

"ONB2_Standard_Mapping_Information" : {
    "SourceObject" : "ONB2__Invoice__c",
    "Field" : "ONB2__Date__c"
},
"ONB2_Custom_Mapping" : {
    "StaticValue": "2025-10-25"
}

To access the country mandate configuration:

  1. Click to access the App Launcher, and select JustOn Billing Configuration.
  2. Open the Avalara ELR Configuration tab.
  3. Select the Country Mandates sub-tab.
  4. Click the configuration name for the mandate you want to edit.

    This opens the country mandate configuration detail page. It shows the basic mandate data and links to the mapping files.

Now customizing the data mapping usually involves these steps:

Info

Since the mapping files are saved as Content Version records, the access and management options for Salesforce Files apply.

Validating Existing Mapping

To check if the existing mapping meets the requirements, you validate the country mandate.

  1. On the country mandate configuration detail page, click Validate.

    This validates the selected mandate and the field mappings. If the validation fails or if you need a custom mapping, proceed to modify the mapping file.

Downloading Mapping File

To download the relevant mapping file:

  1. On the country mandate configuration detail page, click the name of the JSON mapping file you want to modify.

    This opens the Salesforce file management overlay dialog.

  2. Click Download.

    Save the file using your browser's file download dialog.

Modifying Mapping File

To edit the downloaded mapping file:

  1. Open the downloaded JSON mapping file in a text editor of your choice.
  2. Locate the field definition you want to edit.
  3. Add or modify the ONB2_Custom_Mapping section as required.

    There are two options:

    → Map to a specific object and field

    "ONB2_Standard_Mapping_Information" : {
        "SourceObject" : "ONB2__Invoice__c",
        "Field" : "ONB2__Date__c"
    },
    "ONB2_Custom_Mapping" : {
        "SourceObject" : "ONB2__Invoice__c",
        "Field" : "CustomDate__c"
    }
    

    For details, see "Understanding data mapping" under Customizing Country Mandate.

    → Provide a fixed value instead of a field mapping

    "ONB2_Standard_Mapping_Information" : {
        "SourceObject" : "ONB2__Invoice__c",
        "Field" : "ONB2__Date__c"
    },
    "ONB2_Custom_Mapping" : {
        "StaticValue": "2025-10-25"
    }
    
  4. Save the file.

Standard mapping information

Do not modify the ONB2_Standard_Mapping_Information sections. They define the default mappings and are automatically updated when mandates are synchronized with Avalara.

Uploading Modified Mapping File

To upload the modified mapping file:

  1. On the country mandate configuration detail page, click the name of the JSON mapping file you want to modify.

    This opens the Salesforce file management overlay dialog.

  2. Click to open the action menu, then select Upload New Version.

  3. Select the modified mapping file using your browser's file selection dialog.
  4. Optionally, provide an update message.
  5. Click Upload.

    This makes the modified mapping file available and returns you to the country mandate configuration detail page.

  6. Click Validate.

    This validates the selected mandate and the customized field mappings.

Validating Country Mandate

After customizing mandate data, you must validate the Avalara ELR country mandate to ensure its compliance with the country requirements.

The validation checks the configured field mappings. A mandate is considered valid if

  • all required fields have a mapping source,
  • all mapping sources are accessible and correctly spelled.

To validate a mandate:

  1. Click to access the App Launcher, and select JustOn Billing Configuration.
  2. Open the Avalara ELR Configuration tab.
  3. Select the Country Mandates sub-tab.
  4. Click the configuration name for the mandate you want to validate.

    This opens the country mandate configuration detail page.

  5. Click Validate.

    This validates the selected mandate and the field mappings. Detailed validation results show any configuration issues in the Validation Error field.

Updating Country Mandate

It may be necessary to synchronize the currently stored data of an Avalara ELR country mandate with the newest requirements and changes from Avalara.

Updates are necessary when

  • Avalara changes mandate requirements,
  • Avalara introduces new fields or formats,
  • compliance rules change for a country.

To update the mandate information:

  1. Click to access the App Launcher, and select JustOn Billing Configuration.
  2. Open the Avalara ELR Configuration tab.
  3. Select the Country Mandates sub-tab.
  4. Click the configuration name for the mandate you want to update.

    This opens the country mandate configuration detail page.

  5. Click Update.

    This synchronizes the saved Avalara ELR country mandate with the current data from Avalara.

Info

Remember to review the mandate status and the mapping configuration files for new data.

Enabling Invoices to Use Avalara ELR

Invoices to be processed via Avalara ELR must have the following field values:

Field Required Value Description
E-Invoice Distribution Channel Avalara Triggers the e-invoice creation and distribution through Avalara ELR
E-Invoice Format Country mandate subtype
DE-B2G-PEPPOL
Indicates the specific e-invoice format based on the Avalara ELR country mandate

The two fields must be populated correctly for the Avalara ELR processing to work. Invoices on which one of the values is missing or wrong will not be processed via Avalara ELR.

Enabling invoices for the e-invoice distribution via Avalara ELR therefore also involves:

Adding E-Invoice Distribution Channel

If you have upgraded JustOn Billing & Invoice Management from an older version, you may have to add Avalara ELR as an e-invoice distribution channel manually. To do so:

  1. Click to enter Setup, then navigate to the object management settings of the Invoice object (ONB2__Invoice__c).
  2. Click Fields & Relationships.
  3. Click the name of the E-Invoice Distribution Channel field.
  4. In the Values section, click New.

    Add the new status value Avalara.

  5. Click Save.

    This saves the specified status values as required.

    For help about editing picklists, see Modifying Picklist Values.

Adding E-Invoice Formats

After adding new mandates, you must add the relevant mandate subtypes as picklist values to the Invoice field E-Invoice Format. To do so:

  1. Click to enter Setup, then navigate to the object management settings of the Invoice object (ONB2__Invoice__c).
  2. Click Fields & Relationships.
  3. Click the name of the E-Invoice Format field.
  4. In the Values section, click New.

    Add the relevant mandate subtypes, each in a new line, for example

    DE-B2B-PEPPOL
    DE-B2G-PEPPOL

  5. Click Save.

    This adds the country mandates as e-invoice formats, making them available for selection on invoices.

    For help about editing picklists, see Modifying Picklist Values.