In Accounts Payable it is often required to match incoming invoices with existing purchase orders. We know that in Rossum and therefore we have built an out-of-the-box extension available in the Rossum Store which does just that. Not only that it checks whether there is a purchase order with a corresponding ID in your database, it also checks whether the line items on the invoice match the line items on the PO.
Follow these 3 simple steps to set it up:
- Upload your PO data
- Activate PO matching extension
- Customize the matching of your PO data to your schema
Watch the video guide below or read on.
Step 1: Upload your PO data
You can upload your purchase order data into Rossum over the Data matching app UI where you login using the same credentials you use for Rossum.
To try out you, log in to the Data Matching, and:
- Download sample PO data
- Choose how should be your PO data called (such as PO_data or POs – 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, this will be handled by the PO matching extension.

Step 2: Activate the PO matching extension
In order to activate PO Matching with Line Items extension, go to Rossum Store:
- In Rossum click Extensions in the main menu.
- If you are not taken automatically to the Rossum Store, click Rossum Store in the left column.
- In the Rossum Store you will either already see “PO Matching with Line Items” or click “See all”.
- Click the “PO Matching with Line Items” extension tile.
- Click “Try extension”.
- On the “Rossum Store extension settings” screen select the queue in which you process the documents where PO matching is needed.
- Click “Save changes”.
Step 3: Customize the matching of your PO data to your schema
The matching is set up so it would work with the sample data we provided you with. If you want to simply try out the PO matching with the sample data, you don’t need to do any customization and can proceed to the next step.
If you uploaded your own data you will likely need to customize the mapping and matching strategies.
In order to do that go to the “Rossum Store extension settings” (if you close it you can find it under Setting → Extensions → My Extensions → PO Matching with Line Items) and scroll down to “Configuration” which you will need to edit.
This table should help you understand what you are setting up here:
Parameter name | Description | Value |
Dataset | Specify the name of name of the dataset holding your PO data which you uploaded to the Data Matching app. | E.g. “POs” |
Master items ID | Specify the ID of line items in your PO data. That is how the extension should know that following data are line items of a specific PO. | E.g. “line_items” |
Schema items ID | Specify the ID of line items in your Rossum queue schema. | This should be “line_item” unless you have changed it. |
Data matching field | Specify the ID of a field in your schema which will be used for matching a PO number on an invoice to a PO number in your database. | This should be “order_id” unless you have changed it. |
Matching strategies | Specify which fields you want to match, what will be the primary key and how precise match do you require to call it a match. You can have more matching strategies by defining next field to match by (an alternative “primary key”). The first line is always a primary key. A match can be exact, fuzzy (for text fields) or tolerance (for numbers). You may play around | ID can be any field ID from your line items you want to match. Method can be: – Exact (usually for IDs and quantities) – Fuzzy (for allowing little differences in text fields) – Tolerance (for allowing little differences in fields containing numbers) Threshold: – For fuzzy is recommended to start with 0.3 (30 % match) – For tolerance use for instance 0.5 (as $0.5 or 0.5 unit difference) – Max limit specifies maximum allowed value for that field. You don’t have to use it. |
Data matching button | Specify the field ID in your schema of 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. If you use different IDs in your PO data or in your schema than in our example, you need to edit this. | Any line items field IDs you want to map and match. |
Try it out!
In order to try out the extension, we recommend first to use our sample invoices so you would know the expected behavior and later customize to your needs and try on your own data.
Download these 3 invoices which are in sync with our sample PO data you already uploaded. Upload those invoices into your queue and see it 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 but is 500 on the invoice which also results in a different total on that line and because of that also in a different overall total. Either 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 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. In order to revalidate, hit refresh.
The other two are also missing PO numbers (2 and 3) but otherwise should be correct and therefore you should see this after supplying the PO number:
Cool, right?
Adding a data matching button
We didn’t set up this extension to revalidate every time a user edits any of the line items as this could potentially slow down the UI. Therefore if someone edits a line item, it is necessary to hit the refresh button in the browser so the document would be revalidated. If you find that non-intuitive and would like to have a dedicated button which would revalidate the document after being pressed, insert the following code in your schema.
{
"category": "datapoint",
"id": "master_data_match_po",
"label": "Match data against PO",
"type": "button"
}
Insert it below the Line Item field.
This is how it will look in your validation UI.
Tweaking the function
Our functions in Rossum Store are intended not just to help you solve your business challenges but also to inspire you to create your own functions! That’s why we allow you to view their code and copy it to your custom 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”.