action.skip

Enabling Expense Email Service

← Payments in Billing & Invoice Management

JustOn Billing & Invoice Management can create expenses from inbound electronic invoices. It automatically processes incoming e-invoice files received by email.

To this end, the software provides the Apex class EInvoiceEmailService. This class is to be called using a dedicated Salesforce email services.

Expense email service concepts and limitations

JustOn Billing & Invoice Management evaluates the received e-invoice XML file. On successful validation, the software creates the according expense and expense item records.

The following limitations apply:

  • The email service will only process emails with one (e-invoice) XML attachment. The XML files must have the file extension .xml and the MIME type application/xml or text/xml.
  • If no or more than one XML files are attached to the email, no expense will be created.
  • Any other attachments, like PDF files, will be attached to the produced expense record. If there is no expense created, the attachments will not be saved.
  • If a submitted e-invoice fails the validation, JustOn Billing & Invoice Management creates a fallback expense of the type Undefined and the e-invoice status Validation Error. Nevertheless, the (invalid) e-invoice XML file and the additional attachments will be saved with the expense.

To configure the expense email service:

  1. Click to enter Setup, then navigate to Custom Code > Email Services.
  2. Click New Email Service.
  3. Specify the details as required.

    The minimum required fields include:

    • Email Service Name
    • Apex Class: EInvoiceEmailService
    • Accept Attachments: All
    • Active: true

    expense_email_service

  4. Click Save and New Email Address.

  5. In the Email Address field, specify the local part of the email service address.

    Salesforce will generate the unique domain part for the email service address. For details, see Define Email Service Addresses.

  6. Click Save.

    This enables the email service to receive e-invoices and transform them into expenses. Consequently, JustOn Billing & Invoice Management will evaluate emailed e-invoice XML files and, on successful validation, create the according expenses and expense items.

Info

JustOn recommends not to disclose the generated email service address to prevent misuse. Instead, use different email address for external access and set up a (filtered) redirection – either automatically or manually by users.