Custom variables, and where they live

The levels a variable can be declared at, which one wins when a name exists at more than one, what a variable prints before anyone fills it in, and why a variable is not a field.
About 9 minutes to read and follow along.
A variable is a named value a document prints. You write it as a token, {{company.name}}, and the value is merged in when the document is rendered: on the canvas, on the signing page, in the exported PDF. The token itself is never rewritten in your document, which is what makes the same document reusable for a different client tomorrow.
The confusing part is where a variable can be declared, and which declaration wins when the same name sits at two levels. That is what this guide is about.
The levels
The account level is Settings, on the Variables tab: "Values you use in every document: declare them once here, and any document variable with the same name and no value of its own picks up the default when you send." Each row has a token, a label, a type and a default value. Every account starts with six rows: company.name and company.address for you to fill, and four that resolve on their own.
The document level is the Variables panel in the builder, which declares a variable on that one document, with a token, a label, a type, a source, a default value and a Required switch. A template is a document body under another name, so a template declares variables the same way, and every document made from it starts with its own copy of them.
The third level is per send, and today it exists only through the API: POST /v1/envelopes takes a values object alongside the template id, and the create-a-document call takes the same. Those values land on the new document's variables as their defaults, which is where the app would have put them too.
There is no fill-in-the-blanks step in the send dialog. In the app, the value a variable prints is the "Default value" you type on its card in the builder, and you type it before you send. "Default" reads oddly for a value that is simply the value, and that is close to what it means here: the value the document goes out with, unless it is left blank and your account has one of its own to lend.

Precedence, in one rule
The document wins. When a name exists at both levels, the document variable's own value is used, and the account default is only consulted when the document's value is blank.
Nothing is ever added. An account variable whose name the document never declared contributes nothing at send: the merge fills in blanks on the document's own list, it does not conjure declarations the author did not write.
The merge happens at send, into the envelope's frozen copy, and never back into your stored document. So a document that borrowed your company address keeps borrowing it: change the address in Settings and the next envelope carries the new one, while the envelope already sent carries what it was sent with.
Using an account variable in a document
- Open the Variables panel in the builder. Your account rows are listed under "From your settings", each showing its token and its account default.
- Click "Override" on the one you want. That copies it into the document's own list, where you can retype the value, change the label, or mark it Required. The account row then reads "Overridden" rather than disappearing, so it stays visible that a default still sits underneath.
- Insert the token in a text box by typing "/" or "{{". The canvas draws it as a chip carrying the variable's label.
A token the document has not declared is drawn struck through in red, and hovering it says the name "is not declared on this document". That is the check to look for: an account variable that has not been overridden into the document is not declared on it, and an undeclared token prints as nothing at all.

The four that fill themselves in
date.today, sender.name, sender.email and document.title are system variables. They hold no stored value, which is why the settings table shows "Resolves when you send" where the other rows show a default. Their value is the envelope's own context at the moment it goes out: the date in your timezone and language, the envelope's title, and the sender name and address taken from the very same identity that writes the From line of the email announcing it, so the document and the email can never name a different sender.
Resolution is by name. A system row renamed to something off that list of four resolves to nothing rather than erroring, because the rename was your decision and an empty value is what it leaves behind. Give a copied system variable a value of its own and it stops resolving too, by the same precedence rule as everything else: a value the document holds wins.
What a variable looks like before it has a value
On the builder canvas it is a chip carrying the variable's label, filled or not. The author is choosing which value belongs there, so the name is what the canvas shows.
Everywhere a reader sees it, on the signing page and in the exported PDF, the value is substituted as plain text, and an empty variable prints as nothing. Never raw braces: a signer must not be shown {{customer.legalName}}, so a blank leaves a blank.
A blank that must not print is what the Required switch is for. Sending is refused while a required variable has no value, naming it: "has no value, and the document needs one before it goes out". The check runs after the account defaults are merged, so a required variable your account fills in is not missing, and it runs at send, while you can still do something about it, rather than at completion with every signature already collected.
A variable is not a field
They sit side by side on the canvas and they behave nothing alike. A variable is ink: you decide its value before the envelope goes out, nobody who receives the document can change it, it prints identically for every recipient, and no recipient owns it.
A field is empty until somebody fills it. It belongs to one signer, only signers can be given one, it is filled on the signing page, and what was typed into it is recorded against that signer in the audit trail. An unassigned field blocks sending.
The rule of thumb: if you know the value when you send, it is a variable. If the person receiving it supplies the value, it is a field. A contract naming your company is a variable; the counterparty's signature and the date they sign are fields.
The two are separate namespaces even when a name appears in both, which matters when a formula reaches for one: a computed field resolves a name against a pricing table first, then a document variable, then a field.
Variables and templates
Variables are what a template is for. Declare the names, dates and amounts that change per document once in the template, and every document made from it asks for values instead of needing its text edited in six places. The library preview lists what a template will ask you for before you use it.
Editing a template changes future documents only. A document already created from it holds its own copy of the variables and is not touched.
The API exposes the same shape: GET /v1/templates lists every variable with its type, its default and whether it is required, and one POST sends the template with values supplied for them. See "Send a template through the API".
Where the edges are
Names are dotted identifiers, like company.legalName, and a name may be declared only once at each level. A token holds a name and nothing else: no arithmetic, no conditionals, no formatting instructions. Arithmetic over a document's numbers is what computed fields are for.
The type on a variable is a declaration, not a formatter. It labels the row and it travels to integrations through the API, but nothing reformats the value on its way to the page: a currency variable prints exactly the text the value holds, so type it the way it should read.
The Source dropdown on a document variable offers Manual, Recipient and System, and it records what you meant rather than driving anything. Send-time resolution is by name, against your account rows, and nothing fills a value per signer. A value that differs from one signer to the next is a field, not a variable.
Keep going
Connect Updocly to your CRM