Document subtypes

There is another component to document types, the document subtype.

The Extraction service uses document types to describe the type of incoming documents that you want to process and the information that you want to extract from the documents. Document types can provide this vital function. However, there is another preferred component for extracting documents, the document subtype.

A document subtype is a more specific version of a document type. Subtypes include an additional description that provides more information about its purpose. For example, the "British purchase order invoice" subtype tells you that this document subtype is for processing PO invoices. Document subtypes are available for country-specific documents and XML documents.

Three subtypes are available for each document type, including the XML document type:

  • Purchase order
  • General expense
  • Credit note

Each subtype is configured with the appropriate fields that you expect. For example, the purchase order subtype contains purchase order fields, whereas the general expense subtype does not have purchase order number fields.

Document subtypes help administrators simplify document-type settings and apply different validation rules for each subtype. For Office users, it means Tungsten AP Essentials can automatically detect the document type when uploading documents. AP Essentials Office users can also change the document subtype during verification.

Automatic document subtype classification

When a new document enters the system, AP Essentials can automatically determine which document subtype to use. To take advantage of automatic document type classification, you must:

  • Enable all three subtypes (Purchase order invoice, Expense invoice, Credit note) for each country you want to process. For example, if you process Swedish documents, enable Swedish purchase order invoices, Swedish expense invoices, and Swedish credit notes. You can also enable XML subtypes if you process XML documents. Additionally, you can enable the generic XML document type, but it is not used for automatic classification.

  • Specify the Country setting of the customer account and any buyers that exist.

    If you process documents from multiple countries, use buyer organizations to differentiate between each country. In other words, create a buyer for each country and specify the Country setting of each buyer. Also make sure you have enabled the corresponding document subtypes for each country you require.

  • Select Only use country-specific subtypes and the XML document type in the Extraction service settings.

    This setting validates your setup to make sure you are not combining generic document types with document subtypes, with one exception: you are also optionally allowed to use the generic XML document type. The validation also warns you if any buyer organizations do not have a country specified.

  • If you use Email input to receive documents, the Document type setting must be set to Use email subject, and the document type cannot be specified in the email subject.

  • If you upload documents via AP Essentials Connect, place documents in the root upload folder of the buyer or customer, rather than a document type subfolder.

How it works in AP Essentials Office

When you upload documents to AP Essentials Office, select Automatic classification in the Document type setting. During extraction, AP Essentials uses several methods to determine the correct document type.

  • The country of the customer account or buyer determine the locale of the document type.

  • If a document is image-based, a country-specific subtype is used. Alternatively, if a document is XML based, an XML subtype is used.

  • If a credit field is found, or if the gross amount is negative, the credit note document type is chosen.

  • If an order number field is found, the purchase order invoice document type is chosen.

  • If neither a credit field nor a negative gross amount nor an order number field is found, the expense document type is chosen.

If the wrong document type or buyer is determined, AP Essentials Office users can correct this during verification without having to upload the document again. However, you cannot change a country-specific subtype to an XML subtype and vice versa. If you change the subtype or buyer during verification, the fields that are displayed change according to your selection. If any fields use default values (specified in the Use default value setting), the default value is also updated according to the default value of the current subtype.

Note however, that if you use the generic XML document type, and a document is interpreted using the XML document type, you cannot change the document type during verification because the XML document type is not a subtype.

Require PO numbers to improve classification

Sometimes you receive an invoice whose PO number is not found or does not match the required format. As a result, AP Essentials can classify the document incorrectly as a general expense, which requires manual correction later. To avoid this issue and improve automatic classification, you can enable the Invoices require PO setting, so invoices from specific suppliers require a PO number. Alternatively, you can specify the corresponding XML element in the supplier master data.

How it works

Assume you use automatic document type classification and enable Invoices require PO for a supplier. Whenever you receive a document from this supplier, AP Essentials checks if the document is a credit note by looking for credit fields and negative amounts. If the document does not appear to be a credit note, it is automatically classified as a purchase order invoice, even if no PO number is found. If no purchase order number is found, the invoice order number field is marked with a validation error. In contrast, if you do not enable Invoices require PO and no PO number is found, the document is classified as an expense invoice.