Extract eInvoice Data

Extract eInvoice Data Icon

Extract eInvoice Data
This workflow task uploads documents to the eInvoice web service on Therefore™ Online, analyzes the eInvoice data, and downloads and updates document index data.

This task's purpose is to allow consistent processing of machine readable invoices such as ZUGFeRD, Facture X, and X-Rechnung. It works via a REST call to the eInvoice web service.

The task is visible for workflows that are assigned to a regular category, not a case. Furthermore, the appropriate eInvoice connector license point needs be assigned to the Therefore™ Online tenant.

General Settings
More information on common workflow task settings can be found here:

Workflow Tasks

Edit
Opens a dialog that lets the user configure the eInvoice extraction settings.

The dialog includes the Settings tab and the Indexing profile tab.

Settings tab

Generate PDF
Set if a human-readable PDF containing the eInvoice data should be automatically generated.

Value Explanation
Never There will be no automatic generation of PDFs based on the eInvoice data.
If Source is not PDF

For eInvoice formats such as ZUGFeRD that contain a PDF, no PDF will be automatically generated. If the source contains no PDF, a PDF will be automatically generated.

This option is the default option.

Always A PDF based on the eInvoice data will automatically generated whether the source contains a PDF or not.

PDF Content
Set the level of detail the automatically generated PDF should include.

Value Explanation
Standard The automatically generated PDF will contain only basic information. If this option is set, the generated PDF has the formatting of a standard invoice.
Detailed The automatically generated PDF will contain detailed information. If this option is set, the generated PDF has the formatting of a list.

Referenced Documents
Set if eInvoice attachments should be added as separate files to the Therefore™ document.

PDF First
Set if the automatically generated PDF should be the first file in a document, or appended to the document.

By default, the PDF is added as the first file of the document.

Indexing Profile tab

The indexing profile setup maps eInvoice information to Therefore™ index data fields so that the index data can be automatically updated in the last step of the eInvoice extraction process.

Use the Test button to start a test call to the web service that allows the assignment fields to be populated.

Script
Add a multi-line custom script to assign values from eInvoices to specific index data fields. The accepted languages are Javascript and VB Script.

Examples scripts for indexing profiles can be found here:

Sample Scripts for Indexing Profiles

Assignment
The fields in the assignment column include the information on what eInvoice value is mapped to which category index data field. If a script is used no manual assignment is necessary.

Click the browse button to see and select potential assignments. The drop-down button can be used to select macros.

Test
Runs a test API call that checks whether a communication can be made to the eInvoice web service and if a response can be achieved. Opens a dialog to demonstrate the outcome of the test.

Disable automatic evaluation
Disable automatic evaluation of scripts and assignments.

More information about indexing profiles can be found here:

Indexing Profiles

Responses - HTTP Status Codes

Status codes, such as error codes, are important for configuring error handling and subsequent workflow tasks. Important status codes for the Extract eInvoice Data workflow task can be found in the table below.

Code Meaning Conditions
200 OK Document processed successfully E-invoice found, parsed, and stored. The response body contains extracted e-invoice data in JSON format. Content-Type: application/json
204 No Content No e-invoice found in document Document exists, but contains no PDF or XML files with recognizable e-invoice data.
400 Bad Request Invalid request parameters or headers Thrown when processing options are invalid (e.g., bad DocNo), or when required headers are missing or malformed.
404 Not Found Therefore™ document not found No document with the specified ID exists in the Therefore™ system.
409 Conflict Document is locked by another user Document is currently checked out by another user, and cannot be processed.
422 Unprocessable Entity Document processing error E-invoice found, but processing failed due to unsupported version or profile, invalid format, or preview rendering failure.
500 Internal Server Error Internal server error or Therefore™ API error An unexpected error occurred within the application, or there was a downstream failure from the Therefore™ API.