Sorting documents – overview An input job contains several documents (invoices, delivery notes, etc.). If no sorting is applied, the documents are processed in the order they are received. In some situations you need to sort the documents. For example, to be able to use a Document trigger, you may have to sort the input documents before they are processed. Sort keys You use sort keys to specify how to sort documents. See Sort keys. Sorting before or after Process You can sort documents either before or after they are handled by the Processes. When to sort before Process You should always try to sort documents before Process, due to performance reasons. See Sorting before Process. When to sort after Process You must sort after Process if the sort key variables are defined in a Process. See Sorting after Process. Sorting Documents You can sort the output after it is grouped as Documents (using a Document trigger). This also applies to documents retrieved from a Post-processor repository. See Sorting Documents.