The EXM extensibility points
You can extend the logic of EXM processing pipelines and message events with your own implementation.
The EXM component has the following extensibility points:
- SubscribeEvent pipeline
- UnsubscribeFromList pipeline
- UnsubscribeFromAllEvent pipeline
- redirectUrl pipeline
SubscribeEvent pipeline
The SubscribeEvent pipeline is activated when a contact subscribes to any recipient list.
Processors should be derived from SubscribeEventProcessor:
Namespace: Sitecore.Modules.EmailCampaign.Core.Pipelines
Assembly: Sitecore.EmailCampaign (Sitecore.EmailCampaign.dll)
UnsubscribeFromList pipeline
This pipeline is activated for each subscribed list when a contact unsubscribes from a message.
Namespace: Sitecore.EmailCampaign.Cm.Pipelines.UnsubscribeFromList
Assembly: Sitecore.EmailCampaign.Cm (Sitecore.EmailCampaign.Cm.dll)
Configuration file: Sitecore.EmailExperience.ContentManagementPrimary.config
Pipeline argument type: UnsubscribeFromListPipelineArgs
| Processor Name | Description |
|---|---|
| GetList | This processor sets the ContactList from the provided List ID. |
| CheckDefaultExcludeCollection | This processor verifies if the list is segmented. If it is segmented, the rest of the pipeline is ignored. |
| CheckSegmentedList | This processor verifies whether the list is segmented. If it is segmented, the rest of the pipeline is ignored. |
| CheckSubscription | This processor verifies whether the contact is already subscribed. If the contact is not subscribed to the list, the rest of the pipeline is ignored. |
| UnsubscribeContact | This processor unsubscribes the contact from the list. This processor does not support segmented lists. |
| SendNotification | This processor checks the contact if the StandardMessages.UnsubscribeNotification is set and sends an unsubscribe notification. |
To add support for segmented lists to this pipeline:
-
Remove the
CheckSegmentedListprocessor. -
Replace the
UnsubscribeContactprocessor with your own (adding support for segmented lists).
The following example checks for list type:
args.ContactList.ContactListDefinition.Type == ListType.SegmenedList
Set args.IsSuccesful to false and abort the pipeline if your unsubscribe process fails. This allows the SubscriptionManager to add the contact to global opt-out list.
UnsubscribeFromAllEvent pipeline
The UnsubscribeFromAllEvent pipeline is activated when a contact unsubscribes from all of the recipient lists.
Processors should be derived from UnsubscribeFromAllEventProcessor:
Namespace: Sitecore.Modules.EmailCampaign.Core.Pipelines
Assembly: Sitecore.EmailCampaign (Sitecore.EmailCampaign.dll)
reDirectURL pipeline
During the dispatch process, all the links in the message body are replaced with a link to RedirectUrlPage.aspx including additional query string parameters such as contact identifier and message id. The RedirectUrlPage.aspx file runs the reDirectUrl pipeline that, for example, adds click events based on the query string parameters. After running the pipeline, the RedirectUrlPage.aspx file redirects the contacts to the actual link.