This article explains the key concepts you need to understand to work effectively with Ventoo Document Merger.
The three-level hierarchy
Ventoo Document Merger uses a three-level hierarchy to determine which documents to include when printing or emailing a document:
Level 1: Global rules
Global rules define the default behavior for each document type (for example, Sales Invoice or Purchase Order). They apply to all documents of that type unless a partner rule overrides them.
For example, you might create a global rule that includes all PDF attachments for every sales invoice.
Level 2: Partner rules
Partner rules override global rules for a specific customer or vendor. When partner rules exist for a given partner and document type, the system uses the partner rules instead of the global rules.
For example, a specific customer might require shipment notes to be included with their invoices, while other customers do not.
Important When partner rules exist, they completely replace the global rules for that partner and document type. The system does not merge global and partner rules together.
Level 3: Document list
The document list is the final composition for an individual document. It is built automatically based on the applicable rules (global or partner) when you first open a document page. You can review, reorder, and adjust the list before sending.
Changes you make to the document list are preserved. If you manually adjust the list, the system marks it as "Manually Adjusted" and will not overwrite your changes during auto-rebuild.
Source types
Each rule specifies a source type that determines where to look for documents to include. Ventoo Document Merger supports four source types:
|
Source type |
Description |
Example |
|---|---|---|
|
Document Attachment |
Files attached directly to the Business Central document via the standard attachment feature. |
A signed contract PDF attached to a sales order. |
|
Incoming Document |
Files linked to the document through the Business Central Incoming Documents feature. |
A scanned purchase invoice linked as an incoming document. |
|
BC Report |
A Business Central report rendered as PDF, either directly or through a report reference linking to related records. |
A shipment note report included with an invoice. |
|
Static Document |
A pre-uploaded document stored in Ventoo Document Merger with optional date-based validity. |
Terms and conditions, marketing materials. |
Pattern matching
Rules for Document Attachment and Incoming Document source types can use pattern matching to filter which files to include:
-
File Name Pattern - Use
*(any characters) and?(single character) wildcards to match file names. For example,Contract*matches any file starting with "Contract". -
Exclude File Name Pattern - Comma-separated patterns to exclude specific files. For example,
Draft*,Temp*excludes files starting with "Draft" or "Temp". -
File Type Filter - Filter by file extension. For example,
pdfincludes only PDF files.
Sequence numbering
Each document in the merge composition has a sequence number that determines its position in the final merged PDF:
-
Sequence 1 is always the main report (for example, the Sales Invoice) and cannot be changed or deleted.
-
Sequence 2 and higher are additional documents added by rules or manually.
-
You can reorder documents using the Move Up and Move Down actions.
Attach separately
By default, all included documents are merged into a single PDF. However, you can mark individual documents with the Attach Separately flag. When sending by email, these documents are added as separate email attachments instead of being merged into the main PDF.
This is useful when recipients need to process certain documents independently, such as a certificate or a signed contract.