From this article you will learn:
- What is a Rossum PO Matching with Line Items extension
- How to set up PO Matching with Line Items extension
- What are the available configuration parameters
- How to test the extension
- How to tweak the extension
- How to add a data matching button
What is a Rossum PO Matching with Line Items extension
Accounts Payable frequently requires matching incoming invoices with existing purchase orders. We know this in Rossum, so we created an out-of-the-box extension that does just that. It checks if there is a purchase order with a corresponding ID in your database. But not only that! It also checks whether the line items on the invoice match the line items on the PO.
How to set up PO Matching with Line Items extension
Setting it up takes a few simple steps.
Below you will find a tutorial video, so you can watch it or continue reading.
Step 1: Upload your PO data
You can upload your purchase order data into Rossum via the Data matching app UI, where you log in with your Rossum credentials. Once you’ve logged in, proceed as follows:
- Download sample PO data.
- Choose how should be your PO data called (we will use POs in this tutorial).
- Upload the sample PO data you downloaded.
- Type in “order_id” as a unique identifier of the uploaded records.
- Confirm the upload by hitting the “Upload” button.

Don’t do any further setup in the Data Matching app, as the PO matching extension will handle this.
Step 2: Activate the PO matching with Line Items
To enable PO matching extension, go to the Rossum application and:
- Click on the Extensions tab at the top of the app.
- Click on the Rossum store option to display all the available extensions.
- Select the “PO matching with Line Items” extension tile.
- Click “Try extension.”

Step 3: Specify to which queue(s) you want to add this extension
Once in the “Rossum Store Extension Settings,” scroll down to “Queues” and select the queue in which you want to use the PO matching with Line Items extension. Please remember to save your changes once you’ve chosen the desired queues.

Step 4: Customize the matching of your PO data to your schema
The matching is set up to work with the sample data we provided you. If you want to try out the PO matching with that sample data, you don’t need to do any customization. However, you will likely need to customize the mapping and matching strategies if you upload your own data.
To do that, go to the “Rossum Store extension settings” (if you close it, you can find it under Extensions → My Extensions → PO Matching with Line Items) and scroll down to “Configuration,” which you will need to edit.
What are the available configuration parameters
This table should help you understand what you are setting up here:
Parameter name | Description | Value |
Dataset | Specify the name of the dataset holding the PO data you uploaded to the Data Matching app. | E.g. “POs” |
Master items ID | Specify the ID of line items in PO data. That is how the extension knows the following data are line items of a specific PO. | E.g. “line_items” |
Schema items ID | Specify the ID of line items in Rossum queue schema. | Should be “line_item” unless you have changed it. |
Data matching field | Specify the ID of a field in your schema used to match a PO number on an invoice to a PO number in your database. | Should be “order_id” unless you have changed it. |
Matching strategies | Specify fields you want to match, what will be the primary key, and how precise match you require to call it a match. You can have more matching strategies by defining the next field to match by (an alternative “primary key”). The first line is always a primary key. | ID can be any field ID from the line items you want to match. The method can be: Exact (usually for IDs and quantities) Fuzzy (for allowing little differences in text fields). We recommend starting with 0.3 (30 % match) Tolerance (for allowing little differences in fields containing numbers). You can use, for instance, 0.5 (as $0.5 or 0.5 unit difference). Threshold: Max limit specifies a maximum allowed value for that field. You don’t have to use it. |
Data matching button | Specify the field ID in your schema of the Data Matching button. This button is optional. See below. | This should be “master_data_match_po” if you use our button. |
Mapping schema to master data | On the left are your schema IDs, and on the right are your PO data IDs. You need to edit this if you use different IDs in your PO data or your schema than in our example. | Any line items field IDs you want to map and match. |
How to test the extension
To test the extension, we recommend first using our sample invoices to understand the expected behavior, then customizing to your needs and testing on your data.
Download these three invoices, which are in sync with the sample PO data you already uploaded. Upload those invoices into your queue and see them get matched.
The first one is missing a PO number (1) and has an intentional mistake. The quantity on the first line item should be only 50, according to the PO. Still, it is 500 on the invoice, which results in a different total on that line and a different overall total. You can repair the PO data (open the JSON file, edit, save and upload again to the Data Matching app as you did at the beginning of this tutorial). Or you can repair the data extracted from the invoice in Rossum validation UI. The second will be more difficult. And in reality, most likely an incorrect approach. But this way, you may experience how the matching is immediately revalidated. To revalidate, hit refresh.
The other two also need PO numbers (2 and 3). Otherwise, they should be correct; therefore, you should see this after supplying the PO number.
How to tweak the function
Our functions in Rossum Store are intended to help you solve your business challenges and inspire you to create your own functions! Therefore we allow you to view their code and copy it to your function.
Apart from copying the code you will need to setup also:
- “Triggered events” to “Document content” – “Initialize” and “User update”,
- Activate “Schemas” in “Advanced settings”,
- Choose yourself (an admin account) in “Access to Rossum’s API from extension”.
How to add a data matching button
We didn’t set up this extension to revalidate every time a user edits any line items, as this could slow down the UI. Therefore if someone edits a line item, it is necessary to hit the refresh button in the browser so the extension will revalidate the document. If you find it non-intuitive and prefer to have a dedicated button that would revalidate the document after you press it, insert the following code in your schema below the Line Item field.
{
"category": "datapoint",
"id": "master_data_match_po",
"label": "Match data against PO",
"type": "button"
}
This is how it will look in your validation UI.
