In this article:
- Introduction
- Where Can Merge Fields Be Used?
- Merge Field Syntax
- Merge Field Examples
- Merge Field Context/Location
Introduction
Merge fields are a combination of text and other characters that can be inserted in document templates, email templates, and various areas inside Actionstep. Similar to mail merge fields in Microsoft Word, Actionstep merge fields are used to populate your documents and email messages with information from your Actionstep system.
For example, you can create a custom bill template that automatically pulls and uses your client’s contact record, matter, and billing data.
Merge fields are a foundational element of Actionstep document assembly. Utilizing merge fields in templates saves time, reduces entry error, and automates the repetitive task of document drafting.
Where Can Merge Fields Be Used?
Merge fields are most often used in document and email templates. There are also several other places they can be used within the Actionstep system. The lists below outline where merge fields can be used with Actionstep.
Document Templates | Email Templates | Other Actionstep Areas |
|
|
|
Merge Field Syntax
When a merge field is generated in Actionstep, the syntax, contents, and context of the field are evaluated to retrieve data from your Actionstep system.
A complete merge field consists of at least a merge field start marker, a merge field name, and a merge field end marker. Many fields will require additional "parts" to properly access and format data. All of these elements are described in the following table.
Element | Description |
Merge field start & end markers | Merge fields are surrounded by field markers. This helps Actionstep identify the text as a merge field. Actionstep supports two types of markers, depending on where the merge field is being used: 1) document templates and 2) within Actionstep.
Inserting a Merge Field In a Document Template Merge fields can be inserted in Microsoft Word documents. In Word, double-chevron characters ( « » ) are used as field markers for the merge field. To insert a merge field in Word, go to Insert > Quick Parts > Field. Click Categories and choose Mail Merge. Then select MergeField. Enter the merge Field name and options, then click OK. For example: «FullName|pt=Client|ifnull=ignore» Inserting a Merge Field In Actionstep Merge fields can be used throughout fields in Actionstep as well, including:
Within Actionstep, double square brackets are used as markers for merge fields. For example: [[FullName|pt=Client|ifnull=ignore]] Note: While square brackets may work in document templates, they are unreliable due to issues caused by formatting. For this reason, Actionstep does not support the use of square bracket field markers in document templates. |
Merge field name | Synonymous with just “merge field,” the merge field name specifies the data point to be accessed. In this example, FullName is the merge field name: FullName|pt=Client|ifnull=ignore |
Pipe separator | Many merge fields include additional instructions or specifications. To separate the name and options from these parameters, use a |, or pipe character (sometimes referred to as vertical line or vertical bar). In this example, the merge field name and the options are separated with pipes. FullName|pt=Client|ifnull=ignore |
Option | An option is a specified instruction for a merge field. Options can be used to access the correct data in your Actionstep system or apply additional logic or formatting. Some merge fields will have no options, while others will have many, depending on the field. Options allow you to access the data for the merge field name.
The field below has two options, pt and ifnull: FullName|pt=Client|ifnull=ignore
The pt option can be set to any valid participant type on the matter for which the template will be generated. In the example above, FullName pulls the first, middle, and last name of a client participant (which is denoted by pt=Client).
The ifnull option specifies what to do when no data is returned. In the example above, there may not be a client associated with the matter. If this happens, you may not want the document to show that the data is missing. You can instruct Actionstep what to do. In this scenario, Actionstep will ignore the field and display nothing. |
Option value | Most options must be set to a value. Many options can have various values for various purposes.
In this example, the option value for pt is Client while the option value for ifnull is ignore.
FullName|pt=Client|ifnull=ignore
These can be changed depending on the purpose of the field. In this example, Actionstep pulls the full name of the attorney (pt=Attorney) and if no data exists for the attorney name, it displays the text "TBD" (ifnull=TBD):
FullName|pt=Attorney|ifnull=TBD |
Merge Field Examples
As described above, a merge field consists of the merge field name and options. Each merge field name represents a different data point while options provide instruction for displaying the field or add additional logic.
Following are some examples of merge fields:
Merge Field | How It Works |
dob|pt=Client | Returns the date of birth for the Client party on a matter. |
dob|pt=Other_Contact | Returns the date of birth for the Other Contact party on a matter |
system_date|fm=Signed_this_%nth_day_of_%B_%Y | Returns the current date formatted as "Signed this 16th day of February 2023" |
system_RecordCount | This is a general-use field to count the number of records for a specified data source. |
system_RecordCount|datasource=Bill_Fees | Returns the number of fee line items on a bill |
system_RecordCount|datasource=action_participant.lawyer | Returns the number of lawyers on the matter |
Merge Field Context/Location
In some cases, merge fields cannot be used in certain Actionstep locations or context. This is because the field needs access to a specific data source in order for data to be generated for it.
To determine where a merge field can be used in Actionstep, you can access the merge field list, which lists the data sources for merge fields.
To access the merge field list:
- In Actionstep, an admin can go to Admin > Document Assembly.
- Click Manage for the Merge field list section. The Merge Field List appears.
- Find the merge field you want to use in the list. To make this easier, use the Filter or sort the information by column name.
When looking at the merge field list, the Data Source column indicates where the merge field can be used.
In this example, the BillFees_Date field returns the date of a fee line item on a bill. This field can only be used in a bill since it pulls dates from the line items of a bill. The same field cannot be used in a trust statement since the statement isn't directly connected to a singular bill and the field wouldn't be able to determine which invoice to access for line item information.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article