Modifying the Event Stored Procedure

Before you create the alternate templates and assign them template keys, you need to create or modify the alternate template stored procedure so the application can determine when to use one template over another. If you do not set these rules in the stored procedure, Personify360 continues to use the default template initially assigned to the notification event.

To modify the notification event stored procedure:

1.    Open your notification event procedure in Microsoft SQL Server Management Studio or any other SQL script editor.

2.    Navigate to the first SQL selection statement in your notification event procedure where you select the list of email addresses to receive the notification.

3.    Modify the code to include the rules for when to use a template key making sure to include [TEMPLATE_KEY] in the code.

For example, the code below shows template rules set up to use a specific alternate template when a customer’s preferred language is Spanish.

If you do not include [TEMPLATE_KEY] in the code, the application does not know to search for the alternate template and continues to use the default email template for all emails sent out for the notification event.

The [TEMPLATE_KEY] only needs to be defined once in the very first SQL Selection of e-mail addresses for the notification event procedure.

There is no harm in including it in other SELECT statements within the notification event procedure should you choose to do so.

4.    Click Save.