SharePoint 2010 allows you to create custom alert templates per list, meaning you can customize what’s going to show up in your SPList alert body.

In this example I won’t focus how you can actually edit the alert CAML – you can figure it out based on existing list of templates, let`s see what`s involved in creating a new alert template and assigning it to the list:

1. Create a new Visual Studio 2010 SharePoint solution.

2. Map a TEMPLATES folder in your solution directory and create a new folder underneath it called XML. This XML folder will contain an XML file that will define your alerts.

4. Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML on your file system and open alerttemplates.xmlthis is out-of-the-box alert definition that you should not modify. Take a loot at the structure of the file and how each alert is defined.

5. Copy alert definition of the list type that closely resembles what you want your new alert to look like ad paste it into your solutions custom alert XML file. If we were to copy generic list template – everything including the XML below would have to be copied:

<AlertTemplate Type="List"

Name="SPAlertTemplateType.GenericList">
</AlertTemplate>

6. Make any adjustments to the custom alert CAML (this is something you will have to figure out based your needs).

7. Create a new site scoped feature which will add our custom alert template to the list of your choice and not to any other on the site.

8. Add a receiver to the feature and in FeatureActivated method place the following code:

Above is going to take care of loading the template and assigning it to the list.

Now when this code is executed and template loaded to the list – new alert that are triggered with the template are going to come with the definition you have specified in your custom alert template file.