action.skip

Enabling E-Invoice Creation

When operating certain markets, your business may require to distribute electronic invoices – structured invoice data that is exchanged electronically between trading partners in order to automate accounts payable processing.

In particular, public institutions in the EU and, to an increasing extent, enterprises are required to accept and process electronic invoices. A set of common specifications and standards (Peppol) provides for interoperability between issuers and recipients across Europe.

To support enterprise and public e-invoicing, JustOn Billing & Invoice Management can prepare electronic invoices and credits. Currently, it supports the following formats:

  • Peppol BIS Billing (with UBL syntax) for electronic invoicing across Europe
  • XRechnung (with UBL syntax) for electronic invoicing within Germany

Businesses can send e-invoice files to the Peppol Network, from where the e-invoices will be distributed to their recipients, or create e-invoice files and send these documents to their recipients via an invoice submission portal or email.

Info

The e-invoice support involves Salesforce API access and therefore requires at least the Salesforce Enterprise Edition.

The involved tasks for configuring your JustOn Billing & Invoice Management instance to support e-invoicing differ depending on whether you use the Peppol Network or just create e-invoice files:

Peppol-Specific Configuration

The following tasks are required only if you want to distribute e-invoices via the Peppol Network.

In addition to these specific tasks, make sure to apply the common e-invoice configuration as well.

Contracting Peppol Service

Prior to distributing e-invoices via Peppol, your organization must contract with JustOn for the Peppol support.

  1. Contact our service team to clarify the subscription details.

Defining Sender Address

Participating in the Peppol Network requires your organization to have a unique e-invoice sender address, which is subject to a specific address scheme identifier. The two values must be specified in your relevant business entity setting.

  1. Select an appropriate e-invoice sender address and determine the corresponding address scheme.

    This identifier must be one of the participant identifier schemes allowed by Peppol, as described in Peppol Participant Address and Scheme.

  2. Specify the values in your relevant business entity setting.

    Example 1: Using French VAT number

    Business Entity Field Example Value
    E-Invoice Sender Address FR12345678901
    E-Invoice Sender Scheme Id 9957

    Example 2: Using German VAT number

    Business Entity Field Example Value
    E-Invoice Sender Address DE123456789
    E-Invoice Sender Scheme Id 9930

Requesting Technical Activation

After contracting the Peppol service and defining your sender address, you must request the technical activation via JustOn Support.

  1. File a corresponding ticket in the JustOn Support Portal.

    Make sure to provide the E-Invoice Sender Address and E-Invoice Sender Scheme Id as defined in your business entity.

Info

Be aware that the registration and activation of your organization in the Peppol Network may take two to three business days.

Enabling Platform Integration

JustOn Billing & Invoice Management acts as the "user interface" for managing e-invoices and controls the data management. However, significant parts of the business logic to produce e-invoices run on the Heroku-based platform. This is why you must define a platform integration user. This is a (technical) user that is employed for the communication between Salesforce and Heroku whenever a real user triggers relevant business logic.

Defining a platform integration user requires access to the Global Configuration dialog. Hence, enabling the platform integration is a two-step task:

Enabling Global Configuration Access

In addition to be assigned the System Administrator profile, users who intend to access the global configuration must be explicitly allowed to access the Global Configuration dialog – preferably, using a dedicated permission set.

To enable the access to the Global Configuration dialog:

  1. Create a dedicated permission set.

    For details, see Create Permission Sets in the Salesforce Help.

  2. In the new permission set, click Flow Access in the Apps section.

  3. Click Edit.
  4. Select ONB2.Global Configuration and move it to the Enabled Flows column.

    column_enabled

  5. Click Save.

  6. Assign the permission set to the relevant users.

    For details, see Assign Permission Sets to a Single User in the Salesforce Help.

    Together with the System Administrator profile, this makes the Global Configuration dialog available for the selected users.

Defining Platform Integration User

The platform integration user is a (technical) user that is required for the communication between Salesforce and Heroku whenever a real user triggers relevant business logic.

To define an integration user:

  1. Create a dedicated technical user for the integration or prepare a "real" user accordingly.

    The integration user

    • does not necessarily need to be associated with a real person
    • must be assigned the permission set JustOn Read/Write
    • must be enabled to use the Salesforce API via a profile or a permission set

    To check for the API access in profiles or permission sets, click to enter Setup, then navigate to Users > Profiles | Permission Sets > Profile/Permission Set Name > System Permissions, and make sure that API Enabled is selected.

  2. Click to access the App Launcher, and select JustOn Configuration.

  3. Open the Global Configuration tab.

    Users who intend to access the global configuration must be assigned the System Administrator profile and explicitly allowed accessing the Global Configuration dialog.

  4. Click Edit.

    This launches a screen flow that shows the global configuration input fields.

  5. In the Platform Integration section, select the intended integration user in the New User field.

  6. Click Save to save your settings, then Finish to complete the screen flow.

Enabling Send E-Invoice Action

To enable the option for sending an e-invoice to Peppol from the invoice detail view, add the Send E-Invoice action to the invoice record page.

