Automated Templates
As well as providing a mechanism for agents to use standard templates, which they can amend to create a personalised letter or email, the Infinity suite allows you to create a request for a letter, or email, without user interaction.
Fulfilment requests such as these are processed by the Infinity Manager process and produced via the Fulfilment Service, and may require additional configuration depending on the data you wish to merge into the letter or email.
The main difference between a template that is used by the agents and one that is produced automatically is the gathering of the merge data. Templates that are produced automatically will by default only reference the contact record associated with the fulfilment request. If you need to reference additional data fields you will need to create a custom stored procedure on the database.
The custom procedure needs to return a SELECT statement that contains the data fields that will be merged into the template.

CREATE PROC <name> ( @FulfilmentID int, @SysID int, @SubSysID int ) AS BEGIN SELECT field1, field2, field3... FROM table1 t1 JOIN table2 t2 ON t1.field = t2.field WHERE t1.ID = @FulfilmentID END GO |
Once you have you custom procedure you need to specify it in the “Custom SP” field of the template, for the example above it would be entered as:
<name> @FulfilmentID, @SysID, @SubSysID |
Requesting the Letter or Email
In order to request the creation of the letter, or email, the following commands can be used from within the agent workflow.
If you issue a “Create new letter/email from Template”, the system will automatically assign it to the current contact record in context. If you wish to create a request for a different contacts, or provide an ID for the SubID parameter you can use the “Create new letter/email from Template [ ] for ID [ ] and SubID [ ]”. This would allow you to link the request to a different table for example a case or an order.