You can use regular expressions to detect information on invoices that can be used to automatically code invoices. You set up a string matching rule containing regex syntax to determine a pattern in the extracted information.
Using that rule, Perk scans every uploaded PDF invoice for a string that matches the syntax defined in the regex pattern. It then compares this string with the values of the matched object attribute across all object records. If a match is found, the corresponding object is retrieved and populated in the defined target field.
Using regex rules, you can:
- Match a submitter with an invoice
- Assign a cost object to all invoice line items
- Assign a category to all invoice line items
When you set up a string-matching (regex) rule, you define:
| Field | Description |
|---|---|
| Regex syntax |
Regex expressions is a special type of language that allows us to recognize certain patterns.
|
| Matched object attribute | Specifies the data field Perk checks against the string extracted by the regex from the invoice. This can be specific fields from the user profile, cost object, or category. |
| Target invoice field placement | Specifies where the target field is located. This can be in the invoice header or the invoice line item. |
| Target invoice field | Indicates the invoice field to which the matched value is assigned. It can be submitter, cost object or category. |
Note: If you are unsure what regular expression would work for your specific case, you can use online tools such as regex101 to create your regular expression or reach out to Perk.
When all mandatory fields have been successfully configured, you can activate your newly created configuration.