Automating Line Items
When trying to automate the processing of line items, Rossum offers configurations that can get you to a good automation rate. This article will teach you how to set up Rossum to your needs and get you to a reasonable line items automation level.
Confidence score for line items
In previous articles, we have mentioned Confident Automation. Part of this Confident Automation is confidence scores, which are returned for header field values and line items captured on the document.
Automate line items at all times
If you would like to automate line items at all times, just set the confidence score on all the columns in the line items to 0 in the schema editor. As mentioned above, we are not currently returning confidence scores, but setting the zero confidence score threshold lets Rossum be more permissive when automating line items. In this article, you will find out what happens if you set a non-zero threshold further.
"score_threshold": 0
This approach will stop only values which:
- Cannot be parsed due to a number or date formatting error.
- Were evaluated with negative check.
The validation sources of the fields will contain a “score” value in case the value was empty or “checks” if any of the built-in checks were satisfied.
Find out how to debug the validation sources of specific fields over the API.
Automate only documents which have at least one line item
It is a common use case that you want to automate only documents that contain at least one line item. You can achieve this by setting the following attribute on a multivalue object representing the line items:
"min_occurrences": 1
Automate numeric columns that are either empty or pass a built-in check
If you want to be more strict about the automated columns, you could set a non-zero threshold for some of the columns.
An example of this would be a case where the Total amount column is captured. Still, in one line item, the total amount is incorrectly computed. Thus, the column cannot be validated against the Total amount in the header fields, and even the line item validation with quantity and unit price does not equal, as described in the built-in checks that Rossum performs.
When analyzing the validation sources as described in this article, you would see that the “Total amount” field in the first line item does not contain a validation source “checks” or “score”.
See an example of such a document here.
If you want to stop such documents from automating, set any non-zero score threshold, such as
“score_threshold: 0.9” to the fields. It will stop automating columns that have a value but were not validated by any of the built-in checks.
Automate only line items that have non-null description
Another common use case is that you would like to automate only line items where all line items have a non-null value of a specific field. For example, item descriptions can be later used for matching with purchase order line items. Therefore you always need to have some value.
For this purpose, we have created a custom check (find it in the list of built-in checks) that can be enabled on your account. Please contact us at [email protected]. We will ask you additional questions or let your direct Rossum contact know.
Moreover, you can make such a field required so that the users cannot confirm the document with line items that are missing some required fields.
Automate line items with description where at least one columns is validated against a header field
The most advanced setup you can have enabled right now is:
- You want the line items description to be non-null
- You need at least one of the monetary columns to equal the total amount on the document
- If either of the conditions above is not fulfilled, the document will not be automated.
Thanks to this approach, you will avoid automating line items where no monetary columns were captured because you always need one. Or when none of the monetary columns seem to be captured correctly.
The monetary rules where at least one has to apply is:
- Sum of “Total amount” column has to equal “Total amount” header field (i.e. fields filled with table_column_amount_total and amount_total rir_field_names)
- Sum of “Total amount base” column has to equals “Total amount base” header field (i.e. fields filled with table_column_amount_total_base and amount_total_base rir_field_names)
- Sum of the “Unit price column” has to equal the “Total amount” header field (i.e. fields filled with table_column_amount and amount_total rir_field_names), while the expected quantity is 1 for all the line items.
- Sum of the “Unit price without tax” has to equal the “Total amount base” header field (i.e. fields filled with table_column_amount_base and amount_total_base rir_field_names), while the expected quantity is 1 for all the line items
If you would like this configuration to be enabled, please contact us at [email protected] or contact your direct point of contact at Rossum.
Implementing custom configurations
Suppose the configurations mentioned above cannot be applied in your setup. In that case, you can always implement your own webhook or a custom function where you can access the captured values right after Rossum is done with the initial extraction.
Based on your custom rules you could fill in the validation sources of the fields and thus enforce the automation of the document before it is shown for review to the users on the document dashboard.
Updated almost 2 years ago