# Notifications

Umbraco Workflow uses Notifications to allow you to hook into the processes for the backoffice. For example, you might want to execute some code every time an approval group is updated. Notifications allow you to do that. For more information on how Umbraco implements Notifications, see the [Using Notifications](https://docs.umbraco.com/umbraco-cms/reference/notifications) article.

## Notifications

All notifications reside in the `Umbraco.Workflow.Core.Notifications` namespace and are postfixed with `Notification`.

Typically, available notifications exist in pairs, with a "before" and "after" notification. For example, the `SettingsService` class publishes both a `WorkflowSettingsSavingNotification` and a `WorkflowSettingsSavedNotification` when settings are modified.

Which one you want to use depends on what you want to achieve. If you want to cancel the action, you will use the "before" notification and use the CancelOperation method on the notification to cancel it. If you want to execute some code after the settings have been updated, then you would use the "after" notification.

## ContentReviewService Notifications

| Notification                                                | Members                                                                                                                                                                          | Description                                                                                                                                                                                                                                            |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| WorkflowContentReviewsConfigSavingNotification              | <ul><li>IEnumerable SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                                         | <p>Published when ContentReviewService.SaveContentReviewConfig is called in the API.<br>SavedEntities: Gets the collection of IWorkflowConfig objects being saved.</p>                                                                                 |
| WorkflowContentReviewsConfigSavedNotification               | <ul><li>IEnumerable SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                                             | <p>Published when ContentReviewService.SaveContentReviewConfig is called in the API after the entities have been saved.<br>SavedEntities: Gets the collection of saved IWorkflowConfig objects.</p>                                                    |
| WorkflowContentReviewsEmailNotificationsSendingNotification | <ul><li>Dictionary\<UserGroupPoco, List\<ContentReviewConfigPoco>> Target</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when ContentReviewReminderEmailer.SendReviewReminders is called in the API before email notifications are sent.<br>Target: Gets a dictionary containing information about the nodes requiring review, and the assigned review groups.</p> |
| WorkflowContentReviewsEmailNotificationsSentNotification    | <ul><li>Dictionary\<UserGroupPoco, List\<ContentReviewConfigPoco>> Target</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when ContentReviewReminderEmailer.SendReviewReminders is called in the API after email notifications are sent.<br>Target: Gets a dictionary containing information about the nodes requiring review, and the assigned review groups.</p>  |
| WorkflowContentReviewsReviewingNotification                 | <ul><li>ContentReviewNodePoco Target</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                                      | <p>Published when ContentReviewService.MarkAsReviewed is called in the API before the node review status is updated.<br>Target: Get an object with information about the node being reviewed.</p>                                                      |
| WorkflowContentReviewsReviewedNotification                  | <ul><li>ContentReviewNodePoco Target</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                                          | <p>Published when ContentReviewService.MarkAsReviewed is called in the API after the node review status is updated.<br>Target: Get an object with information about the reviewed node.</p>                                                             |

## ConfigService Notifications

| Notification                                  | Members                                                                                                                                                      | Description                                                                                                                                                                                                                                                               |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| WorkflowContentTypeConfigDeletingNotification | <ul><li>IEnumerable\<IWorkflowConfig> DeletedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when ConfigService.DeleteContentTypeConfig is called in the API before the config items are deleted.<br>DeletedEntities: Gets the collection of IWorkflowConfig objects being deleted.</p>                                                                   |
| WorkflowContentTypeConfigDeletedNotification  | <ul><li>IEnumerable\<IWorkflowConfig> DeletedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when ConfigService.DeleteContentTypeConfig is called in the API after the config items are deleted.<br>DeletedEntities: Gets the collection of deleted IWorkflowConfig objects. Note these items are no longer in the database and exist only in memory.</p> |
| WorkflowContentTypeConfigSavingNotification   | <ul><li>IEnumerable\<IWorkflowConfig> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>   | <p>Published when ConfigService.UpdateContentTypeConfig is called in the API.<br>SavedEntities: Gets the collection of IWorkflowConfig objects being saved.</p>                                                                                                           |
| WorkflowContentTypeConfigSavedNotification    | <ul><li>IEnumerable\<IWorkflowConfig> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                       | <p>Published when ConfigService.UpdateContentTypeConfig is called in the API after the entities have been saved.<br>SavedEntities: Gets the collection of saved IWorkflowConfig objects.</p>                                                                              |
| WorkflowNodeConfigDeletingNotification        | <ul><li>IEnumerable\<IWorkflowConfig> DeletedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when ConfigService.DeleteNodeConfig is called in the API before the config items are deleted.<br>DeletedEntities: Gets the collection of IWorkflowConfig objects being deleted.</p>                                                                          |
| WorkflowNodeConfigDeletedNotification         | <ul><li>IEnumerable\<IWorkflowConfig> DeletedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when ConfigService.DeleteNodeConfig is called in the API after the config items are deleted.<br>DeletedEntities: Gets the collection of deleted IWorkflowConfig objects. Note these items are no longer in the database and exist only in memory.</p>        |
| WorkflowNodeConfigSavingNotification          | <ul><li>IEnumerable\<IWorkflowConfig> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>   | <p>Published when ConfigService.UpdateNodeConfig is called in the API.<br>SavedEntities: Gets the collection of IWorkflowConfig objects being saved.</p>                                                                                                                  |
| WorkflowNodeConfigSavedNotification           | <ul><li>IEnumerable\<IWorkflowConfig> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                       | <p>Published when ConfigService.UpdateNodeConfig is called in the API after the entities have been saved.<br>SavedEntities: Gets the collection of saved IWorkflowConfig objects.</p>                                                                                     |

## NotificationsService Notifications

| Notification                                  | Members                                                                                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| WorkflowEmailNotificationsSendingNotification | <ul><li>IEnumerable\<IWorkflowInstance> Target</li><li>EmailType EmailType</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                     | <p>Published when NotificationsService.SendEmailNotifications is called in the API before email notifications are generated and sent.<br>Target: Gets the object describing the workflow instance used to build the email messages<br>EmailType: Gets the enum value describing the email type</p>                                                                                                                                    |
| WorkflowEmailNotificationsSentNotification    | <ul><li>IHtmlEmailModel Target</li><li>List\<EmailUserModel> Recipients</li><li>EmailType EmailType</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                | <p>Published when WorkflowReminderEmailer.Send is called in the API after email notifications are sent.<br>Target: Gets the object describing the email<br>Recipients: Gets the collection of email recipients<br>EmailType: Gets the enum value describing the email type</p>                                                                                                                                                        |
| WorkflowEmailRemindersSendingNotification     | <ul><li>IEnumerable\<IWorkflowInstance> Target</li><li>EmailType EmailType</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                     | <p>Published when NotificationsService.SendEmailReminders is called in the API before email notifications are generated and sent.<br>Target: Gets the collection of objects describing the workflow instances used to build the email messages<br>EmailType: Gets the enum value describing the email type. Will always be <code>EmailType.Reminder</code></p>                                                                        |
| WorkflowEmailRemindersSentNotification        | <ul><li>IEnumerable\<IWorkflowInstance> Target</li><li>List\&EmailTaskListModel> Tasks</li><li>EmailType EmailType</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul> | <p>Published when WorkflowReminderEmailer.Send is called in the API after email notifications are sent.<br>Target: Gets the collection of objects describing the workflow instances used to build the email messages<br>Tasks: Gets the collection of objects describing the overdue workflows for each notified user<br>EmailType: Gets the enum value describing the email type. Will always be <code>EmailType.Reminder</code></p> |

## GroupService Notifications

| Notification                      | Members                                                                                                                                                     | Description                                                                                                                                                                                |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| WorkflowGroupCreatingNotification | <ul><li>IWorkflowGroup SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                 | <p>Published when GroupService.CreateUserGroupAsync is called in the API before the entity is created.<br>CreatedEntity: Gets the created IWorkflowGroup object.</p>                       |
| WorkflowGroupCreatedNotification  | <ul><li>IWorkflowGroup SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                     | <p>Published when GroupService.CreateUserGroupAsync is called in the API after the entity has been created.<br>CreatedEntity: Gets the created IWorkflowGroup object.</p>                  |
| WorkflowGroupDeletingNotification | <ul><li>IEnumerable\<IWorkflowGroup> DeletedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when GroupService.DeleteUserGroupAsync is called in the API before the group is deleted.<br>DeletedEntities: Gets the collection of IWorkflowGroup objects being deleted.</p> |
| WorkflowGroupDeletedNotification  | <ul><li>IEnumerable\<IWorkflowGroup> DeletedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when GroupService.DeleteUserGroupAsync is called in the API after the group is deleted.<br>DeletedEntities: Gets the collection of deleted IWorkflowGroup objects.</p>        |
| WorkflowGroupSavingNotification   | <ul><li>IEnumerable\<IWorkflowGroup> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>   | <p>Published when GroupService.UpdateUserGroupAsync is called in the API before the group is updated.<br>SavedEntities: Gets the collection of IWorkflowGroup objects being saved.</p>     |
| WorkflowGroupSavedNotification    | <ul><li>IEnumerable\<IWorkflowGroup> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                       | <p>Published when GroupService.UpdateUserGroupAsync is called in the API after the group is updated.<br>SavedEntities: Gets the collection of saved IWorkflowGroup objects.</p>            |

## WorkflowProcess Notifications

| Notification                             | Members                                                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| WorkflowInstanceApprovingNotification    | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when WorkflowProcess.ActionWorkflow is called in the API before the workflow stage is approved.<br>Target: Gets the IWorkflowInstance object being approved.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Approve.</p>                                                                                                                                                    |
| WorkflowInstanceApprovedNotification     | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when WorkflowProcess.ActionWorkflow is called in the API after the workflow stage is approved.<br>Target: Gets the approved IWorkflowInstance object.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Approve.</p>                                                                                                                                                           |
| WorkflowInstanceCancellingNotification   | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when WorkflowProcess.ActionWorkflow is called in the API before the workflow stage is cancelled.<br>Target: Gets the IWorkflowInstance object being cancelled.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Cancel.</p>                                                                                                                                                   |
| WorkflowInstanceCancelledNotification    | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when WorkflowProcess.ActionWorkflow is called in the API after the workflow stage is cancelled.<br>Target: Gets the cancelled IWorkflowInstance object.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Cancel.</p>                                                                                                                                                          |
| WorkflowInstanceCompletedNotification    | <ul><li>IWorkflowInstance Target</li><li>WorkflowType WorkflowType</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                 | <p>Published when WorkflowProcess.HandleCompleteNow or WorkflowProcess.HandleCompleteLater is called in the API after the workflow is completed.<br>Target: Gets the completed IWorkflowInstance object.<br>WorkflowType: Gets the WorkflowType enum value representing the workflow type. Will be either Publish or Unpublish.</p>                                                                                 |
| WorkflowInstanceCreatingNotification     | <ul><li>IWorkflowInstance CreatedEntity</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                        | <p>Published when WorkflowProcess.InitiateWorkflow is called in the API before the workflow is initiated.<br>CreatedEntity: Gets the IWorkflowInstance object being created.</p>                                                                                                                                                                                                                                    |
| WorkflowInstanceCreatedNotification      | <ul><li>IWorkflowInstance CreatedEntity</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                            | <p>Published when WorkflowProcess.InitiateWorkflow is called in the API after the workflow is initiated.<br>CreatedEntity: Gets the created IWorkflowInstance object.</p>                                                                                                                                                                                                                                           |
| WorkflowInstanceRejectingNotification    | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when WorkflowProcess.ActionWorkflow is called in the API before the workflow stage is rejected.<br>Target: Gets the IWorkflowInstance object being rejected.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Reject.</p>                                                                                                                                                     |
| WorkflowInstanceRejectedNotification     | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when WorkflowProcess.ActionWorkflow is called in the API after the workflow stage is rejected.<br>Target: Gets the rejected IWorkflowInstance object.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Reject.</p>                                                                                                                                                            |
| WorkflowInstanceResubmittingNotification | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow stage is resubmitted.<br>Target: Gets the IWorkflowInstance object being resubmitted.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Resubmit.</p>                                                                                                                                           |
| WorkflowInstanceResubmittedNotification  | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow stage is resubmitted.<br>Target: Gets the resubmitted IWorkflowInstance object.<br>Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Resubmit.</p>                                                                                                                                                  |
| WorkflowInstanceUpdatingNotification     | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Base notification class for Approving, Cancelling, Creating, Rejecting, Resubmitting. Can be used in place of these, using the Action value to identify the executed workflow action.<br>Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow is updated.<br>Target: Gets the IWorkflowInstance object being updated.<br>Action: Gets the WorkflowAction being executed.</p> |
| WorkflowInstanceUpdatedNotification      | <ul><li>IWorkflowInstance Target</li><li>WorkflowAction Action</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Base notification class for Approved, Cancelled, Created, Rejected, Resubmitted. Can be used in place of these, using the Action value to identify the executed workflow action.<br>Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow stage is updated.<br>Target: Gets the updated IWorkflowInstance objects.<br>Action: Gets the WorkflowAction being executed.</p>      |
| WorkflowResubmitTaskCreatingNotification | <ul><li>IWorkflowInstance CreatedEntity</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                        | <p>Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow task is persisted.<br>CreatedEntity: Gets the IWorkflowTask object being created.</p>                                                                                                                                                                                                                                   |
| WorkflowResubmitTaskCreatedNotification  | <ul><li>IWorkflowInstance CreatedEntity</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                            | <p>Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow task is persisted.<br>CreatedEntity: Gets the created IWorkflowTask.</p>                                                                                                                                                                                                                                                 |
| WorkflowTaskCreatingNotification         | <ul><li>IWorkflowInstance CreatedEntity</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                        | <p>Published when WorkflowTaskManager.CreateApprovalTask is called in the API before the workflow task is persisted.<br>CreatedEntity: Gets the IWorkflowTask object being created.</p>                                                                                                                                                                                                                             |
| WorkflowTaskCreatedNotification          | <ul><li>IWorkflowInstance CreatedEntity</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                            | <p>Published when WorkflowTaskManager.CreateApprovalTask is called in the API after the workflow task is persisted.<br>CreatedEntity: Gets the created IWorkflowTask.</p>                                                                                                                                                                                                                                           |
| WorkflowTaskUpdatingNotification         | <ul><li>IWorkflowInstance Target</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul>                               | <p>Published when WorkflowTaskManager.ResubmitWorkflow is called in the API before the workflow task is updated.<br>CreatedEntity: Gets the IWorkflowTask object being updated.</p>                                                                                                                                                                                                                                 |
| WorkflowTaskUpdatedNotification          | <ul><li>IWorkflowInstance Target</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                                                   | <p>Published when WorkflowTaskManager.ResubmitWorkflow is called in the API after the workflow task is updated.<br>CreatedEntity: Gets the updated IWorkflowTask.</p>                                                                                                                                                                                                                                               |

## SettingsService Notifications

| Notification                       | Members                                                                                                                                              | Description                                                                                                                                                                          |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| WorkflowSettingsSavingNotification | <ul><li>IEnumerable\<ISettings> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li><li>bool Cancel</li></ul> | <p>Published when SettingsService.UpdateSettings is called in the API before the settings are saved.<br>SavedEntities: Gets the collection of ISettings objects being saved.<br></p> |
| WorkflowSettingsSavedNotification  | <ul><li>IEnumerable\<ISettings> SavedEntities</li><li>EventMessages Messages</li><li>IDictionary\<string,object> State</li></ul>                     | <p>Published when SettingsService.UpdateSettings SavedEntities: Gets the collection of saved ISettings objects.<br></p>                                                              |
