---
title: "The Marketing Automation application services"
slug: "the-marketing-automation-application-services"
abstract: "Overview of the Sitecore Marketing Automation application services that are used when creating campaign activity editors."
---
# The Marketing Automation application services

The Marketing Automation application provides a set of services through dependency injection but does not offer support for constructor injection. Therefore the activity editor can only access the services through the context injector. The Marketing Automation application services are useful when [creating campaign activity editors](https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-platform/the-activity-editor.html "The activity editor").

## The alert service

The alert service shows the *Success*, *Info*, *Warning*, and *Error* alerts.

The following command imports the service type and the injection token:

```text
import { ALERT_SERVICE, IAlertService } from '@sitecore/ma-core';

```

The following command creates an instance of `IAlertService`:

```csharp
constructor(private injector: Injector) {
  super();
  let alertService: IAlertService = injector.get(ALERT_SERVICE);
}

```

## The translate service

The translate service provides the access to the dictionary items located in the Core database under the `/sitecore/client/Applications/MarketingAutomation/Translations` item.

The following command imports the service type and the injection token:

```javascript
import { TRANSLATE_SERVICE } from '@sitecore/ma-core';
import { TranslateService } from '@ngx-translate/core';

```

The following command creates an instance of `TranslateService`:

```csharp
constructor(private injector: Injector) {
  super();
  let translateService: TranslateService = injector.get(TRANSLATE_SERVICE);
}

```

## The activity data service

The activity data service provides access to the activity descriptor and classification information. This information is a representation of the activity item located in the Master database under the */sitecore/system/Settings/Analytics/Marketing Automation/Activity Types* item.

The following command imports the service type and the injection token:

```text
import { ACTIVITY_DATA_SERVICE, IActivityDataService } from '@sitecore/ma-core';

```

The following command creates an instance of `IActivityDataService`:

```csharp
constructor(private injector: Injector) {
  super();
  let activityDataService: IActivityDataService = injector.get(ACTIVITY_DATA_SERVICE);
}

```

## The server connection service

The server connection service is a wrapper for the HTTP service that comes with Angular. It provides error handling for failed requests and caching for responses.

The following command imports the service type and the injection token:

```text
import { SERVER_CONNECTION_SERVICE, IServerConnectionService } from '@sitecore/ma-core';

```

The following command creates an instance of `IServerConnectionService`:

```csharp
constructor(private injector: Injector) {
  super();
  let serverConnectionService: IServerConnectionService = injector.get(SERVER_CONNECTION_SERVICE);
}

```