---
title: Integration bus overview
related:
  - https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-integration-bus/enabling-the-integration-bus.md
  - https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-integration-bus/creating-integration-connectors.md
  - https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-integration-bus/managing-integration-tasks.md
---

> 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).

The integration bus synchronizes objects and pages with third party systems. It provides a safer and more reliable way than other solutions, because the synchronization tasks can be ordered in a queue and recovered if they fail. You can implement the synchronization in both directions:

- [Outgoing tasks](#outgoing-tasks---from-kentico-xperience-to-external-applications) – perform synchronization from Kentico Xperience to external applications.
- [Incoming tasks](#incoming-tasks---from-external-applications-to-kentico-xperience) – perform synchronization from external systems to Kentico Xperience.

## Outgoing tasks - From Kentico Xperience to external applications

Outgoing synchronization tasks are based on _subscriptions_.

### Subscriptions

Subscriptions keep track of operations performed in Xperience, such as creating, updating or deleting objects and pages. Developers need to prepare subscriptions for operations that should be synchronized to external systems. When an operation that has a subscription occurs, the system passes the request to a connector, which processes the synchronization in one of two modes (depends on the subscription settings):

- [Asynchronously](#asynchronous-processing) – synchronization tasks are placed into a queue, which is automatically processed by the system at the end of each web request that logs new tasks. Failed tasks remain in the queue and are executed again during the next task processing.
- [Synchronously ](#synchronous-processing)– synchronization tasks are passed directly to the connector.

![The role of subscriptions in the integration process](https://docs.kentico.com/docsassets/13/integration-bus-overview/Integration_Subscriptions.png "The role of subscriptions in the integration process")

**Data types for subscriptions**

Subscriptions use one of three data types to specify which data is transferred:

- **Simple** – synchronizes the content of objects.
- **SimpleSnapshot** – synchronizes whole objects and preserves foreign key bindings. This applies only when the 3rd party system has an architecture and database design similar to Xperience.
- **Snapshot** – synchronizes multiple objects at once. For example a main object with its children, such as forms together with submissions. Not supported for pages.

For details, refer to the [TaskDataTypeEnum](https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-integration-bus/reference-integration-bus-data-types.md#taskdatatypeenum) enumeration.

### Asynchronous processing

With asynchronous processing of tasks, the data of the changed object or page is first stored in the database (the task is logged in the task queue). If the external system is not available, the tasks wait ordered in the queue until they can be reliably processed.

![The mechanism of asynchronous processing](https://docs.kentico.com/docsassets/13/integration-bus-overview/Outgoing_Async_Basic.png "The mechanism of asynchronous processing")

The **advantages** of asynchronous processing:

- Synchronization data is not lost even if the processing of tasks fails.
- Asynchronous processing is highly scalable, all time‑consuming operations are performed one by one.
- Allows translation of column values using the _TranslateColumnsToExternal()_ method.

The **disadvantages** of asynchronous processing:

- No context is available during the object/page processing.

Otherwise, asynchronous processing does not have any major disadvantages, and can be used for most scenarios.

To ensure maximum performance, the system postpones the logging and processing of tasks until the [_EndRequest_](https://docs.microsoft.com/en-us/dotnet/api/system.web.httpapplication.endrequest) event.

![Flow chart of asynchronous processing of outgoing tasks](https://docs.kentico.com/docsassets/13/integration-bus-overview/Outgoing_Async_Lifecycle.png "Flow chart of asynchronous processing of outgoing tasks")

> **Note:** **Note**: Processing doesn’t start on _EndRequest_ when the object or page has been changed in an asynchronous thread (for example when importing new sites with the **Log integration tasks** option enabled).

When the processing thread starts, the connector begins by fetching the first task in the queue (FIFO principle). Fetched tasks are transformed to strongly typed objects and passed to the methods implemented in the connector class. In some cases, additional methods are called, for example when performing translation of foreign keys. When the task is processed, the result value (of type [IntegrationProcessResultEnum](https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-integration-bus/reference-integration-bus-data-types.md#integrationprocessresultenum)) is returned to notify the connector. Depending on the result, the connector decides what to do next.

![The role of connectors in asynchronous processing](https://docs.kentico.com/docsassets/13/integration-bus-overview/Outgoing_Async_Main.png "The role of connectors in asynchronous processing")

> **Info:** **Note**: The _BaseIntegrationConnector_ is already implemented. You only need to prepare the parts of the code shown in the inherited connector class (_CustomIntegrationConnector_ in the figure above).

### Synchronous processing

When using synchronous processing, the changed object is passed directly to the connector for further processing.

![The mechanism of synchronous processing](https://docs.kentico.com/docsassets/13/integration-bus-overview/Outgoing_Sync_Basic.png "The mechanism of synchronous processing")

The **advantages** of synchronous processing include:

- You can manipulate objects within the context of Xperience – you can access properties like _Parent_ or _Children_ of the currently processed object, and the data is fetched from the database just in time.
- With pages, you can access properties like _Tags_, _Categories_ and _Attachments_.

The **disadvantages** of synchronous processing include:

- The system does not store the synchronization data in the database – if an error occurs and the connector fails to process the request, the data is lost.
- Synchronous processing of large or numerous tasks may slow down the application.
- No _TranslateColumnsToExternal()_ method.

It is recommended to use synchronous processing only if you need to leverage the advantages.

![Flow chart of synchronous processing of outgoing tasks](https://docs.kentico.com/docsassets/13/integration-bus-overview/Outgoing_Sync_Flow.png "Flow chart of synchronous processing of outgoing tasks")

Processing of synchronous tasks starts immediately after an object or page matching a subscription is changed. Unlike asynchronous processing, where the logging and processing is postponed until the application reaches [_EndRequest_](https://docs.microsoft.com/en-us/dotnet/api/system.web.httpapplication.endrequest), synchronous processing sends the data instantly to the subscribed connectors.

![The role of connectors in synchronous processing](https://docs.kentico.com/docsassets/13/integration-bus-overview/Outgoing_Sync_Main.png "The role of connectors in synchronous processing")

## Incoming tasks - From external applications to Kentico Xperience

The inbound direction allows you to transfer changes from external applications to Xperience by sending data to the Integration bus. The system stores the data in a queue, later takes it from the queue, and processes it on a regular basis or on your request. Processing of incoming tasks is **always asynchronous**.

![The mechanism of inbound task processing](https://docs.kentico.com/docsassets/13/integration-bus-overview/Incoming_Basic.png "The mechanism of inbound task processing")

Your task as a developer is to implement methods that help the system log the correct data into the queue. You need to convert the external object to a corresponding internal object or page, and supply translation information if you want to preserve foreign key bindings:

![](https://docs.kentico.com/docsassets/13/integration-bus-overview/Incoming_Main.png)

There are two ways to implement the communication between Xperience and your external system:

- Implement a service
- Call the Xperience API (requires references to Xperience DLLs, i.e. installation of the _Kentico.Xperience.Libraries_ NuGet package)

### Implementing a service

The communication is ensured by a custom service (Web API, WCF, etc.) that you need to implement within the Xperience application. The service then calls the Xperience API, which uses a connector to convert external objects to Xperience objects.

The advantage is that your external application does not need to reference Xperience libraries (DLLs).

![Inbound synchronization using a custom service](https://docs.kentico.com/docsassets/13/integration-bus-overview/Incoming_Service.png "Inbound synchronization using a custom service")

### Calling the Xperience API

Your external application needs to reference the Xperience libraries (DLLs) and have a connection to your Xperience database. See [Using the Xperience API externally](https://docs.kentico.com/13/integrating-3rd-party-systems/using-the-xperience-api-externally.md) to learn how to set up this scenario.

You need to implement a connector class as part of a separate library, and reference it from both your external application and the related Xperience application.

Then call the API _(ProcessExternalTask_ method) within your application's code, which performs the following tasks:

1. Converts external objects to Xperience objects using the connector.
2. Logs the synchronization data (integration tasks) directly into the connected Xperience database.

The advantage is that even if the Xperience application is not accessible for some reason, the synchronization data is logged to the queue and can be reliably processed later without loss of data.

![Inbound synchronization using the Kentico API](https://docs.kentico.com/docsassets/13/integration-bus-overview/Incoming_API.png "Inbound synchronization using the Kentico API")
