---
schema_version: "1"
id: 5a1f85ad6e495a625e9fecdd7b43e797b85c7eb123223c18999945255ee0d68f
title: Automation
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/automation.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/automation.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d950069e6829a769df0523f93cc17c0d19332451fdbaa061971ea7249682cbe2
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Automation

Defines an automation in Automation Studio.

To modify or delete an automation, you must have the **Automation | Automations | Write** permission. To start an automation, you must have the **Automation | Automations | Execute** permission.

## Properties

| Name                   | Data Type                                                            | Description                                                                                                                                                                                        |
| ---------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AutomationInstanceID` | String                                                               | The unique ID for a specific run (instance) of an automation.                                                                                                                                      |
| `AutomationSource`     | [AutomationSource](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/automationsource.md) object                       | An object that identifies the source of the automation.                                                                                                                                            |
| `AutomationTasks`      | Array of [AutomationTask](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/automationtask.md) objects                 | An array of objects. Each object specifies a task in the automation.                                                                                                                               |
| `AutomationType`       | String                                                               | The type of automation.                                                                                                                                                                            |
| `Client`               | [ClientID](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/clientid.md) object                                       | Defines which account owns the automation.                                                                                                                                                         |
| `CorrelationID`        | String                                                               | Identifies calls involved in a specific asynchronous process.                                                                                                                                      |
| `CreatedBy`            | Long                                                                 | The ID of the user who created the automation.                                                                                                                                                     |
| `CreatedDate`          | DateTime                                                             | The date and time when the object was created. Read-only.                                                                                                                                          |
| `CustomerKey`          | String                                                               | A user-supplied unique identifier for the automation, sometimes referred to as the external key.                                                                                                   |
| `Description`          | String                                                               | A description of the object.                                                                                                                                                                       |
| `ID`                   | Integer                                                              | A unique ID for the object.                                                                                                                                                                        |
| `InteractionObjectID`  | String                                                               | A unique ID for activities within the asynchronous process of the overall conversation or program.                                                                                                 |
| `IsActive`             | Boolean                                                              | Specifies whether the object is active.                                                                                                                                                            |
| `Keyword`              | String                                                               | Not used.                                                                                                                                                                                          |
| `LastSavedBy`          | Long                                                                 | The ID of the user who last saved the automation.                                                                                                                                                  |
| `ModifiedBy`           | Long                                                                 | The ID of the user who last modified the automation.                                                                                                                                               |
| `ModifiedDate`         | String                                                               | The date and time when the object was last modified. Read-only.                                                                                                                                    |
| `Name`                 | String                                                               | The name of the automation.                                                                                                                                                                        |
| `NewObjectID`          | String                                                               | The unique ID of the newly created automation object. This value is used in later API calls (Retrieve, Perform, Update, Pause) to refer to that specific automation.                               |
| `Notifications`        | Array of [AutomationNotification](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/automationnotification.md) objects | An array of objects. Each object represents a notification to send when the automation completes.                                                                                                  |
| `ObjectID`             | String                                                               | A unique ID for the object.                                                                                                                                                                        |
| `ObjectState`          | String                                                               | Not used.                                                                                                                                                                                          |
| `Owner`                | [Owner](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/owner.md) object                                             | Describes the account ownership of a subscriber in an account that is managed on your behalf.                                                                                                      |
| `PartnerKey`           | String                                                               | A unique identifier for an object, provided by a partner. This property can only be accessed by using the API.                                                                                     |
| `PartnerProperties`    | Array of [APIProperty](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/apiproperty.md) objects                       | A collection of metadata supplied by the client and stored by the system. This property can only be accessed by using the API.                                                                     |
| `ProgramID`            | String                                                               | An identifier for the automation. Read-only.                                                                                                                                                       |
| `Schedule`             | [ScheduleDefinition](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/scheduledefinition.md) object                   | An object that represents the schedule for the automation.                                                                                                                                         |
| `ScheduledTime`        | DateTime                                                             | The date and time when the automation is scheduled for publishing. Specify the value in ISO 8601 format with UTC time or a timezone offset. The specified time can be up to 30 days in the future. |
| `Status`               | Integer                                                              | A code that indicates the status of the automation. See [Status Codes](#status-codes) for more information.                                                                                        |

**note:** The values of the `ScheduledTime` and `CreatedDate` properties are always shown as "0001-01-01T00:00:00.000".

## Status Codes

The `Status` property can contain the values in this table.

| Code | Description                                 |
| ---- | ------------------------------------------- |
| `-1` | The automation failed.                      |
| `0`  | The automation failed while being built.    |
| `1`  | The automation is being built.              |
| `2`  | The automation is ready to start.           |
| `3`  | The automation is running.                  |
| `4`  | The automation has been paused.             |
| `5`  | The automation has been stopped.            |
| `6`  | The automation is scheduled.                |
| `7`  | The automation is waiting for a trigger.    |
| `8`  | The trigger for the automation is inactive. |

## See Also

- [Supported Operations for Objects and Methods](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/supported_operations_for_objects_and_methods.md)
- [Interact with Automation Studio](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/interacting_with_automation_studio_via_the_web_service_soap_api.md)
