Skip to content

Generate Word documents from records

How-to8 minPractitioner

Before you start

Write the document in Word the way it should look, mark the changing parts with placeholders, and upload it. A workflow then fills the placeholders from a record, for example a purchase order, and attaches the finished .docx to it.

A placeholder is a field’s system name inside ${ }. Type it anywhere in the document.

Dear ${vendor_name}, purchase order ${po_number} is approved for ${total_amount}.

Two habits keep placeholders working:

  • Use the field’s system name, not its label. The Fields tab shows each token. Click a field there to copy its placeholder, then paste it into Word.
  • Give a placeholder one formatting from the first $ to the last }, so Beezr fills it.

For a purchase order with lines, make one table row that holds placeholders written as the list name, a dot and the field.

ItemQuantity
${lines.item}${lines.quantity}

Beezr copies that row for every record in the list. If the list is empty, it removes the row. For a module that has line items, the Fields tab shows the list name and its fields, and copies the exact placeholder for you.

  1. In the left rail, click Document generation, then New template.
  2. Choose Word, type the Name, for example Purchase order, and choose the Module, for example Purchase Orders. Click Continue.
  3. Drop the .docx on Drop your Word file here, or click it to browse.
  4. Click Save.

Use a .docx Word document .

After the save, Placeholders found lists each one with its kind and its source.

KindFilled from
ValueThe field it matches, shown with its label, or Set in the workflow step
Repeating rowRows of the module’s line items, or Related records, chosen in the workflow step

If the list says “No placeholders found”, write the placeholders in the ${field_name} form, click Replace, then Save. After you edit the file in Word, replace it here, and click Rescan if you want the list refreshed.

In Word, add a bookmark where the signature should go. In the workflow step, switch on Add a signature, type the Bookmark name, and choose the Signature field that holds the signature image from your form. Add signatures in Word templates.

Add a Smart document step on the same module, choose the template, and fill in each placeholder. Beezr lists them as ${name} rows, with “n of m filled”. Set every placeholder. Smart document covers the step.

A Word template tied to a module. When the workflow runs, the record’s values replace the placeholders and the finished .docx is attached to the record.

Check yourself

Omar types the placeholder `${vendor_name}` in Word. How should he format it?
Show the answer

With one formatting from the first $ to the last }. Give the whole placeholder one formatting so Beezr fills it.

Where do you put the placeholder for a repeating line, such as the item of each purchase order line?
Show the answer

In a table row, written with the list name and the field. A table row that holds a placeholder like the list name and field repeats once for every record in the list.

What's next

Last checked