AiJobRun

Represents an execution instance of an AI job. This object tracks the overall status and manages the lifecycle of the job from initiation to completion. This object is available in API version 63.0 and later.

Supported Calls

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()

Fields

Field Details
EndTime
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
The time when the job run ends.
ErrorCode
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
If the job run fails, this field indicates the specific error that occurred.
ErrorMessage
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Contains a detailed, human-readable message that explains the reason for the job run failure.
JobType
Type
picklist
Properties
Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
Description
Defines the job's logic.
Possible values are:
  • PromptTemplate
Label
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A user-defined name or label for the job run, which can be used for identification and tracking.
Name
Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
A unique, system-generated identifier for the AiJobRun record.
OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The user group that owns the AiJobRun record.
This field is a polymorphic relationship field.
Relationship Name
Owner
Refers To
Group, User
StartTime
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
The time when the job run's status changes to InProgress.
Status
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Tracks the lifecycle of the job run. Valid values are:
  • New: The job run has been created.
  • ReadyToStart: The job run is ready for the user to initiate processing.
  • Queued: The job run is queued to start.
  • InProgress: The job run is currently processing.
  • Completed: The job run completed.
  • Failed: The job run failed.
  • Aborted: The job run was aborted by the user.
  • Archived: The job run was archived by the user.
Target
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
A metadata field used to specify job-specific details, such as a PromptTemplateId, PromptTemplateName, or ModelId. This provides further context for the job execution.