Defining envelope keys By default, a mailing machine handles each document in an output job as the amount of sheets to include in an envelope. For example, if an output job contains invoices only, all sheets in an invoice are included in the same envelope. If the output job contains several types of documents, and you want to include all documents to a recipient in the same envelope, you must define how to bundle documents and prepare them for enveloping. Envelope keys Bundling is applied using envelope keys, for example “customer number” if you want to include all documents to each customer in the same envelope. When you define an envelope key, you define which key to use, the type of key (numeric or string), and the sort order (ascending or descending). How to define the envelope keys depends on the source of the documents, i.e. the type of document repository from which the documents are retrieved. See the table below. Document repository Description FastObjects database If the documents are retrieved from a FastObjects database, you must use metadata as envelope keys. You define the envelope keys as variables ($<metadata>). See Envelope keys for documents in FastObjects database. Relational database If the documents are retrieved from a relational database (Document Broker Plus), you must use metadata as envelope keys. You define the envelope keys as metadata names. See Envelope keys for documents in relational database (Document Broker Plus). No document repository If the documents are defined by a document trigger, you can use any variable defined in the Project, for example the document trigger variable, as envelope key. See Envelope keys when no document repository is used.