Modifying Please Review Email Templates - Technical Guide
The email templates are found under Runtime\Config\EmailTemplates.
If you have authentication integrations that are use the Please Review emails, the templates in the folder for them will be used for users that have authentication means instead of the Please Review native one. Note that if a user have multiple authentication means, then it would apply to the one that was added first to them as that becomes considered their primary one. These will be stored in sub folders for the integration and only come into effect if that sub folder doesn't have a .template extension.
The files themselves are plain text files that should be edited in a suitable editor. Notepad on Windows is usually sufficient for these but there are better ones out that handle long lines of text, huge files and colour text better to aid in editing the areas of the file. I am not aware of any long lines or huge files that exist in our email templates so Notepad should be fine if that is all you have. Note that on the Mac if using the bundled TextEdit, be sure this does not save the file in an rtf format and the file remains plain text. It might be prudent to use another plain text editor on the Mac if you are unsure.
The files are .xsl files. There are various sites that explain what these are such as https://www.w3.org/Style/XSL/WhatIsXSL.html, but essentially they are xml files under the hood so you need to follow xml rules. Fundamentally this means that special characters need to be encoded and entered as-us. The key ones you are likely to encounter are <, > and &. If you need to use one of these characters in your text you should replace these with the xml/html entity (&....;) codes shown below :
< = <
> = >l;
& = &If unsure, an easier answer may be to avoid using them at all. ie. use 'and' instead of &, for example.
So the template names correspond to what they are for, and when they are used. NewUser is sent out when users are added to the system and the option to send a send an email is left on or if users are added via a csv import for example, so lets use that email template as an example here...
The first half a dozen lines are configuration lines and generally they should not be touched, then you have the destination address, from and subject. I've explained these in this picture below. You may need to use your browser's zoom feature to enlarge the image to see all the detail here:
The actual email content is in between <body> and </body>. This is where you would normally edit.
If you use a text edit that colours the text, as I suggested you can clearly see the plain text of the email compared to the special bits that are pulled from the system. so "<xsl:value-of" indicates something is being pulled from PR, and then the details of what is being pulled follows this. If you want to insert something but are unsure if you can, look at all the templates and see if you can find one that uses it. Alternatively, if you contact support we can try and see if it can be used.
You can see the black text here is the plain text you can freely edit here. The values inserted you need to be careful if you are considering editing them.
If you see blocks of text in the middle of <xsl:choose>....</xsl:choose> tags, these indicate text that can vary in the email depending on what is happening in the system. So the example in the NewUser email is to display a password reset link if that is applicable, but otherwise tell them to login with their normal username password. The construction of the password reset link spans a few lines but that is what it is doing there. Where you see <xsl:call-template...> is where the included template at the top of the file is being called on for inclusion.
In the case of the choice here, if you added a user with AD authentication, for example, it would not include the password reset link but if you added a native user, it would.
This last bit calls on templates from the footer template. The footer template itself actually calls on the DoNotReply template too. So normally to edit these last bits you would have to edit both the Footer.xsl file and the DoNotReply. The logic here is saying if the from address is the system address, then include the text telling the user not to reply to the email, which can be edited in the DoNotReply.xsl file. After this it then includes the text in the standard-footer text, which can be edited in the Footer.xsl file,
As a general rule, using a text editor that shows makes it easier to differentiate the plain text from the inserted data, or variables, and avoiding <, > and & signs should get you by.
Note that when you make any changes to the templates you need to restart the TaraService service on the Please Review server. If you have a load balanced setup, you need to do this on all the servers. TaraService performs background tasks so this can be restarted at any time, as any doc preparations it is doing will be retried, but do not do so in quick succession as it will only try twice and then fail the preparation incorrectly if you do that.
If you have a test instance, it would be recommended to test the template there. Either way, if you want to resend an email, without doing the necessary work to trigger one, the email status page under Admin can be used for system emails and the email status page from the review control panel can be used to requeue emails relating to reviews. A requeued email will use the latest template provided TaraService has been restarted. The appropriate email status page is also where you can check to see if there was an error from your template editing too.