This article will help you:
- learn about typical use cases for document automation
- understand which document generation method is better suited for your use case
- add placeholders to your templates
Use custom formatting to create bespoke Microsoft Word documents for your users reflecting your corporate identity.
Through your module, you can create a document and make it available to your users as an email attachment or a downloadable link. This is especially useful for generating contracts such as NDAs. Learn how to prepare your document for automation in BRYTER below.
Example use cases
Style contracts to match your corporate identity
If you use your module to generate a contract, it is useful to format the contract in your house style. Using the Create document action, you can create contracts that are based on multiple building blocks. Depending on the responses given by the user, different building blocks will be placed in your contract. You can also fill the contract with the answers the user has given. Your module could be a form where the user enters personal data and this data will be then placed in the contract.
Procedure
Add custom styling to your document through the use of Create document action combined with custom templates. Note that only DOCX files are accepted at this time.
Add a Create document action to your module
Follow the steps below to customize your document via an uploaded DOCX template:
- Click the plus icon “ + ” on a node.
- Select New Action.
- In the attribute editor which opens, select Create document.
- Double-click New document to name your node. This will serve as the file name of the document your users receive unless you choose to provide an optional file name via the DOCUMENT FILE NAME field.
- Select a Format for your document (DOCX or PDF).
- Select a Template from the drop-down menu or upload your own.
- The template will be scanned for placeholders and a new section PLACEHOLDER will appear.
- Automatically map any matching values and placeholders by selecting the Map Values to Placeholders option if shown.
- For any remaining placeholders not matched, assign the appropriate value to each placeholder by selecting the corresponding Input or Action node in the drop-down menu.
Create a DOCX template
Now that you have added a Create document action to your module, it's time to create a custom template to reflect your business needs.
Open a Microsoft Word document to create a custom template, as shown below.
Add text and formatting to your template. Create placeholders by using two sets of curly brackets “ {{ }} ” in combination with text. For instance, if you wanted to create a placeholder for a value "Disclosing Party", it could look something like this: {{disEntity}}.
Save your template as a DOCX file and upload it via the Template drop-down menu in the attribute editor to your Create document action. The template is then scanned and all placeholders are identified by BRYTER.
If there are any placeholders that are exact matches for values in your module (e.g. there is a placeholder {{Landlord Name}} and an input node called 'Landlord Name'), BRYTER will tell you there are exact matches and offer an option to 'Map values to placeholders' for these.
Selecting this will then populate the selection beneath each relevant placeholder with the matching value, allowing you to amend the assigned value later if you need to.
For any placeholders in your document template that don't exactly match a value, you can assign corresponding values to your placeholders through referencing. Below each placeholder will be a drop-down menu. Use the menu to reference the node carrying the relevant information, likely a Text block action or an Input node. In this example, we would choose the node holding the user input for the value "Disclosing Party".
From the BRYTER editor, this is what the referencing in the Create document action looks like:
As you can see, the party details node is a Multi-input response node. The first response type within this node is a text response: "Legal entity name". This is the value referenced by the Entity node.
In the End-user Interface, the user will be able to provide a response that is stored as the Legal entity name in the party details node and then referenced by the Entity node, as shown below. In turn, you can refer to this value in your Word Document by referencing the Entity node using two sets of curly brackets: {{disEntity}}.
Upload your template
Once you’ve created your template, save it as a DOCX file and upload it via the Template drop-down menu in the attribute editor.
Your stylings will be reflected in the output document unless there is custom styling input in the BRYTER editor which overrides your template style.
Avoid empty paragraphs or lines
If you face the issue of empty lines in your document, take a look at this article on how to avoid them.
With the latest improvements, you don't need to initialize a node that is updated later in your module. A placeholder that has not been populated, for example, because the input node was set to optional, will not appear in the generated document. In order to avoid the empty line, please add the {{\dl}} statement.
Note on Legacy behavior
If you have created modules that contain Create document action prior to June 2020, no action is required. While we may have moved on to more advanced document generation functionality, the functionality of the old workflow remains. However, we may no longer offer technical support for the old document generation node. We recommend you follow the steps above to update your Create document action.
Keywords: {}; {{}}; brakets; {{; }}; leere Zeile