The Box Doc Gen Template Creator add-in for Microsoft Word enables teams to create and author Box Doc Gen templates that use Box Doc Gen placeholder tags to dynamically generate content and automatically format the generated document with data from custom and third-party applications through the Box Doc Gen API.
With the add-in you can create conditional logic, arithmetic calculations, and dynamic, self-formatting tables and lists when dynamically generating custom documents.
When configuring Box Doc Gen templates, you can either upload structured JSON data to populate content with tags or create the tags manually.
This article covers how to generate insertable tags from sample JSON data.
Prerequisites
Before you begin creating Box Doc Gen Templates, make sure you install the Box Doc Gen Add-in for Microsoft Word.
After successfully installing the add-in, it will be available in the menu ribbon within Microsoft Word. Once selected, the Box Doc Gen panel will appear on the right.
Creating a Doc Gen template
Follow these steps to create a Box Doc Gen template:
- Open an existing Microsoft Word document or create a new document. You can either use the Microsoft Word desktop application or Microsoft Word Online.
- Begin drafting and configuring content as part of your Box Doc Gen template.
- Once you complete the draft, insert the Box Doc Gen variables using the Box Doc Gen Template Creator add-in. Select Start with your data to use tags extracted from a JSON file.
Creating tags using JSON data
To upload a JSON file:
- Click Upload File > Upload.
- Select the JSON file and open it.
To add a JSON schema manually:
- Click Manually Add.
- Paste the JSON schema.
Once the schema is placed in the designated area, click Generate tags. The resulting data within the JSON file will be transformed into Box Doc Gen tags.
JSON | Tags |
{ "invoice":{ "id": "Inv1203", "date": "18-08-2023", "customerName": "Example Corporation", "currency": "$", "amount": 5060.50, "billingAddress":{ "street": "Example street", "city": "Example city", "zip": "EX-456" }, "products": [ { "id": 1, "name": "A4 Papers", "quantity": 100, "price": 29, "amount": 2900 }, { "id": 2, "name": "Ink Cartridge", "quantity": 40, "price": 39, "amount": 1560 }, { "id": 3, "name": "Adhesive tape", "quantity": 20, "price": 30, "amount": 600.50 } ] } } |
Next step
The next step is to add the created tags to the Box Doc Gen template. The Box Doc Gen tags can be used to insert dynamic texts, images, tables, lists, calculations, blocks of content, conditional logic, and more.