The main part of data routes is data route rules. They are used to control how documents are processed and where they are sent based on the data you provide. These rules allow you to:
- Route Data to Specific Documents: You can set conditions to determine which document template the data should be merged into. For example, if you have multiple templates for different regions or departments, Data Route Rules can automatically select the correct template based on your data.
- Conditional Merging: Data Route Rules can be used to apply conditions that must be met for the merge to proceed. If the conditions aren’t met, the document won’t be generated or sent.
- Data Manipulation: Before merging, you can use these rules to manipulate the data, such as formatting dates or converting text values, to ensure that the final document looks exactly as you want.
- Integration with Other Services: Data Route Rules can be integrated with other services like Zapier or custom APIs, allowing you to route data based on external triggers or workflows.
These rules provide flexibility and automation, making it easier to manage complex document generation processes. Below we will showcase the process of creating a new route rule and options available.
First click on Rules tab your data route main page. Once there click on + Add Rule to open a modal for adding new rule to a data route:
Here, you can select the first document to be merged when the data route merge operation is triggered. The displayed documents include their name and extension:
After selecting the document, you can add customizable rules for your specific needs.
You can add multiple conditions and chain them together to be executed in the order they are added.
The next feature available for your data route documents offers two options for combining files: Include in Combined PDF and Include in Combined Docx. When selected, the uploaded file from the input field will be included in the generated document. This powerful feature is ideal for creating a single combined file. However, you can choose only one of these options at a time.
Repeat this rule is also a powerful feature that Documerge offers. Repeat this rule option allows you to apply a specific rule multiple times within the document generation process. When you select this option, WebMerge will repeat the specified rule for each item in a list or for a certain number of iterations, depending on how the rule is configured. This is particularly useful when you need to generate repetitive sections in a document, such as repeating a template section for each item in an order list or a report.
For example, if you have a rule that inserts details for each product in an order, selecting Repeat this rule will ensure that the rule is applied to each product in the order, generating a separate section in the document for each one.
The instructions above cover the basic usage of date route rules, but there’s much more complexity to explore. Rules allow you to format or modify data using modifiers, perform complex operations and mathematical calculations, add conditionals, and even sort and loop through data. To help you master these advanced features, we’ve created separate articles that provide detailed explanations and examples: