0

I have a question regarding the Bulk API. It is stated that the Batches are processed asynchronously by Salesforce. I think it is meant that sending multiple batches for one job would be imported asynchronously. But, what if I send multiple jobs with multiple batches. Would be the job mixed together?

Example: Job 1 Batch A Batch B

Job 2 Batch X Batch Y

Batch A and B are processed asynchronously. Batch X and Y are processed asynchronously. But can be also happen that Batch X is processed before Batch B, for example?

Simply, are the Jobs also processed asynchronously?

Thanks in advance.

  • The jobs, just like the batches are processed when the server has capacity to do so. So yes, kind of. – Jesse Milburn Oct 10 '16 at 12:07
  • Thank you. I have such a question then. What if Job 1's object is related with Job 2's object. I have to be sure that Job 1 is run successfully and job 2 can start. I know that there exists the Monitoring of batches. But I cannot continuously send requests to get the batch statuses. Would you have a solution for this? – orsan Oct 10 '16 at 12:34
  • If you have dependencies then you shouldn't run your 2nd job until you are sure your first is completed. You can always check the job status in your process. And why can't you continuously poll the job status??? – Jesse Milburn Oct 10 '16 at 12:39
  • Wouldn't there be a limit to send the api request for the job status? What if I have to send 1000 or more requests just to get a Completed message? – orsan Oct 10 '16 at 13:53
0

Multiple jobs can be processed asynchronously in parallel. This means that you'll need to make sure your first job completes before the second one is started if there's a dependency. However, monitoring the batch is only a normal API call. This means that, for most orgs, calling for a status update 1,000-2,000 times isn't a problem, since even developer edition orgs now have 15,000 API calls per day.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.