You can include Merge Fields in a Word Template or Stationery to bring in content from Xero Practice Manager 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.
Downloading the FYI Merge Fields.docx
Download the FYI Merge Fields.docx for a list of Merge Fields that you can copy and paste into your Templates and Stationery.
Important Note: Adding Merge Fields needs to 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 the Edit from Desktop function.
Client information from Xero Practice Manager
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 Xero Practice Manager
For example the client's Name, Contact Name, Addressee, Salutation is retrieved from Xero Practice Manager 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 Xero Practice Manager
For example, the Author's Name and Author's Phone
These examples are added as «AuthorName», «AuthorPhone»
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 Author or Owner of the document that is created.
These are added with the Merge Fields «AuthorRole», «AuthorQualifications», «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 Xero Practice Manager, 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 can only be used in the FYI pre-configured processes for Tax Assessments as these processes are triggered by tax returns and assessments (refer to the section Xero Tax Automations). If these Tax Merge Fields are used in any other processes (such as Custom Processes) the source of these will not be known and the Merge Fields will not retrieve any data. Refer 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.
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 Xero Practice Manager being added.
Merge Fields for Custom Fields
If you have set up Custom Fields in your Xero Practice Manager (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) you can include Merge Fields for these Custom Fields in Templates and Stationery. Custom Fields display on the Client - Details tab in FYI.
You need to add these as Merge Fields from the Word Field function.
The Field name of Merge Field in Word must be entered as follows:
- The Field name must exactly match the Custom Field name in Xero Practice Manager.
- Prefix the Field name with XPM_custom_
- For Custom Field names with spaces, replace the space with an underscore (_).
For example:
Custom Field Types is entered as XPM_custom_Types
Custom Field Skype Call is entered as XPM_custom_Skype_Call
Adding Merge Fields for Custom Fields
- 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.
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.
- 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 «AuthorName» this should show as follows:
{MERGEFIELD AuthorName }
or as
{MERGEFIELD AuthorName \* 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 «AuthorName» is showing as {MERGEFIELD Manager \* MERGEFORMAT} it will pull in the Manager name, not the Author. - 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.
For example, if you wanted to use a Custom Merge Field "Preferred_Name" if this was available, otherwise 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.
Comments
0 comments
Please sign in to leave a comment.