Store Content in IDOL Server > Process Data before you Index > Alert Users to New Content > Create Templates for E-mail Alerts

Create Templates for E-mail Alerts
You determine the layout of alert e-mail messages using templates. For each Alert task that you set up in the IDOL server configuration file, you can use these settings to specify which templates to use:
*
Template. The template that IDOL server uses for alert e-mails without attachments.
*
AttachmentTemplate. The template that IDOL server uses for alert e-mails with attachments.
You must specify both of these templates in the IDOL server configuration file. In the default IDOL server configuration file, both settings point to the alertTemplate.html template, which is located in the templates subdirectory of the IDOL server res directory. You can save this template with a different name and customize it according to your requirements.
To create a new template
1.
Open the alertTemplate.html template file in a text editor and save it with a new name. Alternatively, you can create a new file.
2.
 
A document reference
If you type the previous string in the template and the document DREREFERENCE field contains the value http://news.bbc.co.uk/index.html, the alert e-mail contains the following text:
If you type the previous string in the template and the document DRETITLE field contains the value Tropical fish, the alert e-mail contains the following text:
If you type the previous string in the template and the document DRECONTENT field contains the value Brine shrimp: popular with aquarists. High in protein and a nice snack for many freshwater fish, the alert e-mail contains the following text:
Brine shrimp: popular with aquarists. High in protein and a nice snack for many freshwater fish
 
NOTE Enter the fields in the position you want to display them in the e-mail.
3.
If you configured the TemplateNames and TemplateMappings parameters in your Alert task, you can add any fields that you configured to the template. For example:
[AlertTask]
...
TemplateNames=DOCUMENTDATE
TemplateMappings=DREDATE
Then, you can enter the following in the template:
Document date: DOCUMENTDATE
If the document DREDATE field contains the value 01/01/2010, the alert e-mail contains the following text:
Document date: 01/01/2010
4.
If you set the SendToList configuration parameter to false, you can display the following fields in a template. If SendToList is set to true, IDOL server sends a single e-mail to all users, so you cannot display separate user and agent details in the e-mail message.
 
Link terms (terms in the document that match terms in the agent)
If you enter the previous string in the template, and the stemmed terms cat, dog and bird in a document match terms in an agent, the alert e-mail contains the following text:
The agent’s relevance to the document
If you enter the previous string in the template, and a result agent has a conceptual similarity of 78 percent to the document, the alert e-mail contains the following text:
If you enter the previous string in the template, and a document AGENTTRAINING field contains the value Dry-fly fishing for Woolhead Sculpins and Leadhead Muddlers, eager browns, rainbows, and cutts, the alert e-mail contains the following text:
Training text: Dry-fly fishing for Woolhead Sculpins and Leadhead Muddlers, eager browns, rainbows, and cutts
If you enter the previous string in the template, and the name of the agent that the document matches is Fishing, the alert e-mail contains the following text:
The name of the user to whom the e-mail is sent
If you enter the previous string in the template, and the user name is John Smith, the alert e-mail contains the following text:
5.
Related Topics 
*
*