Info

Using dynamic actions, you can generally show or hide actions depending on specific record conditions. With respect to the Send E-Invoice action on invoices, you must explicitly exclude invoices from displaying this action that have the statuses Draft, Pre-Draft and Pre-Open as well as the e-invoice status In Peppol Queue.

  1. Open the Invoice record detail page in the Lightning App Builder.

    1. Navigate to an invoice.
    2. Click to open the Setup menu, then select Edit Page.
  2. Select the top panel ("Highlights").

  3. Click Add Action and select the action Send E-Invoice.
  4. Click Add Filter and set the action visibility.

    • Record > Status Not Equal Draft
    • Record > Status Not Equal Pre-Draft
    • Record > Status Not Equal Pre-Open
    • Record > E-Invoice Status Not Equal In Peppol Queue

    Under Show components when, select All filters are true.

  5. Click Done on the action window, then Save in the Lightning App Builder.

    For more details, see Create Dynamic Actions in Lightning App Builder in the Salesforce Help.

Enabling Peppol Notification Display

As Peppol transfers the e-invoices to the recipients, the sender will receive notifications about the distribution status. JustOn Billing & Invoice Management stores this information in dedicated Peppol Notification records, which are related to the original invoice.

If required, you can display related Peppol notifications on the invoice detail view. To do so:

  1. Navigate to the object management settings of the Invoice object.
  2. Click Page Layouts.
  3. In the Invoice Layout row, click to open the action menu, then select Edit.
  4. From the Related Lists palette, drag the Peppol Notifications list to the Related Lists section.
  5. Click Save.
  6. In the object management settings of the Invoice object, click Lightning Record Pages.
  7. Open the Invoice page details, and click Edit.
  8. Drag the Related List - Single component to an appropriate location of the Invoice record page.
  9. In the Related List field of the component properties, select Peppol Notifications.
  10. Click Save.
  11. Click Activate.

    This makes the customized record page available to users.

    For help about modifying page layouts, see Managing Pages.

E-Invoice Creation-Specific Configuration

The following tasks are required only if you want to create e-invoice files to be distributed manually.

In addition to these specific tasks, make sure to apply the common e-invoice configuration as well.

Enabling Create E-Invoice Action

To enable the option for creating an XRechnung file from the invoice detail view, add the Create E-Invoice action to the invoice record page.

Info

Using dynamic actions, you can generally show or hide actions depending on specific record conditions. With respect to the Create E-Invoice action on invoices, you must explicitly exclude invoices from displaying this action that have the statuses Draft, Pre-Draft and Pre-Open.

  1. Open the Invoice record detail page in the Lightning App Builder.

    1. Navigate to an invoice.
    2. Click to open the Setup menu, then select Edit Page.
  2. Select the top panel ("Highlights").

  3. Click Add Action and select the action Create E-Invoice.
  4. Click Add Filter and set the action visibility.

    • Record > Status Not Equal Draft
    • Record > Status Not Equal Pre-Draft
    • Record > Status Not Equal Pre-Open

    Under Show components when, select All filters are true.

  5. Click Done on the action window, then Save in the Lightning App Builder.

    For more details, see Create Dynamic Actions in Lightning App Builder in the Salesforce Help.

Common E-Invoice Configuration

The following tasks are required in any case, irrespective of whether you use the Peppol Network or just create e-invoice XML files.

Enabling App Access for JustOn Platform

To prepare your JustOn Billing & Invoice Management instance to generate valid e-invoice XML files, you must enable access to the connected app JustOn Platform for all relevant user profiles.

JustOn Platform concepts

Generally, the data management and user interaction with JustOn Billing & Invoice Management take place on the Salesforce Platform. For this purpose, the software is installed in the operator's Salesforce environment. Some business logic, however, runs on the Heroku-based platform. JustOn Billing & Invoice Management provides a dedicated connected app, JustOn Platform, to integrate the Salesforce and Heroku parts.

Setting up JustOn Billing & Invoice Management involves enabling access to the connected app JustOn Platform. The access is controlled using profiles. So when creating the users who will work with JustOn Billing & Invoice Management, you must assign the relevant profile to each of them. You can use the standard profiles or create custom profiles.

To enable access to the connected app JustOn Platform for all relevant profiles:

  1. Click to enter Setup, then navigate to Apps > Connected Apps > Manage Connected Apps.
  2. Click Edit in the row of JustOn Platform.
  3. In the Permitted Users field, select Admin approved users are pre-authorized.

    Confirm the selection when prompted.

  4. Click Save.

    This will prevent all users from accessing JustOn Platform, including org admins.

  5. On the Connected Apps list, click JustOn Platform.

    This displays the app detail page.

  6. Add the intended profile.

    1. In the Profiles section, click Manage Profiles.
    2. Select the relevant profile, at least, System Administrator.
    3. Click Save.

Note

JustOn Billing & Invoice Management allows only users with the associated profile to access the app, which relies on the option Admin approved users are pre-authorized in the Permitted Users field. Leaving the default value All users may self-authorize will prevent users from accessing the app and produce the following error when they try to execute relevant business logic:

