---
title: Reference - Global system events
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

&#x20; Event categories (classes):

## ObjectEvents

**Namespace**: CMS.DataEngine

Contains events that occur for all types of objects in the system. See also: [Handling object events](https://docs.kentico.com/13/custom-development/handling-global-events/handling-object-events.md)

> **Note:** **Important**
>
> Use the following classes to access the object events in the API:
>
> - **ObjectEvents** – events triggered for all object types
> - **Info.TYPEINFO.Events** – events triggered only for a specific object type, for example: _UserInfo.TYPEINFO.Events_

| Event            | Event types                | Handler parameters                                                                                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Insert           | Before<br>After<br>Failure | ObjectEventArgs<br>**Properties**<br>Object (BaseInfo)                                                                                                                     | Occurs when a new object is created.<br>To reliably handle all possible object creation events, you may also need to assign a matching handler to the **BulkInsert** event. The system triggers the _BulkInsert_ event instead of _Insert_ in certain cases, particularly for operations that can affect multiple objects.                                                                                                                                                                                                                                                                                                                                               |
| Update           | Before<br>After<br>Failure | ObjectEventArgs<br>**Properties**<br>Object (BaseInfo)                                                                                                                     | Occurs when the data of an existing object is updated.<br>To reliably handle all possible object update events, you may also need to assign a matching handler to the **BulkUpdate** event. The system triggers the _BulkUpdate_ event instead of _Update_ in certain cases, particularly for operations that can affect multiple objects.                                                                                                                                                                                                                                                                                                                               |
| Delete           | Before<br>After<br>Failure | ObjectEventArgs<br>**Properties**<br>Object (BaseInfo)                                                                                                                     | Occurs when an object is deleted.<br>To reliably handle all possible object deletion events, you may also need to assign a matching handler to the **BulkDelete** event. The system triggers the _BulkDelete_ event instead of _Delete_ in certain cases, particularly for operations that can affect multiple objects.                                                                                                                                                                                                                                                                                                                                                  |
| BulkInsert       | Before<br>After<br>Failure | BulkInsertEventArgs<br>**Properties**<br>InsertedObjects (IEnumerable)<br>TypeInfo (ObjectTypeInfo)                                                                        | Occurs when the system performs object creation operations that can affect multiple objects. To reliably handle all possible object creation events, assign matching handlers to both the **BulkInsert** and **Insert** events.<br>In certain cases, the system creates objects by directly inserting data into a database table (for example when [importing contacts](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/working-with-contacts/importing-contacts.md) from CSV files). To cover these scenarios, you also need to assign an appropriate handler to the **SqlEvents.BulkInsert** event. |
| BulkUpdate       | Before<br>After<br>Failure | BulkUpdateEventArgs<br>**Properties**<br>ChangedColumns (IEnumerable)<br>TypeInfo (ObjectTypeInfo)<br>WhereCondition (IWhereCondition)                                     | Occurs when the system performs object update operations that can affect multiple objects. To reliably handle all possible object update events, assign matching handlers to both the **BulkUpdate** and **Update** events.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| BulkDelete       | Before<br>After<br>Failure | BulkDeleteEventArgs<br>**Properties**<br>TypeInfo (ObjectTypeInfo)<br>WhereCondition (IWhereCondition)                                                                     | Occurs when the system performs object deletion operations that can affect multiple objects. To reliably handle all possible object deletion events, assign matching handlers to both the **BulkDelete** and **Delete** events.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| GetContent       | Execute                    | ObjectEventArgs<br>**Properties**<br>Content (string)<br>Object (BaseInfo)                                                                                                 | Occurs before the system writes an object's data into [smart search indexes](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website.md) (when building or updating indexes).<br>Allows you to determine exactly how search indexes store object content.<br>**Example**: [Customizing the content of search indexes](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website/customizing-the-content-of-search-indexes.md)                                                                                                                                                                                      |
| LogChange        | Before<br>After<br>Failure | LogObjectChangeEventArgs<br>**Properties**<br>Settings (LogObjectChangeSettings)                                                                                           | Occurs when the system logs object changes for the purposes of staging and integration. For example, allows you to exclude specific objects from staging.<br>**Example**: [Excluding content from staging and integration](https://docs.kentico.com/13/custom-development/handling-global-events/excluding-content-from-staging-and-integration.md)                                                                                                                                                                                                                                                                                                                      |
| CheckPermissions | Before<br>After<br>Failure | ObjectSecurityEventArgs<br>**Properties**<br>Object (BaseInfo)<br>Permission (PermissionsEnum)<br>User (UserInfo)<br>SiteName (string)<br>Result (AuthorizationResultEnum) | Occurs when the system checks [permissions](https://docs.kentico.com/13/managing-users/configuring-permissions.md) for objects of the given type.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Sort             | Before<br>After<br>Failure | ObjectSortEventArgs<br>**Properties**<br>Object (BaseInfo)<br>Ascending (bool)<br>OrderColumn (string)<br>NameColumn (string)                                              | Occurs when sorting of objects is requested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ChangeOrder      | Before<br>After<br>Failure | ObjectChangeOrderEventArgs<br>**Properties**<br>Object (BaseInfo)<br>NewOrder (int)<br>RelativeOrder (int)<br>OrderColumn (string)                                         | Occurs when a change in the order of objects is requested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| GetData          | Before<br>After<br>Failure | ObjectDataEventArgs<br>**Properties**<br>Data (DataSet)<br>Query (IObjectQuery)<br>TotalRecords (int)                                                                      | Occurs when the system retrieves object data using the ObjectQuery API.<br>The **Before** event type is suitable, for example, when you want to retrieve data from an external source. Assign the external data into the **Data** property of the handler's _ObjectDataEventArgs_ parameter, which is empty by default in the Before event.<br>Use the **After** event type if you need to edit the data retrieved from Xperience in the **Data** property.<br>The **TotalRecords** property provides a number of total records in case paging is used. Use _-1_ to use the rows count of the **Data** property.                                                         |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## DocumentEvents

**Namespace**: CMS.DocumentEngine

Contains events fired when changes are made to pages.

> **Note:** **Note**:
>
> Pages under [workflow](https://docs.kentico.com/13/configuring-xperience/configuring-the-environment-for-content-editors/configuring-workflows.md) require a different approach to event handling. Use the events from the [WorkflowEvents](#workflowevents) class instead of _DocumentEvents._
>
> For example, to handle the 'update' action for a page under workflow, use the _SaveVersion_ event from _WorkflowEvents_ instead of the _DocumentEvents.Update_ event.

| Event                      | Event types                | Handler parameters                                                                                                                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Insert                     | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>TargetParentNodeID (int)<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                              | Occurs when a new page is created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| InsertNewCulture           | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                                                          | Occurs when a new culture version is created for a page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| InsertLink                 | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>TargetParentNodeID (int)<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                              | Occurs when creating new [linked pages](https://docs.kentico.com/13/managing-website-content/working-with-pages/copying-and-moving-pages-creating-linked-pages.md).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Update                     | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                                                          | Occurs when an existing page is updated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Move                       | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>TargetParentNodeID (int)<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                              | Occurs when a page is moved to a different position in the site's content tree.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Copy                       | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>TargetParentNodeID (int)<br>IncludeChildren (bool)<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                    | Occurs when a new copy of a page is created.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Delete                     | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                                                          | Occurs when a page is deleted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| LogChange                  | Before<br>After<br>Failure | LogDocumentChangeEventArgs<br>**Properties**<br>Settings (LogDocumentChangeSettings)                                                                                                                           | Occurs when the system logs page changes for the purposes of staging and integration. For example, allows you to exclude specific pages from staging.<br>**Example**: [Excluding content from staging and integration](https://docs.kentico.com/13/custom-development/handling-global-events/excluding-content-from-staging-and-integration.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| CheckPermissions           | Before<br>After<br>Failure | DocumentSecurityEventArgs<br>**Properties**<br>Node (TreeNode)<br>Permission (PermissionsEnum)<br>User (UserInfo)<br>SiteName (string)<br>Result (AuthorizationResultEnum)                                     | Occurs when the system checks [permissions](https://docs.kentico.com/13/managing-users/configuring-permissions/configuring-page-permissions.md) for pages.<br>**Note**: This event does not occur on the live site. For checking permissions on the live site, see the [AuthorizeDocument ](#referenceglobalsystemevents-authorizedocument)event.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Sort                       | Before<br>After<br>Failure | DocumentSortEventArgs<br>**Properties**<br>ParentNodeId (int)<br>Ascending (bool)<br>SortType (DocumentSortEnum)                                                                                               | Occurs when sorting of pages is requested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ChangeOrder                | Before<br>After<br>Failure | DocumentChangeOrderEventArgs<br>**Properties**<br>Node (TreeNode)<br>NewOrder (int?)<br>RelativeOrder (bool)<br>OrderType (DocumentOrderEnum)                                                                  | Occurs when a change in the order of pages is requested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| GetData                    | Before<br>After<br>Failure | DocumentDataEventArgs<br>**Properties**<br>Data (DataSet)<br>Query (IDocumentQuery)<br>TotalRecords (int)                                                                                                      | Occurs when the system retrieves page data using the DocumentQuery API.<br>The **Before** event type is suitable, for example, when you want to retrieve data from an external source. Assign the external data into the **Data** property of the handler's _DocumentDataEventArgs_ parameter, which is empty by default in the Before event.<br>Use the **After** event type, when you want to edit the data retrieved from Xperience in the **Data** property.<br>The **TotalRecords** property provides a number of total records in case paging is used. Use _-1_ to use rows count of the **Data** property.                                                                                                                                                                                                                                                                                                                      |
| Search                     |                            |                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| CreateSearchFields         | Execute                    | CreateSearchFieldsEventArgs<br>**Properties**<br>Fields (IList)<br>IndexInfo (ISearchIndexInfo)<br>IndexDataSource (SearchIndexDataSourceEnum)<br>SearchFields (IEnumerable)                                   | Occurs while (re)building a [locally stored search index](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website/using-locally-stored-search-indexes.md) of the **Pages** type when the system prepares the collection of search fields.<br>Allows developers to add custom search fields to indexes. Such fields must be added via the **Fields** property of the handler's _CreateSearchFieldsEventArgs_ parameter.<br>Values for the custom fields can be assigned for individual pages by handling the **CreateSearchFieldsForPage** event.<br>**Example**: [Customizing the content of search indexes](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website/customizing-the-content-of-search-indexes.md)                                                                                                                                                             |
| CreateSearchFieldsForPage  | Execute                    | CreateSearchFieldsForPageEventArgs<br>**Properties**<br>Fields (IList)<br>IndexInfo (ISearchIndexInfo)<br>IndexDataSource (SearchIndexDataSourceEnum)<br>Page (TreeNode)<br>SearchFields (IEnumerable)         | Occurs when the system indexes or updates a page for a [locally stored search index](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website/using-locally-stored-search-indexes.md) of the **Pages** type. The event triggers separately for each indexed page.<br>Allows developers to add custom search fields to indexes and set their value for individual pages. Such fields must be added via the **Fields** property of the handler's _CreateSearchFieldsForPageEventArgs_ parameter. Set field values using the **Value** property of the added _ISearchField_ object.<br>**Important**: Any custom fields must first be registered into your indexes by handling the **CreateSearchFields** event.<br>**Example**: [Customizing the content of search indexes](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website/customizing-the-content-of-search-indexes.md) |
| GetContent                 | Execute                    | DocumentSearchEventArgs<br>**Properties**<br>Content (string)<br>Node (TreeNode)<br>Settings (SearchIndexSettingsInfo)<br>IndexInfo (ISearchIndexInfo)<br>SearchDocument (ISearchDocument)<br>IsCrawler (bool) | Occurs before the system writes a page's data into a search index (when building or updating indexes).<br>Allows you to determine exactly how search indexes store page content.<br>**Examples**: [Customizing the content of search indexes](https://docs.kentico.com/13/configuring-xperience/setting-up-search-on-your-website/customizing-the-content-of-search-indexes.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Page attachments           |                            |                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| SaveAttachment             | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>Attachment (DocumentAttachment)<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                       | Occurs when a file attachment is added to a page or updated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| DeleteAttachment           | Before<br>After<br>Failure | DocumentEventArgs<br>**Properties**<br>Attachment (DocumentAttachment)<br>Node (TreeNode)<br>TreeProvider (TreeProvider)                                                                                       | Occurs when a file attachment is removed from a page.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Page security              |                            |                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|   AuthorizeDocument        | Execute                    | DocumentAuthorizationEventArgs<br>**Properties**<br>User (UserInfo)<br>Document (TreeNode)<br>PermissionName (string)<br>AuthorizationResult (AuthorizationResultEnum)                                         | Occurs when the system performs a security check for the permissions of a specific page.<br>You can modify the result of the security check by adding your own conditions and setting the **AuthorizationResult** property of the handler's _DocumentAuthorizationEventArgs_ parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| FilterDataSetByPermissions | Execute                    | DocumentAuthorizationEventArgs<br>**Properties**<br>User (UserInfo)<br>Data (DataSet)<br>PermissionName (string)                                                                                               | Occurs when the system filters a set of pages according to the page permissions of a user.<br>You can modify the filtering by adding your own conditions and modifying the page data in the **Data** property of the handler's _DocumentAuthorizationEventArgs_ parameter.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## WorkflowEvents

**Namespace**: CMS.DocumentEngine

Contains events related to [workflow](https://docs.kentico.com/13/configuring-xperience/configuring-the-environment-for-content-editors/configuring-workflows.md) and [versioning](https://docs.kentico.com/13/configuring-xperience/configuring-the-environment-for-content-editors/configuring-and-using-page-versioning.md) actions.

| Event                   | Event types                | Handler parameters                                                                                                                                                                                                  | Description                                                                                                                                                                                                                                                |
| ----------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Approve                 | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>PreviousStep (WorkflowStepInfo) - only in the _After_ event<br>TreeProvider (TreeProvider)                                                            | Occurs when a page is approved to the next step.                                                                                                                                                                                                           |
| Reject                  | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>PreviousStep (WorkflowStepInfo) - only in the _After_ event<br>TreeProvider (TreeProvider)                                                            | Occurs when a page is rejected back to a previous step                                                                                                                                                                                                     |
| Publish                 | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>PublishedDocument(TreeNode) - only in the _After_ event<br>PreviousStep (WorkflowStepInfo) - only in the _After_ event<br>TreeProvider (TreeProvider) | Occurs when a page reaches the published step.                                                                                                                                                                                                             |
| Archive                 | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>PreviousStep (WorkflowStepInfo) - only in the _After_ event<br>TreeProvider (TreeProvider)                                                            | Occurs when a page is archived.                                                                                                                                                                                                                            |
| Action                  | Before<br>After<br>Failure | WorkflowActionEventArgs<br>Requires references to:<br>CMS.WorkflowEngine<br>CMS.DataEngine                                                                                                                          | Occurs when executing [advanced workflow action steps](https://docs.kentico.com/13/configuring-xperience/configuring-the-environment-for-content-editors/configuring-workflows/designing-advanced-workflows/adding-action-steps-in-advanced-workflows.md). |
| Page versioning         |                            |                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                            |
| SaveVersion             | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>VersionHistory (VersionHistoryInfo)<br>VersionNumber (string)<br>VersionComment (string)<br>TreeProvider (TreeProvider)                               | Occurs when the edited version of a page is updated.                                                                                                                                                                                                       |
| SaveAttachmentVersion   | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>Attachment (DocumentAttachment)<br>TreeProvider (TreeProvider)                                                                                        | Occurs when an attachment is updated or inserted for the edited version of a page.                                                                                                                                                                         |
| RemoveAttachmentVersion | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>Attachment (DocumentAttachment)<br>TreeProvider (TreeProvider)                                                                                        | Occurs when an attachment is removed for the edited version of a page.                                                                                                                                                                                     |
| Content locking         |                            |                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                            |
| CheckOut                | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>TreeProvider (TreeProvider)                                                                                                                           | Occurs when a page is checked-out.                                                                                                                                                                                                                         |
| CheckIn                 | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>TreeProvider (TreeProvider)                                                                                                                           | Occurs when a page is checked-in.                                                                                                                                                                                                                          |
| UndoCheckOut            | Before<br>After<br>Failure | WorkflowEventArgs<br>**Properties**<br>Document (TreeNode)<br>TreeProvider (TreeProvider)                                                                                                                           | Occurs when a user performs the undo check-out action.                                                                                                                                                                                                     |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## SecurityEvents

**Namespace**: CMS.Membership

Contains security and authentication events for the Xperience administration interface.

> **Note:** **Note**: _SecurityEvents_ are only raised for the Xperience administration interface. The events do not occur when users sign in or out on the live site, which uses membership functionality based on ASP.NET Identity (as described in [Integrating Xperience membership](https://docs.kentico.com/13/managing-users/user-registration-and-authentication/integrating-xperience-membership.md)).

| Event                   | Event types                | Handler parameters                                                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authenticate            | Execute                    | AuthenticationEventArgs<br>**Properties**<br>User (UserInfo)<br>UserName (string)<br>Password (string)<br>SiteName (string)          | Occurs when authenticating users into the administration interface.<br>**See also**: [Handling custom administration authentication](https://docs.kentico.com/13/custom-development/handling-global-events/handling-custom-administration-authentication.md)                                                                                                                                                  |
| AuthenticationRequested | Execute                    | AuthenticationRequestEventArgs<br>**Properties**<br>RequestedUrl (string)                                                            | Occurs when a user accesses a restricted section of Xperience and the user's authentication is required.                                                                                                                                                                                                                                                                                                      |
| MultiFactorAuthenticate | Execute                    | AuthenticationEventArgs<br>**Properties**<br>User (UserInfo)<br>Passcode (string)<br>UserName (string)                               | Occurs when a user tries to sign in to Xperience with [multi-factor authentication](https://docs.kentico.com/13/managing-users/user-registration-and-authentication/configuring-multi-factor-authentication.md) enabled.<br>**See also**: [Handling custom multi-factor authentication](https://docs.kentico.com/13/custom-development/handling-global-events/handling-custom-multi-factor-authentication.md) |
| AuthorizeResource       | Execute                    | AuthorizationEventArgs<br>**Properties**<br>User (UserInfo)<br>ResourceName (string)<br>PermissionName (string)<br>Authorized (bool) | Occurs when checking permissions for modules.                                                                                                                                                                                                                                                                                                                                                                 |
| AuthorizeClass          | Execute                    | AuthorizationEventArgs<br>**Properties**<br>User (UserInfo)<br>ClassName (string)<br>PermissionName (string)<br>Authorized (bool)    | Occurs when performing security checks for object type or page type permissions.                                                                                                                                                                                                                                                                                                                              |
| AuthorizeUIElement      | Execute                    | AuthorizationEventArgs<br>**Properties**<br>User (UserInfo)<br>ElementName (string)<br>PermissionName (string)<br>Authorized (bool)  | Occurs when checking permissions for UI elements.                                                                                                                                                                                                                                                                                                                                                             |
| SignOut                 | Before<br>After<br>Failure | SignOutEventArgs<br>**Properties**<br>User (UserInfo)<br>SignOutUrl (string)                                                         | Occurs when a user signs out from the administration interface.                                                                                                                                                                                                                                                                                                                                               |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## DataProtectionEvents

**Namespace**: CMS.DataProtection

Contains events related to protection of personal data in the system.

| Event                  | Event types | Handler parameters                                                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| RevokeConsentAgreement | Execute     | RevokeConsentAgreementEventArgs<br>**Properties**<br>ConsentAgreement (ConsentAgreementInfo)<br>Consent (ConsentInfo)<br>Contact (ContactInfo) | Occurs when a consent agreement is revoked. When a contact's consent agreement is revoked, this event can be used to perform custom actions, such as terminating tracking of the contact or deleting [personal data](https://docs.kentico.com/13/configuring-xperience/data-protection/gdpr-compliance/personal-data-in-xperience.md) related to the contact.<br>**See also**: [Creating consents](https://docs.kentico.com/13/configuring-xperience/data-protection/gdpr-compliance/creating-consents.md), [Working with consents](https://docs.kentico.com/13/configuring-xperience/data-protection/gdpr-compliance/working-with-consents.md) |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## EventLogEvents

**Namespace**: CMS.EventLog

Contains events that occur when logging records into the system's [event log](https://docs.kentico.com/13/developing-websites/troubleshooting-websites/working-with-the-system-event-log.md).

| Event    | Event types                | Handler parameters                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------- | -------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| LogEvent | Before<br>After<br>Failure | LogEventArgs<br>**Properties**<br>Event (EventLogInfo) | Occurs when the system logs a record into the event log. You can use the _Before_ event to customizing the data logged for events or cancel logging for certain types of events. The _After_ event allows you to perform custom actions after events are successfully logged, for example duplicate certain types of events into a custom log.<br>**See also**: [Customizing event logging](https://docs.kentico.com/13/custom-development/customizing-event-logging.md) |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## StagingEvents

**Namespace**: CMS.Synchronization

Contains events that occur when using [content staging](https://docs.kentico.com/13/deploying-websites/content-staging.md) for pages and objects.

| Event                  | Event types                | Handler parameters                                                                                                                                                                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GetChildProcessingType | Execute                    | StagingChildProcessingTypeEventArgs<br>**Properties**<br>ObjectType (string)<br>ParentObjectType (string)<br>ProcessingType (IncludeToParentEnum)                                                         | Occurs on the **target server** when processing create or update staging tasks that include the data of child or binding objects (once for each child or binding type).<br>For example, staging tasks for roles include the data of binding objects, such as user-role and role-permission relationships. When processing a create or update staging task for a role, the _GetChildProcessingType_ event triggers separately for each binding type included in the role data.<br>You can use the event to customize how the system handles child and binding object data during staging. For more information, see [Customizing staging of child and binding objects](https://docs.kentico.com/13/custom-development/handling-global-events/customizing-staging-of-child-and-binding-objects.md). |
| LogTask                | Before<br>After<br>Failure | StagingLogTaskEventArgs<br>**Properties**<br>Object (BaseInfo)<br>Task (StagingTaskInfo)                                                                                                                  | Occurs when creating staging tasks on the source server after a page or object is changed in the system.<br>See also:<br>[Excluding content from staging and integration](https://docs.kentico.com/13/custom-development/handling-global-events/excluding-content-from-staging-and-integration.md)<br>[Automatically synchronizing staging and integration tasks](https://docs.kentico.com/13/custom-development/handling-global-events/automatically-synchronizing-staging-and-integration-tasks.md)                                                                                                                                                                                                                                                                                             |
| Synchronize            | Before<br>After<br>Failure | CMSEventArgs                                                                                                                                                                                              | Occurs on the source server when synchronizing staging tasks – once per synchronize action, even when processing multiple tasks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| SynchronizeTask        | Before<br>After<br>Failure | StagingTaskEventArgs<br>**Properties**<br>Task (StagingTaskInfo)                                                                                                                                          | Occurs on the source server when synchronizing staging tasks – separately for every processed task.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ProcessTask            | Before<br>After<br>Failure | StagingSynchronizationEventArgs<br>**Properties**<br>TaskType (TaskTypeEnum)<br>ObjectType (string)<br>TaskData (DataSet)<br>TaskBinaryData (DataSet)<br>TaskHandled (bool)<br>SyncManager (ISyncManager) | Occurs on the **target server** when processing incoming staging tasks.<br>The processing of the staging tasks then also triggers the corresponding **DocumentEvents** or **ObjectEvents** (Insert, Update, Delete, etc.).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## IntegrationEvents

**Namespace**: CMS.Synchronization

Contains events that occur when synchronizing pages or objects between Xperience and other applications using the [integration bus](https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-integration-bus.md).

See also:

- [Excluding content from staging and integration](https://docs.kentico.com/13/custom-development/handling-global-events/excluding-content-from-staging-and-integration.md)
- [Automatically synchronizing staging and integration tasks](https://docs.kentico.com/13/custom-development/handling-global-events/automatically-synchronizing-staging-and-integration-tasks.md)

| Event           | Event types                | Handler parameters                                                                            | Description                                                                                          |
| --------------- | -------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| LogInternalTask | Before<br>After<br>Failure | IntegrationTaskEventArgs<br>**Properties**<br>Task (IntegrationTaskInfo)<br>Object (BaseInfo) | Occurs when creating **outgoing** integration tasks after a page or object in the system is changed. |
| LogExternalTask | Before<br>After<br>Failure | IntegrationTaskEventArgs<br>**Properties**<br>Task (IntegrationTaskInfo)<br>Object (BaseInfo) | Occurs when the system creates **incoming** tasks provided by an integration connector.              |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## ImportExportEvents

**Namespace**: CMS.CMSImportExport

Contains events related to [import and export](https://docs.kentico.com/13/deploying-websites/exporting-and-importing-sites.md) actions.

| Event                | Event types                | Handler parameters                                                                                                                                                                    | Description                                                                                                                                                                                                                                                                                                                                        |
| -------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Import               | Before<br>After<br>Failure | ImportBaseEventArgs<br>**Properties**<br>Settings (SiteImportSettings)                                                                                                                | Occurs at the start of the import process.                                                                                                                                                                                                                                                                                                         |
| ImportObject         | Before<br>After<br>Failure | ImportEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Object (BaseInfo)<br>ParentObject (BaseInfo)<br>Parameters (ImportParameters)                                   | Occurs once for every imported object.                                                                                                                                                                                                                                                                                                             |
| ImportObjects        | Before<br>After<br>Failure | ImportDataEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Data (DataSet)<br>ObjectType (string)<br>SiteObjects (bool)<br>ParentImported (bool)                        | Occurs when importing sets of objects.                                                                                                                                                                                                                                                                                                             |
| ImportBinding        | Before<br>After<br>Failure | ImportEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Object (BaseInfo)<br>ParentObject (BaseInfo)<br>Parameters (ImportParameters)                                   | Occurs once for every imported binding object.                                                                                                                                                                                                                                                                                                     |
| ImportBindings       | Before<br>After<br>Failure | ImportEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Object (BaseInfo)<br>ParentObject (BaseInfo)<br>Parameters (ImportParameters)                                   | Occurs when importing binding objects.                                                                                                                                                                                                                                                                                                             |
| ImportChild          | Before<br>After<br>Failure | ImportEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Object (BaseInfo)<br>ParentObject (BaseInfo)<br>Parameters (ImportParameters)                                   | Occurs once for every imported child object.                                                                                                                                                                                                                                                                                                       |
| ImportChildren       | Before<br>After<br>Failure | ImportEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Object (BaseInfo)<br>ParentObject (BaseInfo)<br>Parameters (ImportParameters)                                   | Occurs when importing child objects.                                                                                                                                                                                                                                                                                                               |
| GetImportData        | Before<br>After<br>Failure | ImportGetDataEventArgs<br>**Properties**<br>Settings (SiteImportSettings)<br>Data (DataSet)<br>Object (BaseInfo)<br>ObjectType (string)<br>SiteObjects (bool)<br>SelectionOnly (bool) | Occurs when importing data. Allows you to work with the data set in the import package created for a specific object types.<br>Use the **Before** event type to modify the data in the import package (for example add data from an external source).<br>Use the **After** event type to modify the data after the import package has been loaded. |
| ProcessFileOperation | Before<br>After<br>Failure | ImportProcessFileOperationEventArgs<br>**Properties**<br>Operation (FileOperation)<br>Settings (SiteImportSettings)                                                                   | Occurs when processing file/folder operations in the import package.                                                                                                                                                                                                                                                                               |
| ImportCanceled       | Execute                    | ImportBaseEventArgs<br>**Properties**<br>Settings (SiteImportSettings)                                                                                                                | Occurs when a user cancels the import process.                                                                                                                                                                                                                                                                                                     |
| ImportError          | Execute                    | ImportErrorEventArgs<br>**Properties**<br>Exception (Exception)<br>Settings (SiteImportSettings)                                                                                      | Fires when an error occurs during the import process.                                                                                                                                                                                                                                                                                              |

| Event                 | Event types                            | Handler parameters                                                                                                                                                                                                           | Description                                                                                                                                                                                                                                                                   |
| --------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Export                | Before<br>After<br>Finished<br>Failure | ExportEventArgs<br>**Properties**<br>Settings (SiteExportSettings)<br>SiteObjects (bool)                                                                                                                                     | Occurs at the start of the export process.                                                                                                                                                                                                                                    |
| ExportObjects         | Before<br>After<br>Failure             | ExportEventArgs<br>**Properties**<br>Settings (SiteExportSettings)<br>Data (DataSet)<br>ObjectType (string)<br>SiteObjects (bool)                                                                                            | Occurs when exporting objects.                                                                                                                                                                                                                                                |
| GetExportData         | Before<br>After<br>Failure             | ExportGetDataEventArgs<br>**Properties**<br>Settings (SiteExportSettings)<br>Data (DataSet)<br>ObjectType (string)<br>WhereCondition (string)<br>ChildData (bool)<br>SelectionOnly (bool)<br>Parameters(QueryDataParameters) | Occurs when exporting data. Allows you to work with the data set in the export package created for specific object types.<br>Use the **Before** event type to extract data from the export package.<br>Use the **After** event type to modify the data in the export package. |
| SingleExportSelection | Execute                                | SingleExportSelectionEventArgs<br>**Properties**<br>Settings (SiteExportSettings)<br>InfoObject (BaseInfo)<br>SelectedObject (List)                                                                                          | Occurs when selecting related objects during single object export. Allows you to attach related objects to the export package.                                                                                                                                                |
| ExportCanceled        | Execute                                | ExportBaseEventArgs<br>**Properties**<br>Settings (SiteExportSettings)                                                                                                                                                       | Occurs when a user cancels the export process.                                                                                                                                                                                                                                |
| ExportError           | Execute                                | ExportErrorEventArgs<br>**Properties**<br>Exception (Exception)<br>Settings (SiteExportSettings)                                                                                                                             | Fires when an error occurs during the export process.                                                                                                                                                                                                                         |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## DocumentImportExportEvents

**Namespace**: CMS.DocumentEngine

Contains events related to [import and export](https://docs.kentico.com/13/deploying-websites/exporting-and-importing-sites.md) of pages.

| Event           | Event types                | Handler parameters                                                                                                                         | Description                          |
| --------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ |
| ExportDocuments | Before<br>After<br>Failure | DocumentsExportEventArgs<br>**Properties**<br>Settings (SiteExportSettings)<br>Data (DataSet)<br>ObjectType (string)<br>SiteObjects (bool) | Occurs when exporting pages.         |
| ImportDocument  | Before<br>After<br>Failure | DocumentImportEventArgs<br>**Properties**<br>Document (TreeNode)<br>Settings (SiteImportSettings)                                          | Occurs once for every imported page. |
| ImportDocuments | Before<br>After<br>Failure | DocumentImportEventArgs<br>**Properties**<br>Document (TreeNode)<br>Settings (SiteImportSettings)                                          | Occurs when importing pages.         |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## ColumnsTranslationEvents

**Namespace**: CMS.DataEngine

When transferring data between instances of Xperience (via [import/export](https://docs.kentico.com/13/deploying-websites/exporting-and-importing-sites.md) or [staging](https://docs.kentico.com/13/deploying-websites/content-staging.md)), the IDs of objects can differ between the environments. Xperience automatically "translates" the ID values for system objects, but not for custom objects. For example, when you stage a [custom table](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-custom-tables.md) or [page type](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-page-types.md) that contains a custom field storing object IDs, the values may not match the IDs of the objects on the target server. The _ColumnsTranslationEvents_ allow you to ensure that the IDs are translated correctly.

**See also**: [Deploying objects with custom ID fields](https://docs.kentico.com/13/custom-development/handling-global-events/deploying-objects-with-custom-id-fields.md)

| Event            | Event types | Handler parameters                                                                                                                     | Description                                                                                                           |
| ---------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| RegisterRecords  | Execute     | ColumnsTranslationEventArgs<br>**Properties**<br>ObjectType (string)<br>Data (IDataContainer)<br>TranslationHelper (TranslationHelper) | Occurs when exporting objects. Allows you to provide additional information for the translation of custom ID fields.  |
| TranslateColumns | Execute     | ColumnsTranslationEventArgs<br>**Properties**<br>ObjectType (string)<br>Data (IDataContainer)<br>TranslationHelper (TranslationHelper) | Occurs when importing objects. Allows you to translate the values of custom ID fields using the provided information. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## ModulePackagingEvents

**Namespace**: CMS.Modules

Contains events that occur when the system generates [installation packages for custom modules](https://docs.kentico.com/13/custom-development/creating-custom-modules/creating-installation-packages-for-modules.md).

| Event               | Event types                | Handler parameters                                                                                                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| BuildNuSpecManifest | Before<br>After<br>Failure | BuildNuSpecManifestEventArgs<br>**Properties**<br>Manifest (NuGet.Manifest)<br>NuSpecBuilder (CMS.Modules.NuSpecBuilder)<br>ResourceName (string) | Occurs when the system creates the _.nuspec_ file for module NuGet packages. The file is an XML manifest containing package metadata. See the [.nuspec reference](https://docs.microsoft.com/en-us/nuget/schema/nuspec) for more information.<br>The event allows you to customize the package metadata for your modules:<br>The **Before** event type allows you to adjust the default nuspec content via the Xperience API – use the members of the _NuSpecBuilder_ instance provided by the corresponding property of the handler's _BuildNuSpecManifestEventArgs_ parameter.<br>Use the **After** event type if you wish to modify or completely replace the resulting nuspec manifest, which is accessible as an instance of the _NuGet.Manifest_ class via the corresponding property of the handler's _BuildNuSpecManifestEventArgs_ parameter.<br>The **ResourceName** property of the handler's _BuildNuSpecManifestEventArgs_ parameter contains the code name of the module for which the package is being created. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## BizFormItemEvents

**Namespace**: CMS.OnlineForms

Contains events related to [form](https://docs.kentico.com/13/managing-website-content/forms.md) actions. See [Working with form data using the API](https://docs.kentico.com/13/custom-development/working-with-form-data-using-the-api.md) for an example.

| Event  | Event types                | Handler parameters                                           | Description                                                           |
| ------ | -------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------------- |
| Insert | Before<br>After<br>Failure | BizFormItemEventArgs<br>**Properties**<br>Item (BizFormItem) | Occurs when inserting new form items (data records of on-line forms). |
| Update | Before<br>After<br>Failure | BizFormItemEventArgs<br>**Properties**<br>Item (BizFormItem) | Occurs when updating form data records.                               |
| Delete | Before<br>After<br>Failure | BizFormItemEventArgs<br>**Properties**<br>Item (BizFormItem) | Occurs when deleting data records from forms.                         |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## CustomTableItemEvents

**Namespace**: CMS.CustomTables

Contains events related to custom table actions. See [Custom table internals and API](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-custom-tables/custom-table-internals-and-api.md).

| Event  | Event types                | Handler parameters                                                   | Description                                                                           |
| ------ | -------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| Insert | Before<br>After<br>Failure | CustomTableItemEventArgs<br>**Properties**<br>Item (CustomTableItem) | Occurs when inserting new custom table items (data records stored in a custom table). |
| Update | Before<br>After<br>Failure | CustomTableItemEventArgs<br>**Properties**<br>Item (CustomTableItem) | Occurs when updating custom table items.                                              |
| Delete | Before<br>After<br>Failure | CustomTableItemEventArgs<br>**Properties**<br>Item (CustomTableItem) | Occurs when deleting custom table items.                                              |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## EcommerceEvents

**Namespace**: CMS.Ecommerce

Contains events related to the E-commerce solution.

| Event                      | Event types | Handler parameters                                                                            | Description                                                                                                                                                                                                                                                                                                                    |
| -------------------------- | ----------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| NewOrderCreated            | Execute     | NewOrderCreatedEventArgs<br>**Properties**<br>NewOrder (OrderInfo)                            | Fires when a new [order](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/orders.md) is created.<br>The event triggers only when the order is created based on an existing shopping cart. For example, the event does not trigger if an order is created within code using the _OrderInfoProvider_ API. |
| OrderPaid                  | Execute     | OrderPaidEventArgs<br>**Properties**<br>Order (OrderInfo)                                     | Fires when an order becomes paid.                                                                                                                                                                                                                                                                                              |
| ProductAddedToShoppingCart | Execute     | ProductAddedToCartEventArgs<br>**Properties**<br>AddedShoppingCartItem (ShoppingCartItemInfo) | Fires when a customer adds a product to their shopping cart.<br>The event occurs only once when multiple units of the same product are added to the cart within a single action (the _ShoppingCartItem_ object available in the event's _ProductAddedToCartEventArgs_ parameter can represent any number of product units).    |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## NewsletterEvents

**Namespace**: CMS.Newsletters

Contains events related to [Email marketing](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/email-marketing.md).

| Event                       | Event types                | Handler parameters                                                                                                                                                           | Description                                                                                                                                                                                                                                                                                                  |
| --------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ResolveMacros               | Before<br>After<br>Failure | ResolveMacrosEventArgs<br>**Properties**<br>MacroResolver (MacroResolver)<br>TextToResolve (string)<br>Newsletter (NewsletterInfo)<br>IssueInfo (IssueInfo)                  | Occurs when all email feed text macros are resolved.                                                                                                                                                                                                                                                         |
| GenerateQueueItems          | Before<br>After<br>Failure | GenerateQueueItemsEventArgs<br>**Properties**<br>Subscriber (SubscriberInfo)<br>Issue (IssueInfo)<br>EmailAddressBlocker (IEmailAddressBlocker)<br>GeneratedEmails (HashSet) | Occurs when an email feed is sent to one or more recipients. You can use this event to manually add emails to the queue for custom recipients.<br>Note: The _GeneratedEmails_ property is used only with Newsletter email feeds and its primary purpose is to check duplicates in the newsletter recipients. |
| GeneratePreview             | Before<br>After<br>Failure | GeneratePreviewEventArgs<br>**Properties**<br>Subscriber (SubscriberInfo)<br>Issue (IssueInfo)<br>PreviewHtml (string)                                                       | Occurs when an email preview is generated for a recipient.                                                                                                                                                                                                                                                   |
| SubscriberUnsubscribes      | Execute                    | UnsubscriptionEventArgs<br>**Properties**<br>Newsletter (NewsletterInfo)<br>Email (string)<br>IssueID (int?)                                                                 | Occurs when a recipient unsubscribes from an email feed.                                                                                                                                                                                                                                                     |
| SubscriberOpensEmail        | Execute                    | LinksEventArgs<br>**Properties**<br>IssueInfo (IssueInfo)<br>NewsletterInfo (NewsletterInfo)<br>AdditionalParameters (NameValueCollection)                                   | Occurs when a recipient opens an email and the open email tracking feature is enabled.                                                                                                                                                                                                                       |
| SubscriberClicksTrackedLink | Execute                    | LinksEventArgs<br>**Properties**<br>IssueInfo (IssueInfo)<br>NewsletterInfo (NewsletterInfo)<br>AdditionalParameters (NameValueCollection)                                   | Occurs when a recipient clicks an email link and the email link tracking feature is enabled.                                                                                                                                                                                                                 |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## WebAnalyticsEvents

**Namespace**: CMS.WebAnalytics

| Event                 | Event types | Handler parameters                                                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------- | ----------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CheckAnalyticsConsent | Execute     | CheckAnalyticsConsentEventArgs<br>**Properties**<br>ContactId (int)<br>HasConsent (bool) | Occurs before the system logs any [web analytics](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/web-analytics.md) for visitors (before any processing of the visitor's personal data).<br>Allows you to disable logging of web analytics based on consent. Assign a handler to the event, create a condition according to your website's consent requirements, and set the **HasConsent** property of the handler's **CheckAnalyticsConsentEventArgs** parameter based on the result.<br>**Example**: [Logging web analytics based on consent](https://docs.kentico.com/13/configuring-xperience/data-protection/gdpr-compliance/logging-web-analytics-based-on-consent.md) |
| CampaignLaunched      | Execute     | CMSEventArgs                                                                             | Occurs when a campaign is launched (whether it was originally scheduled or launched directly).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| CampaignUTMChanged    | Execute     | CMSEventArgs                                                                             | Occurs when the UTM parameter is changed for a campaign.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## ContactManagementEvents

**Namespace**: CMS.ContactManagement

| Event               | Event types | Handler parameters                                                                                                               | Description                                                                                                                                                          |
| ------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ContactInfosDeleted | Execute     | ContactinfosDeletedHandlerEventArgs<br>**Properties**<br>DeletedContactsIds (IEnumerable)<br>DeletedContactsGUIDs (IEnumberable) | Occurs when two or more selected contacts are deleted.<br>When a single contact is deleted, the _TypeInfoEvents.Delete_ event can be used on _ContactInfo.TYPEINFO_. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## ActivityEvents

**Namespace**: CMS.Activities

| Event                         | Event types                | Handler parameters | Description                                                                                                                                                                                                                                                                                                                                                                                                       |
| ----------------------------- | -------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ActivityBulkInsertPerformed   | Before<br>After<br>Failure | CMSEventArgs>      | Fires when the system processes [on-line marketing activities](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/tracking-contact-activities.md) that are logged in memory, and bulk inserts them to the database.                                                                                                                               |
| ActivityProcessedInLogService | Execute                    | CMSEventArgs       | Fires when an [on-line marketing activity](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/tracking-contact-activities.md) is logged and processed. At this point, the activity is only stored in the application memory (activities are regularly processed and saved in bulk to the database – see the _ActivityBulkInsertPerformed_ event). |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## AutomationEvents

**Namespace**: CMS.Automation

Contains events related to [marketing automation](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/marketing-automation.md) actions.

| Event              | Event types                | Handler parameters                                                                                                                     | Description                                                                                                                                                                                                                                                                                                                                                              |
| ------------------ | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| MoveToNextStep     | Before<br>After<br>Failure | AutomationEventArgs<br>**Properties**<br>InfoObject (BaseInfo)<br>StateObject (AutomationStateInfo)<br>PreviousStep (WorkflowStepInfo) | Occurs when a contact in an automation process moves to the next step.                                                                                                                                                                                                                                                                                                   |
| MoveToPreviousStep | Before<br>After<br>Failure | AutomationEventArgs<br>**Properties**<br>InfoObject (BaseInfo)<br>StateObject (AutomationStateInfo)<br>PreviousStep (WorkflowStepInfo) | Occurs when a contact in an automation process moves back to the previous step.                                                                                                                                                                                                                                                                                          |
| Action             | Before<br>After<br>Failure | WorkflowActionEventArgs<br>Requires references to:<br>CMS.WorkflowEngine<br>CMS.DataEngine                                             | Occurs when the system executes a marketing automation action step.                                                                                                                                                                                                                                                                                                      |
| ProcessTrigger     | Before<br>After<br>Failure | AutomationProcessTriggerEventArgs<br>**Properties**<br>Options (IEnumerable)<br>TriggerInfo (ObjectWorkflowTriggerInfo)                | Occurs when processing triggers for automation processes. The system evaluates triggers periodically in bulk for a certain number of related contacts (represented by the collection in the _Options_ property of the _AutomationProcessTriggerEventArgs_ parameter).<br>Evaluates the trigger condition and allows you to, for example, insert data into the condition. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## SystemEvents

**Namespace**: CMS.Base

Contains general system events.

| Event     | Event types | Handler parameters                                                                | Description                                             |
| --------- | ----------- | --------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Exception | Execute     | SystemEventArgs<br>**Properties**<br>Exception (Exception)<br>LogException (bool) | Fires when an unhandled exception occurs in the system. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## SiteEvents

**Namespace**: CMS.SiteProvider

Contains events related to site actions.

| Event  | Event types                | Handler parameters                                                                                              | Description                                    |
| ------ | -------------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| Delete | Before<br>After<br>Failure | SiteDeletionEventArgs<br>**Properties**<br>User (UserInfo)<br>Context (CMSActionContext)<br>Info (DeletionInfo) | Occurs when a site is deleted from the system. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## SqlEvents

**Namespace**: CMS.DataEngine

Contains events related to the execution of queries and other database operations.

| Event           | Event types                | Handler parameters                                                                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| BulkInsert      | Before<br>After<br>Failure | BulkInsertDataEventArgs<br>**Properties**<br>Connection (IDataConnection)<br>InsertSettings (BulkInsertSettings)<br>SourceData (DataTable)<br>TargetTable (string) | Occurs when the system creates objects by directly inserting data into a database table (for example when [importing contacts](https://docs.kentico.com/13/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/working-with-contacts/importing-contacts.md) from CSV files).                                                                                                                                                                                                                                                                                        |
| ExecuteQuery    | Before<br>After<br>Failure | ExecuteQueryEventArgs<br>**Properties**<br>Connection (IDataConnection)<br>Query (QueryParameters)<br>Result (DataSet)                                             | Occurs when the system executes a database query.<br>**Note**: The _ExecuteQuery_ event does NOT trigger when the system (or custom code) enumerates through the results of an [ObjectQuery](https://docs.kentico.com/13/custom-development/retrieving-database-data-using-objectquery-api.md) call. The **ExecuteReader** event is triggered instead.<br>See also: [Working with database queries in the API](https://docs.kentico.com/13/custom-development/working-with-database-queries-in-the-api.md)                                                                                             |
| ExecuteNonQuery | Before<br>After<br>Failure | ExecuteQueryEventArgs<br>**Properties**<br>Connection (IDataConnection)<br>Result (DataSet)                                                                        | Occurs when the system executes a non-query database operation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ExecuteScalar   | Before<br>After<br>Failure | ExecuteQueryEventArgs<br>**Properties**<br>Connection (IDataConnection)<br>Query (QueryParameters)<br>Result (DataSet)                                             | Occurs when the system executes a scalar query.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ExecuteReader   | Before<br>After<br>Failure | ExecuteQueryEventArgs<br>**Properties**<br>Connection (IDataConnection)<br>Result (DataSet)                                                                        | Occurs when the system runs a database [DataReader](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/dataadapters-and-datareaders).<br>**Note**: This event is triggered when the system (or custom code) materializes an [ObjectQuery](https://docs.kentico.com/13/custom-development/retrieving-database-data-using-objectquery-api.md) call, typically by enumerating through the results. However, this is not the case for [DocumentQuery](https://docs.kentico.com/13/custom-development/working-with-pages-in-the-api.md) calls, which trigger the **ExecuteQuery** event instead. |

[> Back to list of event categories](#referenceglobalsystemevents-eventstop)

## Application events

Xperience provides a set of events that you can use to customize the global behavior of the application.

### ApplicationEvents

**Namespace**: CMS.Base

Contains events related to the application life cycle.

The following table lists the events that **occur once in the application's life cycle, in order of execution**:

| Event          | Event types | Handler parameters                                                         | Description                                                                                                                                                                                                                                                                                                  |
| -------------- | ----------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PreInitialized | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when the application finishes pre-initialization (preparation of things unrelated to the database).<br>Handlers need to be assigned in the **PreInit** method of [custom modules](https://docs.kentico.com/13/custom-development/creating-custom-modules/initializing-modules-to-run-custom-code.md). |
| Initialized    | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when the application finishes initialization and starts (including all modules and the database connection). Handle this event to perform standard application start events.                                                                                                                          |
| PostStart      | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs at the end of the first application request. Allows you to perform asynchronous tasks needed for application startup.<br>Running long operations within this event's handlers can negatively affect the response time of the first request when starting the application.                             |
| End            | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when the application ends.                                                                                                                                                                                                                                                                            |

The following events occur as needed during the application life cycle:

| Event        | Event types | Handler parameters                                                         | Description                                                                                                                                            |
| ------------ | ----------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Error        | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Fires when an error occurs in the application.                                                                                                         |
| SessionStart | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when an HTTP session starts for a client.                                                                                                       |
| SessionEnd   | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when an HTTP session ends for a client. May not be raised if the application is configured to use a session state mode different than _InProc._ |

### RequestEvents

**Namespace**: CMS.Base

Contains events related to handling of requests. See also: [ASP.NET Application Life Cycle Overview](https://docs.microsoft.com/en-us/previous-versions/bb470252\(v=vs.140\))

The following table lists the request events **in order of execution**:

| Event                   | Event types | Handler parameters                                                         | Description                                                                                                                                                                                          |
| ----------------------- | ----------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Prepare                 | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs before the request processing begins.                                                                                                                                                         |
| Begin                   | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when the request processing starts.                                                                                                                                                           |
| Authenticate            | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when authenticating requests.                                                                                                                                                                 |
| Authorize               | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when authorizing requests.                                                                                                                                                                    |
| PostAuthorize           | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs after the request's user is authorized.                                                                                                                                                       |
| PostResolveRequestCache | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when ASP.NET bypasses execution of the current handler and allows a caching module to serve the request from the cache.                                                                       |
| MapRequestHandler       | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when a handler is selected to respond to the request.                                                                                                                                         |
| PostMapRequestHandler   | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs after the application has mapped the request to the appropriate event handler.                                                                                                                |
| AcquireRequestState     | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when acquiring the state (for example session state) that is associated with the current request.                                                                                             |
| PostAcquireRequestState | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs after the request state (for example session state) that is associated with the current request has been obtained.                                                                            |
| End                     | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs at the end of the request processing.                                                                                                                                                         |
| PreSendRequestHeaders   | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs just before ASP.NET sends HTTP headers to the client.                                                                                                                                         |
| RunEndRequestTasks      | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Allows you to execute background tasks at the end of the request processing. Running long tasks in this event's handlers can negatively affect the response time of requests.                        |
| Finalize                | Execute     | [EventArgs](http://msdn.microsoft.com/en-us/library/system.eventargs.aspx) | Occurs when the request is finalized. Use to cleanup and release any resources used by the request. Running long tasks in this event's handlers can negatively affect the response time of requests. |

> **Tip:** **Handling other HttpApplication events**
>
> If you wish to handle **HttpApplication** events that are not available in the Xperience _RequestEvents_ class, you need to create and register a custom HTTP module.
>
> See [Walkthrough: Creating and Registering a Custom HTTP Module](https://docs.microsoft.com/en-us/previous-versions/aspnet/ms227673\(v=vs.100\)) for more information.
