Understanding templates and fields

A template is the blueprint for a document — it defines fields, where they get their values, where they land on the page, and how the output file is named. Each template takes part in up to three operations: Extract, Fill, and Generate.

Last updated

A template is the blueprint for a document. It defines fields, where they get their values, where they land on the page, and how the output file is named. Each template takes part in up to three operations: Extract, Fill, and Generate.

Once a template is set up, autofill produces identical output for every input case. You trade a few minutes of upfront setup for an unlimited number of generated documents that all look the same.

The three operations

The template settings drawer is organized around the operations your template actually performs. A template may do one, two, or all three — sections only appear when they apply.

  • Extract — pull structured data from an incoming file into the case. Appears when the template has any field with source='extracted' and at least one source tab references a source PDF.
  • Fill — collect values from a human via a form. Appears when the template has any field with source='question'. Fill can be restricted to specific team roles, and exposed to specific clients per case.
  • Generate — render an output document by combining source pages (workspace document sources, blank pages) and writing fields onto them. Appears whenever the template has at least one source tab.

A pure extraction template has only Extract. A collaborator intake form has only Fill. A permit packet that stitches a routed file with a cover sheet has Extract + Generate. A signed W‑9 cover sheet might have all three.

What a template contains

  • Fields — named values like Invoice Number, Vendor Name, Amount Due
  • Source tabs — ordered sources (workspace document source assets, blank pages, template references, and optionally a Form tab) that produce the final document. They live in the document bar directly above the preview canvas. The template-level AI Instructions textarea (edited on the Form tab) describes how the assembled PDF should be read; each source tab has a separate per-row AI Instructions box for quirks of that single source. See The four layers of AI instructions for the full picture.
  • Field placements — exact x/y/page coordinates for each field on the canvas
  • Field sources — where each field's value comes from at run time
  • An output filename pattern — how generated files are named
  • Fill permissions (optional) — which team roles may run the Fill operation
  • Per-field visibility (optional) — whether a field is visible to workers, clients, or both

Why fields are central

Everything revolves around fields. The fields define what data the template needs, where it comes from, and where it lands. AI extraction is bounded by the field definitions — the AI doesn't pull arbitrary data, only the fields you've declared.

Each field declares one or more outputs, and each output's stable output.key is the storage path into case.data — renaming a field or output's display label never moves the data. Each value also tracks its origin: from_extraction means the AI populated it, modified means a human edited it. Origin drives the opt-in re-extract behavior — Generate won't overwrite human-edited values unless you re-run extraction explicitly.

Walkthrough: a W-9 packet template

You collect W-9 forms from vendors, extract the tax ID and business name, and generate a cover sheet stapled to the original W-9.

1Upload cover sheet PDF2Add fields3Add the W-9 source4Place fieldsSave
  1. Open Templates in the active workspace.
  2. Click + New template and upload the cover sheet PDF.
  3. Add fields: Tax ID, Business Name, Vendor Address (source: extracted), plus Prepared By (source: question).
  4. Click + Add in the document bar above the preview and pick two sources: the cover sheet (workspace document source) and the W-9 (workspace document source tagged with the W-9 file category). Each becomes a source tab.
  5. Place the extracted fields on the cover sheet canvas.
  6. Click Save.

The drawer now shows all three sections — Extract (for the AI-extractable fields), Fill (for Prepared By), and Generate (for the source tabs).

A template with all three operations
NameW-9 Packet
Sourcescover sheet + W-9 source
Fields4
Extract3 fields
Fill1 field
Output{Vendor Name}-w9-packet.pdf

Common patterns

Field-first design

Start with the list of fields you need. Don't think about placement until the field list is right. It's much easier to add coordinates after the schema is settled than to reshape the schema once placements are in place.

Reuse via field sources

A field's input source decides where its primary value comes from. extracted runs the field's outputs against the source document and other context (the AI reads zones, derives prompts, computes formulas, or binds to system clock / email metadata / company profile). static is a constant from the input's staticValue. question asks the user at Fill time.

Render mode per field

Each field renders one of two ways: stamp text writes characters at exact coordinates, or fill an existing AcroForm field on the source PDF. The system picks based on whether the source PDF has a matching form field.

Templates per category, not per file

Don't make a separate template for every file variant. Create one template per category — W-9, Certificate of Insurance, Permit Application — and let file-category routing match incoming files to the right template.

Restricting Fill

Open the Fill section and pick which team roles may run it. Useful when a form should only be completed by owners, or only by workers of a specific role. The default is "anyone who can edit the case."

Troubleshooting

The drawer is missing the Extract section. Extract appears only when the template has at least one field with source='extracted' and at least one source tab. If either is missing, there's nothing for the AI to extract from.

The Fill section is missing. Fill appears only when the template has at least one field with source='question'. Convert a field's source to question to enable it.

Generate is missing. Generate requires at least one source tab. Open the template editor and click + Add in the document bar above the preview to add a source.

The template renders text in the wrong location. Field placement is exact. Drag the field on the canvas or set explicit x/y values in the field properties panel.

Some fields are blank in the output. Check the field's prefill policy and source. If the source is extracted and case.data doesn't have a value yet, the field stays blank.

My new template doesn't show in autofill actions. Templates are scoped to the active workspace and to the case's file categories. Switch workspaces or check the file category routing.

We use cookies to keep you signed in and improve the product. See our Cookie Policy.
Manage preferences