BackgroundOperation

Represents a background operation in an asynchronous job queue. This object is available in API version 35.0 and later.

Supported Calls

describeSObjects(), getDeleted(), getUpdated(), retrieve()

Special Access Rules

  • BackgroundOperation doesn’t support search.

Fields

Field Name Details
Error
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The error message for the operation. Applies only if the operation has an error status.
ExecutionGroup
Type
string
Properties
Filter, Group, Nillable, Sort
Description
Applies only if the operation is merged with other operations into an execution group to be processed in bulk. Identifies the execution group.
ExpiresAt
Type
dateTime
Properties
Filter, Nillable, Sort
Description
After this time, the operation is removed from the asynchronous job queue. Applies only if the operation has a status of complete, canceled, error, or merged.
FinishedAt
Type
dateTime
Properties
Filter, Nillable, Sort
Description
When the operation reached the status of completed or error.
GroupLeaderId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
Applies only if the operation is merged with other operations into an execution group to be processed in bulk. Identifies the operation that’s selected as the leader of the execution group.
This is a relationship field.
Relationship Name
GroupLeader
Relationship Type
Lookup
Refers To
BackgroundOperation
Name
Type
string
Properties
Filter, Group, idLookup, Sort
Description
Identifies the background operation.
NumFollowers
Type
int
Properties
Filter, Group, Nillable, Sort
Description
Applies only if the operation is merged with other operations into an execution group to be processed in bulk. Number of other operations that are in the execution group.
ParentKey
Type
string
Properties
Filter, Group, idLookup, Nillable, Sort
Description
Tag that identifies related sets of operations, if any.
ProcessAfter
Type
dateTime
Properties
Filter, Nillable, Sort
Description
The operation is scheduled to be processed after this time.
RetryBackoff
Type
int
Properties
Filter, Group, Nillable, Sort
Description
Applies only if the operation has an error status. The first retry is attempted immediately. Each subsequent retry is increasingly delayed according to an exponential expression that’s multiplied by the RetryBackoff, in milliseconds.

Specifically, the delay time is (2n-1)×R, where n is the RetryCount, and R is the RetryBackoff.

The default value for RetryBackoff depends on the type of operation. For example, the RetryBackoff default for write operations on external objects is 1,000 milliseconds. For write operations, retries are attempted immediately, after 3 seconds, after 7 seconds, after 15 seconds, and so on.

RetryCount
Type
int
Properties
Filter, Group, Nillable, Sort
Description

Number of attempted retries. Applies only if the operation has an error status.

RetryLimit
Type
int
Properties
Filter, Group, Nillable, Sort
Description

Maximum number of retries to attempt. Applies only if the operation has an error status.

SequenceGroup
Type
string
Properties
Filter, Group, Nillable, Sort
Description
Identifies the sequence group. Applies only if the operation is merged with other operations into an execution group to be processed in bulk. Within an execution group, operations can be placed into a sequence group to be executed in a specific order.
SequenceNumber
Type
int
Properties
Filter, Group, Nillable, Sort
Description
Order position within the sequence group. Applies only if the operation is merged with other operations into an execution group to be processed in bulk. Within an execution group, operations can be placed into a sequence group to be executed in a specific order.
StartedAt
Type
dateTime
Properties
Filter, Nillable, Sort
Description

When the operation started running.

Status
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Status of the background operation. The options are:
  • New
  • Scheduled
  • Canceled
  • Merged
  • Waiting
  • Running
  • Error
  • Complete
SubmittedAt
Type
dateTime
Properties
Filter, Nillable, Sort
Description
When the operation was added to the job queue.
Timeout
Type
int
Properties
Filter, Group, Nillable, Sort
Description
Maximum time in milliseconds to wait for results after the operation started running.
Type
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Type of the background operation. The options are:
  • ApiCatalogPoller
  • BlockchainEventPoller
  • CdpMetadataDeploy
  • ExternalChangeDataCapture
  • ExternalConnectivityPoller
  • ExternalObject
  • ExternalObjectSync
  • ExternalServiceCallback
  • MetadataChangesetOperation
  • MfgBulkUpdate
  • SingularityAutoSync
  • SingularityMDSSubsetSync
  • SiteTaskCreate
  • SiteTaskPublish
  • Sweeper
  • WebCart
  • XClean
WorkerUri
Type
string
Properties
Filter, Group, idLookup, Nillable, Sort
Description
URI of the worker that performed the operation.
Example for a Salesforce Connect OData operation:
services/data/v35.0/xds/upsert

Usage

The BackgroundOperation object lets you:

  • Monitor the job status of asynchronous operations.
  • View errors that are related to the asynchronous operations.
  • Extract statistics for the asynchronous job queue.