Skip to main content
Customize parsed data structure

Several ways to get transform the extract data structure how you need it

Updated over a year ago

By default, Parseur will extract the data from each document using a clean and easy-to-reuse data structure. But sometimes, you need to go one step further and customize your data structure just a little bit. Here are several ways to do it.

Remember that if you make any of the changes below, you will need to reprocess your documents for those changes to be applied to the parsed data.

1. Change field names

Renaming a field can be a useful way to match the data structure you want. There are two ways that you can rename a field.

Method 1: in the Fields section of the mailbox

While in your mailbox, click on the Fields section to list all of your fields. You can then click on the Edit button next to a field to rename it.

Rename a field in the Fields section

Method 2: in the template editor

You can also rename a field directly in the template editor by clicking on its name or the edit button.

Rename a field in the template editor

2. Use field formats

Field format lets you ensure that you are getting a consistent format across your documents, such as dates, times, and numbers.

Additionally, you can use it to parse tables, people's names, and addresses from your documents. To customize the output format, edit a given field as described in the previous chapter. You can then select the value of the output format from the available list.

3. Use Metadata fields for further data filtering

Metadata fields contain important information about the document that isn't included in the body. This type of information can include the name of the template used to parse the document, the email sender, or a link to download the original document.

List of all metadata fields

Metadata fields allow you to filter extracted data based on the template that was used, the sender, or the date when the document was received after you downloaded it as Excel or CSV.

Adding Metadata fields in the Fields section

The easiest way to add metadata fields is by going into the Fields section of your mailbox and enabling them from the Metadata Fields subsection on the right-hand side.

Adding Metadata Fields in the Template Editor

To add metadata fields in the Template Editor, select the Metadata tab. Here you can add, edit, and delete any metadata fields you want in the list.

Read more about using Metadata fields.

4. Use Static fields to add data not found in the document

If you need to add some custom data that you cannot find in the document as such but is always the same for a given template (for example, an ID or reference needed by your API), you can use Static fields to add any custom value to a template.

To add a Static field, click on the Static tab in the template editor, select the field you want to add a value to (or create a new one), and enter the value.

Learn more about using Static fields.

5. Enable the dot notation syntax with "Expand Field Names"

By default, all fields are added at the top level of your parsed result. But what if the API you are sending the data to expects the data to have a "deeper" structure? For example, all data related to a customer needs to be nested in the customer key and all data related to invoice details must be nested in the invoice key.

Here, Parseur’s “Expand Field Names” option can provide great results for some use cases. This option, once enabled, allows you to transform your data into a nested structure based on the name of the field.

With the “Expand Field Names” option enabled, Parseur will transform your field data using dot notation. For example, a field named customer.name with value "John" and one named invoice.number with the value "ABC123" will be expanded into the following JSON parsed data:

{ "customer": { "name": "John" }, "invoice": { "number": "ABC123" } }

Enabling this option is easy. Simply head over to the Settings section of your mailbox > processing tab and check the box "Expand field names in JSON Result" under "Advanced Settings".

The expand field name options is under Mailbox Settings > Processing > Advanced settings

6. Use the Post Processing module

Parseur's advanced Post Processing module lets you write small bits of Python code to reformat your data exactly as you need it.

It's the best way to integrate Parseur into your data pipeline if you have complex flows that include business logic steps based on the extracted data.

7. Rework your data in external tools

If none of the options above fit your use case, congratulations! You likely have an advanced automation use case and we'd love to hear from you.

Parseur was designed to easily integrate with hundreds of tools and third-party connectors that will accept your parsing data and let you wrangle it in any way you need. Most of our users like Zapier and Make. Parseur can also easily integrate with Power Automate, Integrately, Pabbly Connect, and many more.

If you have any ideas on features to improve Parseur's data structure customization, don't hesitate to leave them on our feedback board!

Did this answer your question?