The article below pertains to Procure to Pay (P2P) for the following applications and/or module(s):
AP Automation
When an e-mail comes in with multiple files, it is determined whether a file is an attachment or should be processed as an invoice. This works as follows:
A number of file formats are immediately characterized as attachments that are ignored (files with for example .doc, .png, .xls). The file formats to be ignored can be adjusted by an ISP-Consultant.
- Check if the attachments form a single pair (PDF + XML). If so, the PDF is marked as definite invoice and we stop the process. If not, continue to step 2.
- Check if, among the attachments, there are PDFs that are marked as a definite invoice. A PDF is marked as a definite invoice if one of the following applies:
- A number of the PDF filename corresponds with a number in the e-mail subject (the subject should have at least 5 subsequent numbers equal to the filename).
- A word in the invoice filename corresponds with a term in the 'invoice inclusion words' (e.g. 'invoice'), which is maintained by an administrator.
- Continue with the next step of the process:
- If no definite invoices are found in step 2, continue with step 4 of the process.
- If exactly one definite invoice is found in step 2, an attempt is made to link an XML to it. Only if there is exactly one other XML, the PDF and XML will be processed further as a pair. Otherwise, we refuse to guess and pass back only the invoice and we stop the process.
- If step 2 yields more than one definite invoice, we take these invoices and check if we can mark some of them as 'extra' (definitely not an invoice). We do this by checking if a word in the invoice filename corresponds with a term in the 'invoice exclusion words' (e.g. 'attachment'), which is maintained by an administrator. If this process limits the number of definite invoices down to exactly one, we return this PDF as the invoice and try to link an XML to it. Only if there is exactly one other XML, we process it as a pair. Otherwise, we refuse to guess, and pass back only the invoice. We stop the process. If this step yields not one definite invoice, we continue to step 4.
- The attachments are grouped based on file names and it is monitored whether the type of file occurs in the group (see examples at the bottom of this page). It is checked per group whether a PDF and/or XML file is present. Other file formats are characterized as 'extra'. If no PDF file is included, the XML file is also marked as 'extra'. If a PDF and XML are present, they are seen as a pair and processed further together. If only a PDF is available, this is seen as an invoice.
- The invoices from step 4 are now processed. PDF / XML pairs are sent to the 'mapping framework' and then to the BRE (Business Rules Engine). The PDF invoices without XML proceed to SmartScan. The 'extras' are characterized in ISP-Classification as 'errored'.
Examples:
An e-mail contains the following attachments:
foo.pdf
foo.xml
foo.png
bar.xml
bar.jpg
baz.pdf
baz.xls
qux.pdf
qux.doc
Assuming the .doc and .jpg are ignored, the groups contain the following file formats:
foo |
bar |
baz |
qux |
---|---|---|---|
XML | |||
XML | XLS | ||
PNG |
- foo.pdf and foo.xml continue as a pair. foo.png is characterized as 'extra'
- bar.xml has no associated PDF, and is therefore marked as 'extra'
- baz.pdf is processed as an invoice without corresponding XML. baz.xls is characterized as 'extra'
- qux.pdf is processed as an invoice without associated XML.