> For the complete documentation index, see [llms.txt](https://docs.rubica.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rubica.au/crm-doc-generation-and-pdf-form-filling/creating-and-generating-document-templates.md).

# Creating and Generating Document Templates

Build a Word document into a reusable template in Rubica, then generate   finished documents one at a time or in bulk. A step-by-step guide for system  admins — no technical experience needed.

{% hint style="info" %}
Comprehensive Video (10 mins) - [https://screen.studio/share/AcmHu2Gd](https://screen.studio/share/AcmHu2Gd?state=uploading)
{% endhint %}

<div align="center" data-with-frame="true"><figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FM4MBHpfo4WsUX51DkG6H%2FScreenshot%202026-06-25%20at%2011.50.56%E2%80%AFpm.png?alt=media&amp;token=87562a3d-6623-49e4-8f56-de90d4ed6981" alt=""><figcaption></figcaption></figure></div>

This guide walks you through the full process of turning a Word document into a reusable template in Rubica — from deciding what to template, to coding it up, loading it in, and generating finished documents both one at a time and in bulk.

You don't need to be technical to follow along. If you can work with a Word document and copy and paste, you can build a template.

## What you'll do

The process has five stages:

1. **Plan** which parts of your document should be automated.
2. **Build** the template using the Template Helper.
3. **Upload and map** the template so Rubica knows where each field comes from.
4. **Add guidance** so your team knows how to fill in any manual fields.
5. **Generate** documents — individually or in bulk.

***

### Stage 1 — Plan your template

Start with a finished, fully merged version of the document you want to template — one that already has real values filled in. Read through it and decide what each piece of information is:

* **CRM fields** — data that already lives in Rubica and should be pulled in automatically. These are usually the everyday details: mailing salutation, address, date, preferred names, and the advisor or sender of the letter.
* **User input fields** — values that change every time and need to be entered by the person generating the document (for example, a detailed reason or an effective date).
* **Anything you'd like to automate further** — such as AI-generated content or images.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FhgIDQlCpVNdYYkOKYuyV%2FScreenshot%202026-06-26%20at%2012.06.07%E2%80%AFam.png?alt=media&amp;token=384be73e-00b2-4573-b2c3-844ba54debcd" alt=""><figcaption></figcaption></figure>

Most of the everyday fields will be straightforward "CRM 101" details that Rubica already holds, so those are your quick wins.

***

### Stage 2 — Build the template with the Template Helper

#### Open the Template Helper

Go to the **DocX / PDF Tools and Doc Templates** tab, then open the **Template Helper**.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FiI2FclPy6vycAHEhulwJ%2FScreenshot%202026-06-26%20at%2012.07.21%E2%80%AFam.png?alt=media&amp;token=b599259c-357c-45eb-a5fa-0106e0739425" alt=""><figcaption></figcaption></figure>

#### Load sample data

Choose your **source object**. Most documents are generated from the **household account**, so you'll usually select the account or household here.

To make life easier, type in a **sample record** to use as example data. The helper will automatically populate each field with that record's real values, so you can see exactly what you're working with.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FEffCNXFXbvUsu63uPbWp%2FScreenshot%202026-06-26%20at%2012.07.47%E2%80%AFam.png?alt=media&amp;token=d0ee335f-d0f4-4474-86c2-c185718557aa" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Some fields may appear blank — this is normal for group accounts, where not every field is populated. You'll still have everything you need to build the template.
{% endhint %}

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FibBkmNgIrJC7FEq6jBtX%2FScreenshot%202026-06-26%20at%2012.08.02%E2%80%AFam.png?alt=media&amp;token=39f25997-e737-40c2-94d7-c00fe4cc143e" alt=""><figcaption></figcaption></figure>

#### Find and insert CRM fields

There are a lot of fields, so use the search box to narrow things down. For example, type **billing** to bring up all the separate billing address fields — street, city, state, and postcode.

To add a field to your document:

1. Click the field — this copies it to your clipboard.
2. Paste it straight into your Word document where it belongs.

Work through the document one field at a time until it's fully coded up with the right CRM references.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FTEgNJuZ8TapexnUNmP0x%2FScreenshot%202026-06-26%20at%2012.08.35%E2%80%AFam.png?alt=media&amp;token=7497b629-37aa-459a-a7f8-674aef5eb891" alt=""><figcaption></figcaption></figure>

#### Declare your own merge fields

Some information won't exist as a CRM field — for example, a **detailed reason** specific to each letter. For these, you can declare your own merge field directly in the document using curly brackets:

```
{{Detailed_Reason}}
```

Give each merge field a clear, descriptive name so the next person who opens the document understands what belongs there. You'll connect these to user input later (see Stage 3).

{% hint style="info" %}
**Quick win:** Before creating a manual merge field, check whether the value already exists in the CRM. For example, searching for **mailing addressee** brings up a ready-made field. Pasting it as a CRM field now saves you from having to map it manually afterwards.
{% endhint %}

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FJpWPnzZ7XpH2Uyy0jG0d%2FScreenshot%202026-06-26%20at%2012.09.45%E2%80%AFam.png?alt=media&amp;token=361f72c8-42e8-4a77-be1c-40b694aaf39c" alt=""><figcaption></figcaption></figure>

You can also insert **images** into a template (covered in a separate video) — this works by pointing to a public URL that the document generates the image from.

This same approach works for any document. A general letter, for instance, might use the same address and name fields, with the body of the letter as a single merge field (e.g. `{{Letter_Body}}`) and a `{{RE_Subject}}` line.

Once you're happy with the template, save your Word document — you're ready to upload it.

***

### Stage 3 — Upload and map the template

#### Upload the file

Navigate to **Word Template**. You'll see any templates that have already been configured. To add yours, either drag your `.docx` file in or click **Upload**.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FJFvXXkqZcY25KdWKtRYA%2FScreenshot%202026-06-26%20at%2012.04.46%E2%80%AFam.png?alt=media&amp;token=ac7ee633-7b32-47f3-af64-95cfccf6246f" alt="" width="375"><figcaption></figcaption></figure>

Rubica reads the template and extracts all the merge fields you added. It will also attempt to match some of them to CRM fields automatically.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FZhR3T7ySdmOI3zszIoJ2%2FScreenshot%202026-06-26%20at%2012.10.40%E2%80%AFam.png?alt=media&amp;token=3db7844f-7412-43e0-85e8-1dbcdf7f307e" alt=""><figcaption></figcaption></figure>

#### Review the extracted fields

It's worth checking the suggested matches before you continue. Rubica matches based on field names, so a guess isn't always right.

To check a mapping, load a sample record again and click through each field — Rubica will show you that record's value so you can confirm you're pointing at the correct field.

{% hint style="info" %}
Because matching is based on the field name, always confirm the mapping is correct — especially for common words like "name" or "owner" that can appear in more than one field.
{% endhint %}

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2F5TKkIVtZ2UCNRoYG3mET%2FScreenshot%202026-06-26%20at%2012.10.48%E2%80%AFam.png?alt=media&amp;token=f8456040-6670-40d8-bb80-7149c2b0fa39" alt=""><figcaption></figcaption></figure>

#### Map the remaining fields

For any field that wasn't matched, search for the correct one. For example:

* **Account owner** — search **owner** and select the full name of the owner (the actual person who owns the account).
* **Client preferred names** — you might use the **mailing addressee** field, or a **preferred greeting** field, depending on how you want the client addressed.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FLVNLBzrK9beMu3M2SaTp%2FScreenshot%202026-06-26%20at%2012.03.33%E2%80%AFam.png?alt=media&amp;token=8a0e40db-604a-4708-a9a5-f83dfd0ff71c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FMyfA9FEo5qOHhnz1StsG%2FScreenshot%202026-06-26%20at%2012.03.56%E2%80%AFam.png?alt=media&amp;token=550dcc72-10e9-461e-9884-a4ba668cd5fb" alt=""><figcaption></figcaption></figure>

#### Set each field as CRM or User Input

Every field is either:

* **CRM** — pulled in automatically and consistent across documents. Leave your everyday fields set to this.
* **User Input** — entered by the team member at the moment they generate the document. Switch your variable fields (like a detailed reason, date of issue, or termination effective date) to this.

When you set a User Input field, you can also:

* Choose its **format**. Setting a date field to **text** can help it format exactly the way you want.
* Mark it **Required**, so no one can generate the document without filling it in.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FSxcprhzzVpcXuaBvpt6J%2FScreenshot%202026-06-26%20at%2012.03.04%E2%80%AFam.png?alt=media&amp;token=1b3083ce-2160-47d7-88a4-2178e6fc17bc" alt=""><figcaption></figcaption></figure>

In effect, you're building a short form for your team to fill in. Everything else populates on its own; only the User Input fields need a person's attention.

#### Save the template

Click **Save as Template**, give it a name, and wait for the confirmation (a green light appears at the top when it's done).

***

### Stage 4 — Add guidance with a Knowledge Article

Templates are stored as **Knowledge Articles**. Search for the template you just saved and you'll find it ready to go.

You can also add **article content** to give your team — and AI — helpful context. This is especially useful for free-text User Input fields.

For example, for the **detailed reason** field, you can list the most common reasons and the process for choosing the right one. When a team member generates the document, they simply copy the correct option and paste it into the form.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FaSjIcx1i4CgdwQAlyNyG%2FScreenshot%202026-06-26%20at%2012.01.56%E2%80%AFam.png?alt=media&amp;token=553269db-e421-4fbb-b1b7-8896614af138" alt=""><figcaption></figcaption></figure>

Save the article when you're done.

***

### Stage 5 — Generate a document

You can generate a document from the home screen while testing, but in everyday use you'll generate it from the record it's mapped to — the account or household.

Navigate to the relevant group or household and find the generate option.

1. Click **Select Template** to see all your configured Word and PDF templates.
2. Choose your template and click **Next**.
3. All the CRM fields are already mapped and filled in — you only need to complete the User Input fields.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FdxWulHAnJoM3gJDI8WOf%2FScreenshot%202026-06-25%20at%2011.53.49%E2%80%AFpm.png?alt=media&amp;token=79f02009-9071-4ea6-8adc-12756cd71891" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If a CRM value looks wrong or didn't come through, you can edit it right here. You don't need to go back into the CRM to fix it, and there's no post-merge editing in Word afterwards.
{% endhint %}

Fill in your User Input fields (using the Knowledge Article guidance for fields like the reason). Then choose your **output format** — Word, PDF, or both.

Click **Generate**. It takes only a few seconds. If you chose PDF, it renders neatly on screen, and you can download or print it from there.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2Frfb95POlLu3qVX7sxhq2%2FScreenshot%202026-06-25%20at%2011.54.11%E2%80%AFpm.png?alt=media&amp;token=09bd374b-62a1-4c69-b7f4-51d9596c140c" alt=""><figcaption></figcaption></figure>

***

## Bulk generation

When you need to produce the same document for many records at once — a mailout, or a batch of renewals, for example — use **Bulk DocGen**.

1. From the home screen, click **Bulk DocGen**.
2. Select your template, then click **Next**.
3. **Build your audience** — use the filters to select the accounts or households you want. (If you're comfortable with queries, you can use SOQL here instead.)
4. Click **Next** to load everyone's data.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FgmNQg4kSBB0Qe5xBKumA%2FScreenshot%202026-06-26%20at%2012.00.15%E2%80%AFam.png?alt=media&amp;token=2fc639dc-a13c-4d77-955a-1d6da92cc1ce" alt=""><figcaption></figcaption></figure>

Rubica fills in every value it already knows. For fields that are blank or need the same value across the batch — like a date of issue — use **Set all rows** to apply one value everywhere, or edit individual rows where needed.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FKPsN5a85ldaFmxGlLTlH%2FScreenshot%202026-06-25%20at%2011.54.33%E2%80%AFpm.png?alt=media&amp;token=f952276a-e4db-460d-abd0-9460eed839ae" alt=""><figcaption></figcaption></figure>

Choose your output format. Rubica won't let you run the bulk job until all required inputs are filled, which is exactly why **Set all rows** is so handy.

Click to start the bulk generation. The more documents you have, the longer it takes, but a small batch generates in well under a minute. Each finished document appears against its client or household account, ready to download.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2FTCiCG5caonhEbF2GQ40z%2FScreenshot%202026-06-25%20at%2011.36.15%E2%80%AFpm.png?alt=media&amp;token=89f47927-9d49-4f23-9460-45b46601753e" alt=""><figcaption></figcaption></figure>

***

## What's coming next

This is version 1 of bulk document generation and the PDF tools, with more on the way. On the near-term roadmap:

* Pushing generated documents straight into tools like **Annature** for signing.
* Filing documents automatically into the right place in your document management system, such as **SharePoint**.
