You can include Merge Fields in a Word Template or Stationery to bring in content from your practice management software and from FYI. For an overview of how Merge Fields are used, refer to Setting up Document Templates and Stationery. For general information on creating and updating Templates and Stationery in FYI, refer to Creating Stationery for Word and Creating Templates for Word, Spreadsheet or Presentation.
Merge Fields are added to the content of the Word Template or Stationery and need to be added in a specific format.
This article contains the following sections:
- Downloading the FYI Merge Fields.docx
- Important - Use the Desktop Version of Word when adding Merge Fields
- Adding FYI Merge Fields to Word Templates and Stationery
- Merge Fields for Custom Fields
- Adding Merge Fields for Custom Fields
- Merge Fields for Custom Fields that are Maintained in FYI
- Updating Merge Fields
- Today's Date
- Checking Merge Fields in Word
- Conditional Merge Fields
- Download Files
Downloading the FYI Merge Fields.docx
Click here to download the FYI Merge Fields.docx for a list of Merge Fields that you can copy and paste into your Templates and Stationery (or download the file from the bottom of this article).
Important - Use the Desktop Version of Word when adding Merge Fields
When adding Merge Fields to a Word document, this must be done using the desktop version of Word. The functionality is not available in the Online version of Word.
- If you have prepared the Word document and will be using drag and drop or Upload to import it as a Template, you can add the Merge Fields to the document using the desktop version of Word.
- If you will be editing the Template or Stationery from FYI, you need to use the Edit from Desktop function.
Client information from your Practice Management Software
For example, First Name and Last Name of the addressee, and the Postal Address.
These examples are added as the Merge Field codes «FirstName», «LastName», «PostalAddress»
Information from your Practice Management Software
For example the client's Name, Contact Name, Addressee, Salutation is retrieved from your practice management software for the primary contact of the client, as displayed on the Client - Summary tab (refer to Client Summary).
These examples are added as the Merge Field codes «Name», «ContactName», «Addressee», «Salutation».
User information from Staff in your Practice Management Software
For example, the Owner (creator of the document) Name and Phone.
These examples are added as «OwnerName», «OwnerPhone»
If user information such as the direct or mobile phone number of the owner needs to be added or updated, this needs to be done in the Staff profile within your practice management software and then synced to FYI.
Note: There is a known issue where the values are not currently populated for the Merge Fields for Manager Phone, Manager Mobile, Partner Phone and Partner Mobile.
Unique Reference Number
To include the unique FYI reference number, add the Merge Field «ReferenceNumber» to Word Templates or Stationery. Refer to Unique Document Reference Number.
User Roles and Qualifications
If you have added Roles to your users and Qualifications to the User Profiles (refer to Managing Users) these can be included, for example in the sign off in a Word Templates or Stationery for the Owner of the document that is created.
These are added with the Merge Fields «OwnerRole», «OwnerQualifications»
Today's Date
You can add the date in two way, using the FYI Merge Field «CreatedDate», or the Word Date function. Refer below to Today's Date.
Custom Fields
If you have set up Custom Fields in your practice management software, or UDFs in GreatSoft, or Custom Fields in FYI, you can include Merge Fields for these in Templates and Stationery. Refer below to Merge Fields for Custom Fields.
Tax Merge Fields
The Tax Merge Fields shown in the document are used in the FYI pre-configured processes for Tax Assessments processes which are triggered by Tax Returns and Assessments from Xero Tax (refer to Xero Tax Return AutoFile (Australia Only)). If these Tax Merge Fields are used in any other processes (such as Custom Processes) or if a template with the Tax Merge Fields is used when creating a new document, they will retrieve the data from the most recent Tax Return or Assessment. Refer also to Including Advanced Tax-Related Merge Fields in Word and Spreadsheet Templates.
An example of a Word template with Merge Fields is shown below.
Signature Merge Field
When sending documents for signature via Annature or FuseSign you need to ensure the document you send has the Signature Merge Field included in the document. The Signature Merge Field is automatically detected as a placeholder where the recipient has to sign, this does not show the sender's signature. Refer to Digital Signatures using Annature and Digital Signatures using FuseSign.
Word Fields that give a Prompt, such as Ask and Fill-in
The Word Fields that give the user a Prompt, such as Ask and Fill-in. do not work when they are added to FYI Templates and Stationery,
Adding FYI Merge Fields to Word Templates and Stationery
Download the FYI Merge Fields.docx from the link above (refer above to Downloading the FYI Merge Fields.docx).
This document lists all the Merge Fields codes that can be added to a Word Template or Stationery. From this document, you can copy fields directly into your Word Template or Stationery. Or you can use the document as a reference for the code to enter when adding Merge Fields directly using the Word Insert Field function.
You can add any of the FYI Merge Fields to Word documents in the following ways:
- Copy a field from the FYI Merge Fields.docx and paste it into the Word document.
- Add the Merge Field directly to the Word document using the Insert Field function in Word (from the Word ribbon menu Insert - Quick Parts - Fields) and typing the code for the Merge Field.
Copy a Field from the Merge Fields Document
- Download the FYI Merge Fields.docx document (refer above to Downloading the FYI Merge Fields.docx).
- In the FYI Merge Fields.docx document, find the field you want.
- Select the field from the left-hand column and copy it.
In the following example, this is copying the Merge Field for "Addressee". - Paste the field into your Word document in the location that you want to show the contents of the field.
Using the Word Insert Field Function
- Open the Word document you will be using in the FYI Template or Stationery.
- Go to the location in the Word document that you want to show the contents of the field.
- From the Word ribbon menu, select Insert - Quick Parts - Field.
- Select the Field named MergeField.
- Enter the name of the field exactly as shown in the FYI Merge Fields.docx.
- Click OK to add it to the Word document.
The following example shows the Merge Field "Addressee" from your practice management software being added.
When the Merge Field has been added to a Word document, it shows as follows in the document:
Refer below to Checking Merge Fields in Word to toggle the Merge Field to see these as the code used in Word.
Merge Fields for Custom Fields
If you have set up Custom Fields in your practice management software, or UDFs in GreatSoft, or added Custom Fields directly in FYI, you can include Merge Fields for these in Templates and Stationery.
Custom Fields can be used, for example, to distinguish the client type (such as A, B or C grade clients) to record additional address or contact information, or for other indicators. Custom Fields display in the Client - Custom Fields and Job - Custom Fields tabs in FYI.
When including Custom Fields in Word Templates and Stationery, you add them as Merge Fields from the Word Field function.
- The example below is for Custom Fields from Xero Practice Manager which have the prefix XPM_custom.
- For Custom Fields from GreatSoft, these are added in the same way but with the prefix to the Field name entered as greatsoft_custom.
- For Custom Fields added in FYI (refer to Managing Custom Fields) they are added in the same way but with the prefix to the Field name entered as FYI_custom_
- For Custom Fields from the Generic Practice Management Software using the FYI CSV importer, these are added in the same way, but the prefix to the Field name entered as FYI_custom.
The Field name of Merge Field in Word must be entered as follows:
- The Field name must exactly match the Custom Field name in your practice management software or as set up in FYI.
- Prefix the Merge Field as follows to indicate its source:
- For Custom Fields from Xero Practice Manager prefix the Field name with XPM_custom_
- For GreatSoft Custom Fields (synced from GreatSoft UDFs) prefix the Field name with greatsoft_custom.
- For Custom Fields added in FYI (refer to Managing Custom Fields) prefix the Field name with FYI_custom_
- For Generic Practice Management Software using the FYI CSV importer, prefix the Field name with FYI_custom.
- For Custom Fields from Xero Practice Manager prefix the Field name with XPM_custom_
- For Custom Field names with spaces, replace the space with an underscore (_).
- For Custom Field names with full stops (.) or any other special characters (such as , or &) remove these characters.
For example (for Custom Fields synced from Xero Practice Manager):
For a Custom Field Types, the Merge Field Name is entered as XPM_custom_Types
For a Custom Field Skype Call, the Merge Field Name is entered as XPM_custom_Skype_Call
For a Custom Field z2.1. Name, the Merge Field Name is entered as XPM_custom_z21_Name
Adding Merge Fields for Custom Fields
Note: The following example shows a Custom Field from Xero Practice Manager or setup in FYI (with the prefix XPM_custom_).
Custom Fields from GreatSoft are added in the same way but with the prefix greatsoft_custom_
Custom Fields added in FYI use the prefix FYI_custom_,
Custom Fields imported with the Generic Practice Management Software using the FYI CSV importer, prefix the Field name with FYI_custom_.
- From the Word ribbon menu, select Insert - Quick Parts - Field.
- Select the Field name MergeField.
- Enter the Field name as XPM_custom_fieldname (where fieldname is the Custom Field with any spaces replaced by an underscore).
- Click OK.
When the Merge Field is added to the Word document it shows with angled brackets, for example,
«XPM_custom_Skype_Call»
Merge Fields for Custom Fields that are Maintained in FYI
Custom Fields and Custom User Roles that have been added in FYI can be added to Word Templates and Stationery.
Note: Maintaining or adding Custom Fields in FYI does not work with GreatSoft.
Important note: When adding a Merge Field that has been added in FYI, you need to add the prefix as "FYI_custom_".
As an example, a Custom User Role "Bookkeeper" added in FYI displays in the Email Template Editor as
{{ XPM_custom_Bookkeeper }}
When adding this as a Merge Name in a Word Template or Stationery, it needs to be changed so it is added as FYI_custom_Bookkeeper.
Updating Merge Fields
You can make any changes to Templates or Stationery that include Merge Fields by editing it directly in FYI using Word desktop. Refer to Making Changes to a Template in Creating Templates for Word, Spreadsheet or Presentation.
To change a Merge Field in a Word document:
- Right-click on the Merge Field and select Edit Field.
- The Field pop-up displays. Make any changes as needed and click OK.
- Right-click again on the Merge Field and select Update Field.
Today's Date
There are two ways to add 'today's date' to a document via an FYI template or stationery. Use whichever is appropriate for if you want the date updated when a document is reopened, or if you want to retain the original creation date.
- FYI CreatedDate Merge Field
Using the FYI CreatedDate Merge Field, adds the current 'today's date' when a document created from the template/stationery and this original creation date is retained whenever the document is opened or downloaded. - Office Date field
Using the Date field will add 'today's date' when the document is created from the template/stationery, but it will reset the date to the current date whenever the document is opened or downloaded.
FYI CreatedDate Merge Field
To include the FYI "CreatedDate" Merge Field:
- Copy the «CreatedDate» Merge Field from the FYI Merge Fields.docx.
or
- From the Word ribbon menu select Insert - Quick Parts - Fields
- In the list of Field names, Select the field "MergeField".
- Enter the Field name as CreatedDate.
- Click OK to add the field.
Formatting the CreatedDate Merge Field
You can add a switch to the Merge Field to format the date. This allows you to set it to display, for example, as 5 Feb 2021, as 5 February 2021, Friday, 5 February 2021, etc.
- Edit the Word Template or Stationery using the desktop version of Word.
- Right-click over the CreatedDate merge field.
- From the Word pop-up menu, select Toggle Field Codes.
The Merge Fields displays as a code in your Word document and shows as follows:
{MERGEFIELD CreatedDate }
or as
{MERGEFIELD CreatedDate \* MERGEFORMAT} - Add the formatting switch using the examples below.
Ensure there is a space after the word CreatedDate, after the opening bracket { and before the closing bracket }.
If \* MERGEFORMAT is shown, the switch should replace this.
Merge Field Code | Displayed Result (for a date 5th February 2021) |
{ MERGEFIELD CreatedDate \@ “dddd, d MMMM yyyy” } | Friday, 5 February 2021 |
{ MERGEFIELD CreatedDate \@ “ddd, d MMMM yyyy” } | Fri, 5 February 2021 |
{ MERGEFIELD CreatedDate \@ “d MMM yyyy” } | 5 Feb 21 |
{ MERGEFIELD CreatedDate \@ “MMM d yyyy” } | Feb 5 21 |
{ MERGEFIELD CreatedDate \@ “dd/MM/yy” } | 05/02/21 |
Note: In the Word formatting, m is used for minutes in a date/time field. Use M (capital M) for month.
Office Date Field
To include the Office "Date" Field:
- From the Word ribbon menu select Insert - Quick Parts - Field
- In the list of Field names, select the field "Date".
- Select the format required.
- Click OK to add the field.
Checking Merge Fields in Word
If the correct value is not being pulled in for a Merge Field, you can check the actual value in the Word Template or Stationery.
Note: In Word, it is possible to change the text of the Merge Field without changing the field itself.
- Edit the Word Template or Stationery using the desktop version of Word.
- Right-click on the Merge Field in question.
- From the Word pop-up menu, select Toggle Field Codes.
Or, to show all the Merge Fields as code in your Word document, click Alt+F9.
For example, if you have Merge Field «OwnerName» this should show as follows:
{MERGEFIELD OwnerName }
or as
{MERGEFIELD OwnerName \* MERGEFORMAT}
When you toggle the Word Field Code, if it shows a different Merge Field, this is the value that will be pulled in.
For example, if «OwnerName» is showing as {MERGEFIELD Manager \* MERGEFORMAT} it will pull in the Manager name, not the Owner. - To correct a field, copy it in again from the FYI Merge Fields.docx
or
Right-click over it in Word and select Edit Field, then enter the correct name as per the document FYI Merge Fields.docx.
Conditional Merge Fields
Word supports conditional merge fields.
Note: The following example shows a Custom Field from Xero Practice Manager or set up in FYI, with the prefix XPM_custom_
Custom Fields from GreatSoft are added in the same way but with the prefix greatsoft_custom_
Custom Fields added in FYI use the prefix FYI_custom_,
Custom Fields imported with the Generic Practice Management Software using the FYI CSV importer, prefix the Field name with FYI_custom_.
For example, you can use a conditional merge field if you wanted to use a Custom Merge Field "Preferred_Name" if this was available, or if these is not available use the Merge Field "Salutation". For this example (of the Custom Field "Preferred_Name" and the merge field "Salutation), you would add the conditional Merge Fields to the Template or Stationery in FYI with conditions as in the following example.
Dear { IF { MERGEFIELD XPM_custom_Preferred_Name } = "" { MERGEFIELD Salutation }{ MERGEFIELD XPM_custom_Preferred_Name } \* MERGEFORMAT}
Note: You need to right-click and use the Word function Toggle Field Codes to see the conditions. When Field codes are not enabled, the example above would show as Dear «XPM_Preferred_Name»
Replace "Preferred_Name" or "Salutation" in the example above as relevant to use different Custom Fields or Merge Fields.
Refer to Microsoft Word help for more information on using conditional merge fields.
Download Files