Set up contact/client letters

IT Manager Practice Admin

Before the Client Letters dashlet can be used, the Letters templates must first be created. These templates are Microsoft Word documents that make use of the bookmarks. A sample template called Mailmerge.docx is supplied with a standard installation and can be used as a starting point for creating additional templates.

Letters will only work for On Premise instances of IRIS Practice Engine.

Documents can be created using the Contact and Clients letters dashlets. These dashlets populate a letter template with contact information from the Contact or Client.

Create the template

  1. Open the Mailmerge.docx file from within the Inetpub\wwwroot\PracEng\Letters folder on the web server. This file lists the default fields that can be used in a letter.

  2. Create the wording of the letter template, cutting the fields that are to be used into the correct place within the document.

  3. Save the document into the Inetpub\wwwroot\PracEng\Lettersfolder on the web server.

The template includes placeholders for:

FIELD DESCRIPTION
<<TODAY>> Inserts today’s date.
<<CONTINDEX>> Inserts the ContIndex of the contact.
<<CONTINDEX>> Inserts the ContIndex of the contact.
<<CONTNAME>> Inserts the contacts name.
<<CONTSALUTATION>> Inserts the contacts salutation.
<<CONTSALUTATION>> Inserts the contacts salutation.
<<ADDRESS>> Inserts the clients/ contacts address.
<<CLIENTINDEX>> Inserts the ContIndex of the client.
<<CLIENTCODE>> Inserts the Client Code of the client.
<<CLIENTCODE>> Inserts the Client Code of the client.
<<CLIENTNAME>> Inserts the Client Name of the client.
<<STAFFINDEX>> Inserts the Staff Index of the creator of the letter. (the logged in staff member).
<<STAFFCODE>> Inserts the Staff Code of the creator of the letter.
<<STAFFNAME>> Inserts the Staff Name of the creator of the letter.
<<PARTNERINDEX>> Inserts the Staff Index of the client partner associated with the client.
<<PARTNERCODE>> Inserts the Staff Code of the client partner associated with the client.
<<PARTNERNAME>> Inserts the Staff Name of the client partner associated with the client.
<<MANAGERINDEX>> Inserts the Staff Index of the client manager associated with the client.
<<MANAGERCODE>> Inserts the Staff Code of the client manager associated with the client.
<<MANAGERNAME>> Inserts the Staff Name of the client manager associated with the client.

If multiple instances of the same field are required then these will need to be added as additional fields in the stored procedure. See the next section.

Creating New Fields

Additional fields can be created by adjusting the stored procedure and adding the additional fields as bookmarks to the document.

  1. Open the stored procedure pe6_Contact_Letter_Details.

  2. Modify the stored procedure to return the additional fields that are required.

  3. Within the template, add the field that is required in the form «Today».

  4. Create a bookmark within the document for the field. The bookmark name must be the same as the fieldname in the stored procedure. For instance if the Client Year End is returned in the stored procedure as CltYearEnd then the bookmark needs to be called CltYearEnd.

Link the template to the dashlet

The letter template needs to be linked to the Contact/ Client dashlets. This is achieved by creating a Letters category.

  1. Select Admin > Categories from the menu.

  2. Select Main Categories from the list, then select Job Note Types.

  3. Click Add (or View/Edit to edit an existing category).

  4. Enter a Description for the template.

  5. Enter the exact File Name including the file extension of the letter template.

  6. Select Valid for Clients or Valid for Contacts as applicable.

  7. Select the permission groups who will be able to view and use the letter template from the Available to section.