Platform not available, please contact customer support if the problem persists!

Preparing E-Invoice Source Data

The following conditions must be met for JustOn Billing & Invoice Management to successfully create e-invoice XML files.

  1. Prepare your business entity as required.

    The fields that hold common XRechnung-specific data include Company, Tax ID, Street, City, Postal Code, Country Code, Phone, Email Sender, IBAN.

    Fields that hold Peppol-specific e-invoice data include, in addition, E-Invoice Sender Address and E-Invoice Sender Scheme Id (see Defining Sender Address).

    E-invoice recipients may request additional information, which you will then have to provide in corresponding fields.

  2. Prepare quantity units as required.

    The quantity unit must define a code for the measurement unit applicable to the quantity. The value from the Code field is copied to the Invoice Line Item field Unit Code. The code is expected to be one of the codes listed in UNECE Recommendation No. 20 "Codes for Units of Measure Used in International Trade" or UNECE Recommendation No 21 "Codes for Passengers, Types of Cargo, Packages and Packaging Materials", see UNECE Code List Recommendations.

    Typical unit codes include, for example:

    Measurement Unit Unit Code
    Piece C62
    Hour HUR
    Kilowatt Hour KWH
    (Page) Impression IM
    Persons IE
  3. Prepare tax rules as required.

    The fields that hold e-invoice-specific data include Tax Rate, Business Entity and VAT Category Code.

    The VAT category code is a code for categorizing VAT regulations. The value is copied to VAT Category Code on the invoice line item. The code is expected to be one of the codes listed in the code list 5305 of the United Trade Data Interchange Directory (UNTDID), see UNTDID 5305 Duty or tax or fee category code.

    Typical VAT category codes for businesses in Europe include:

    Name VAT Category Code
    Standard rate S
    Lower rate AA
    Higher rate H
    VAT reverse charge AE
    Free export, no tax G
    Zero rated goods Z
    Services outside scope of tax O
    Margin scheme (second-hand goods) F
    Margin scheme (travel agents) D
  4. Prepare the invoice data as required.

    The fields that hold e-invoice-specific data include Invoice No., Date, Business Entity, Buyer Reference, Account Name, Billing City, Billing Postal Code, Billing Street, Billing Country Code, E-Invoice Format.

    To avoid typos, use the button Set Business Entity, see Setting Business Entity.

    The buyer reference is a unique identification of the invoice recipient. When doing business with German public authorities (B2G scenarios), the buyer reference must hold the Leitweg-ID (a unique identification of the invoice recipient, see ZFB | eRechnung). In B2B scenarios, you need to agree on a buyer reference with your business partner.

    Fields that hold Peppol-specific e-invoice data include, in addition, E-Invoice Recipient Address and E-Invoice Recipient Scheme Id. The e-invoice recipient address and the address scheme identifier are subject to the conditions for Peppol Network participants, as described in Peppol Participant Address and Scheme.

    E-invoice recipients may request additional information, which you will then have to provide in corresponding fields.

  5. Prepare the invoice line item data as required.

    The fields that hold e-invoice-specific data include Sequence, Quantity, Unit, Unit Code, Unit Price, Tax Rate.

    The available values for Unit must be defined as quantity units, which, if prepared accordingly, also set Unit Code.

    The available values for Tax Rate must be defined using tax rules.

Disabling E-Invoice Validation Warnings

Optionally, you can disable e-invoice validation warnings. This way, JustOn Billing & Invoice Management will ignore e-invoice validation warnings and set the e-invoice status to Created, even if the validation has produced warnings.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the row of Default.
  4. Select the Ignore EInvoice Validation Warnings.
  5. Click Save.

Enabling E-Invoice Status Display

Users may require to easily assess the current status of the creation and distribution of an e-invoice in a graphical representation. To this end, JustOn Billing & Invoice Management provides a dedicated status component, which you can, optionally, add to the invoice record page.

To do so:

  1. Open the Invoice record detail page in the Lightning App Builder.

    1. Navigate to an invoice.
    2. Click to open the Setup menu, then select Edit Page.
  2. Modify the page layout.

    Add the Invoice Process States component (under Custom - Managed) to an appropriate region of the record page.

  3. Click Save.

  4. Click Activate.

    This makes the customized record page available to users, enabling them to easily assess the current e-invoice status on the invoice detail view.

For more details about editing Lightning pages, see Create and Configure Lightning Experience Record Pages in the Salesforce Help.

Enabling E-Invoice Statuses

To enable correct e-invoice handling, you may have to add the required Status values manually if you have upgraded JustOn Billing & Invoice Management from an older version. 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 Status field.
  4. In the Values section, click New.

    Add the relevant status values, each in a new line. The required values include

    Not created
    Created
    Created With Warnings
    Validation Error
    In Peppol Queue
    Distribution Error
    Error

  5. Click Save.

    This saves the specified status values as required.

    For details about modifying the values of picklist fields, see Modifying Picklist Values or Add or Edit Picklist Values in the Salesforce Help.