Newer Version Available
How Requests Are Processed
Job States
When you create job requests with Bulk API 2.0, Salesforce provides a job “state” to describe the progress or outcome of the job. You can manually Check the status of the job, or you can view job state from within the Salesforce UI. From Setup, in the Quick Find box, enter Bulk Data Load Jobs, and then select Bulk Data Load Jobs. The following table summarizes Bulk API 2.0 job states during job creation and processing.
| Job Phase | State | Description |
|---|---|---|
| Creation | Open | An ingest job was created and is open for data uploads. |
| Creation | UploadComplete |
(Ingest) All job data has been uploaded. The job is queued and ready to be processed. (Query) Salesforce has put the query job in the queue. |
| Processing | InProgress | The job is being processed by Salesforce. Operations include automatic, optimized batching or chunking of job data, and processing of job operations. |
| Outcome | JobComplete | The job was processed. |
| Outcome | Failed | The job couldn’t be processed successfully. |
| Outcome | Aborted | The job was canceled by the job creator, or by a user with the “Manage Data Integrations” permission. |
Ingest Jobs
While processing ingest jobs, Salesforce Bulk API 2.0 automatically divides your job’s data into multiple batches to improve performance.
Salesforce creates a separate batch for every 10,000 records in your job data, up to a daily maximum of 150,000,000 records. If the limit is exceeded while processing your job data, the remaining data isn’t processed. The ingest job is marked as having failed.
Just as a job can fail, so can an individual batch. If Salesforce can’t process all the records in a batch within 10 minutes, the batch fails. Salesforce automatically retries failed batches up to a maximum of 10 times. If the batch still can’t be processed after 10 retries, the entire ingest job is moved to the Failed state and remaining job data isn’t processed.
To determine what records weren’t processed and what errors occurred, use the Failed Record Results and Unprocessed Record Results resources.
Query Jobs
Bulk API 2.0 query jobs enable asynchronous processing of SOQL queries. Instead of manually configuring batches, Bulk API 2.0 query jobs automatically determine the best way to divide your query job into smaller chunks, helping to avoid failures or timeouts. The API automatically handles retries. If you receive a message that the API retried more than 15 times, apply a filter criteria and try again.
Bulk API 2.0 is optimized to chunk large query jobs with the following objects:
- Account
- AccountContactRelation
- AccountTeamMember
- AiVisitSummary
- Asset
- B2BMktActivity
- B2BMktProspect
- Campaign
- CampaignMember
- CandidateAnswer
- Case
- CaseArticle
- CaseComment
- Claim
- ClaimParticipant
- Contact
- ContractLineItem
- ConversationEntry
- CustomerProperty
- EinsteinAnswerFeedback
- EmailMessage
- EngagementScore
- Event
- EventRelation
- FeedItem
- Individual
- InsurancePolicy
- InsurancePolicyAsset
- InsurancePolicyParticipant
- Lead
- LeadInsight
- LiveChatTranscript
- LoginHistory
- LoyaltyLedger
- LoyaltyMemberCurrency
- LoyaltyMemberTier
- LoyaltyPartnerProduct
- LoyaltyProgramMember
- LoyaltyProgramPartner
- Note
- ObjectTerritory2Association
- Opportunity
- OpportunityContactRole
- OpportunityHistory
- OpportunityLineItem
- OpportunitySplit
- OpportunityTeamMember
- Pricebook2
- PricebookEntry
- Product2
- ProductConsumed
- ProductRequired
- QuickText
- Quote
- QuoteLineItem
- ReplyText
- ScoreIntelligence
- ServiceContract
- Task
- TermDocumentFrequency
- TransactionJournal
- User
- UserRole
- VoiceCall
- WorkOrder
- WorkOrderLineItem
This optimization also includes custom objects, and any Sharing and History tables that support standard objects.