Creating a template is as easy as creating a normal Word document (.docx). Yet it could be confusing to people who haven't used the Mail Merge feature in Microsoft Word. The steps are as follows:
Insert tab on the ribbonQuick Parts dropdown and select Field...MergeFieldField CodesField codes input box, enter your variable in front of the MERGEFIELD. Notice the space between the MERGEFIELD and the variableMERGEFIELDMERGEFIELD =person.first_name=. Those that just perform logics, such as loops and conditionals, do not need a preceding equals sign.