CloseJob
Closes a Salesforce job to indicate it is complete and no longer accepting new data.
Input
| Name | Type | Description |
| JobId | String | Unique identifier of the Salesforce Bulk API job that is being closed to prevent submission of additional batches. |
Result Set Columns
| Name | Type | Description |
| ID | String | Unique ID of the closed job returned by Salesforce. |
| JobID | String | Alias for the job ID, confirming the job that was closed. |
| ObjectName | String | API name of the Salesforce object involved in the job, such as Account, Lead, or Contact. |
| Operation | String | Type of operation the job was performing, such as insert, update, upsert, delete, query, or hardDelete. |
| ApiVersion | String | Version of the Salesforce API used when the job was created. Determines available features and fields. |
| ApexProcessingTime | String | Cumulative milliseconds spent executing Apex triggers and automation logic across all job batches. Excludes asynchronous Apex. Available from API version 19.0 onward. |
| ApiActiveProcessingTime | String | Total active processing time in milliseconds, including Apex execution but excluding wait time and serialization. Available from API version 19.0 onward. |
| AssignmentRuleId | String | ID of the assignment rule used in case or lead routing during the job execution. |
| ConcurrencyMode | String | Specifies whether the job was processed in 'parallel' or 'serial' mode, affecting how records are locked and processed. |
| ContentType | String | File format used for job data. Valid values include CSV, XML, ZIP_CSV, and ZIP_XML. |
| CreatedById | String | ID of the Salesforce user who created the job. |
| CreatedDate | String | Timestamp indicating when the job was created in Salesforce. |
| ExternalIdFieldName | String | Name of the external ID field used for matching records in upsert operations. |
| NumberBatchesCompleted | String | Total number of batches that completed successfully in the job. |
| NumberBatchesQueued | String | Number of batches currently in queue waiting for processing. |
| NumberBatchesFailed | String | Number of batches that failed during job execution. |
| NumberBatchesInProgress | String | Number of batches actively being processed at the time the job was closed. |
| NumberBatchesTotal | String | Total number of batches submitted to the job. This value is final once the job is closed or failed. |
| NumberRecordsFailed | String | Total number of records that failed processing across all batches. Available from API version 19.0 onward. |
| NumberRecordsProcessed | String | Total number of records successfully processed within the job. |
| NumberRetries | String | Number of retry attempts Salesforce made to save operation results due to temporary issues such as record locks. |
| State | String | Current state of the job after closure. Possible values include Open, Closed, Aborted, or Failed. |
| SystemModStamp | String | UTC timestamp when the job was last modified or completed. |
| TotalProcessingTime | String | Cumulative processing time in milliseconds across all batches. Includes ApexProcessingTime and ApiActiveProcessingTime. Available from API version 19.0 onward. |