Using Merge Fields
How merge fields work in MyLawyerLink: placeholder syntax, available client and case fields, firm keys, and tips for documents and SMS.
Merge fields are placeholders that MyLawyerLink replaces with real client, case, event, and firm data when you generate a document or send an SMS from a template.
Placeholder syntax
Use double curly braces around the field name:
Dear {{client_first_name}} {{client_last_name}},
Re: {{case_title}} ({{case_number}})
Field names are case-sensitive. A typo or wrong name is left unchanged in the output, so match the names exactly.
MyLawyerLink also resolves common alternate names (for example {{client.firstName}}) through an alias map, but the Available variables picker in the app lists canonical underscore keys such as {{client_first_name}}. Prefer those names in new templates.
Where merge fields work
- Document templates — Word
.docxfiles uploaded under Account → Document Templates - SMS templates — message bodies under Account → SMS Templates and when you insert a template in the message widget
- Email templates — team email templates where placeholders are supported
The same field names are used across channels. See Creating SMS Templates and Document Templates for channel-specific steps.
Common client fields
| Field | Example output |
|---|---|
{{client_first_name}} |
Maria |
{{client_last_name}} |
Garcia |
{{client_full_name}} |
Maria Garcia |
{{client_email}} |
maria@example.com |
{{client_phone}} |
(555) 123-4567 |
{{client_primary_phone}} |
(555) 123-4567 |
{{client_phone_label}} |
Mobile |
{{client_phone}} is the first phone on the file. {{client_primary_phone}} is the phone marked primary, or the first phone when none is marked. {{client_phone_label}} is the label on that primary phone, such as Mobile, Home, or Work. These fields are empty when the client has no phone number.
Common case fields
| Field | Example output |
|---|---|
{{case_title}} |
Smith v. Jones |
{{case_number}} |
2024-CV-12345 |
{{case_type}} |
Civil Litigation |
{{case_filed_date}} |
Formatted filing date |
Event fields (when an event is in context)
| Field | Example output |
|---|---|
{{event_date}} |
Hearing date |
{{event_time}} |
Start time |
{{event_type}} |
Court date |
{{event_location}} |
Courthouse or video link |
Practice and firm fields
Team practice settings supply contact block fields such as:
| Field | Notes |
|---|---|
{{attorney_phone}} |
From team practice settings |
{{attorney_label}} |
Firm or practice name |
{{team_resend_email}} |
Team sender/reply address |
{{firm_resend_email}} |
Billing/firm sender address |
Display names like {{attorney_name}} are empty unless configured. Set values under Team settings → Firm merge field keys (per team) when you need a consistent attorney or firm name in generated text.
Custom fields
Case, client, and event custom fields defined in Team settings → Case field settings appear in the variable picker using keys based on the field definition name. Practice custom fields use practice_* keys.
Billing
These use the client’s invoices on the billing team. Draft and cancelled invoices are skipped. Balance owed matches outstanding balance.
| Field | Meaning |
|---|---|
{{billing_balance_owed}} |
Amount still due |
{{billing_total_paid}} |
Payments recorded on those invoices |
{{billing_case_balance_owed}} |
Amount still due on the selected matter |
{{billing_case_total_paid}} |
Payments recorded on that matter’s invoices |
{{billing_payment_plan_end_date}} |
Last installment due date on the active plan that has the next unpaid payment |
With a client and no invoices, balance and total paid are $0.00. Case fields stay blank until a matter is selected. {{billing_payment_plan_end_date}} is the last installment on the active payment plan that still has an unpaid payment. Skipped installments are ignored.
Amount math
Currency fields accept modifiers. Percent, multiply, and divide run before a dollar adjust:
{{billing_balance_owed|percent:33}}
{{billing_total_paid|mul:1.5|add:25}}
{{billing_case_balance_owed|div:4}}
|percent:33 is 33% of the amount. |div:0 leaves the value unchanged. The variable picker can set the same math on a field, including the true or false side of an if/else.
Assigned team
assigned_team_* fields come from the office on the matter. With no matter, they come from the client’s newest office assignment in the firm. They do not change the merge source team selected in the generate dialog.
| Field | Meaning |
|---|---|
{{assigned_team_name}} |
That office’s name |
{{assigned_team_names}} |
Every assigned office, newest first |
{{assigned_team_attorney_phone}} |
Phone from that office’s practice settings |
{{assigned_team_attorney_name}} |
Name stored on that office’s firm merge keys |
{{assigned_team_resend_email}} |
That office’s sender address |
Other practice and firm keys use the same prefix, for example {{assigned_team_practice_bar_number}}.
Date helpers
| Field | Purpose |
|---|---|
{{date}} |
Today's date |
{{current_date}} |
Today's date (alternate key) |
{{writtenDate}} |
Written-style date where supported |
Tips
- Use the variable picker when editing SMS templates or document merge settings — it only lists fields that map to defined data.
- Generate a test document from a real case before using a new template in production.
- Keep one template per document type (engagement letter, status update) and use merge fields for anything that changes by matter.
- Configure firm merge keys once in team settings instead of hard-coding names in every template.
Related guides
- Document Templates — upload and generate
.docxfiles - SMS Templates — reusable text messages with the same fields
Related guides
Document Templates
Upload Word templates, edit merge fields, and generate filled documents from a case in MyLawyerLink.
Creating SMS Templates
Create reusable SMS templates with merge fields, attachments, and categories. Use them from Account settings or the message widget.
Connect DocuSeal and Request Client Signatures
Link DocuSeal for e-signatures, map template fields to case data, and send signing requests from DocuSeal templates.