Questions tagged [bulk-api]

Bulk API is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, insert, update, upsert, or delete a large number of records asynchronously by submitting batches which are processed in the background by Salesforce.

Filter by
Sorted by
Tagged with
7 votes
4 answers
1k views

Prevent duplicates: Trigger - Workflow Field Update- Trigger w/ Callout - AllOrNone = false

Looking for a generalized solution (for all sobjects/ all trigger-driven services) to this use case: After update trigger invoked; decides a callout via future is needed (could be related record DML ...
user avatar
  • 62.4k
11 votes
4 answers
2k views

Bulk API and Static Variable State

Our trigger logic has some recursion detection built in. Essentially, we have some static variables that act as counters for trigger executions. When our set "max" gets hit, our triggers quit to avoid ...
user avatar
  • 3,959
2 votes
3 answers
932 views

What to use for performing operations on multiple records at once, Apex REST class or Bulk API?

I need to insert/update/delete a variable number of records at a time from a webapp (so from javascript), are there reasons to choose the Salesforce Bulk API over writing a custom Apex REST class to ...
user avatar
  • 1,074
9 votes
1 answer
8k views

How to handle NULL values when inserting with the Dataloader(.io)

I'm uploading records with the amazing dataloader.io and have a hard time to upload some records with NO value for optional fields. What do I have to put in those fields? #N/A 'null' NULL '' "" 0 Is ...
user avatar
6 votes
2 answers
4k views

How to query archived Tasks using Bulk Api

I'm trying to retrieve all Tasks in our Salesforce instance, including those that were archived more than 12 months ago. Since we have over 3 million records, I decided to try the bulk api. It ...
user avatar
  • 191
4 votes
2 answers
8k views

BulkAPI vs Dataloader?

I have never worked on handling large datasets and reading through the documentation raised the below questions in my mind: 1) If I need to load 10,000,000 (10 million) records into salesforce, Can I ...
user avatar
  • 8,362
3 votes
1 answer
534 views

Identify salesforce schema changes

I am backing up Account, Leads, Opportunities and Document objects. Initial level backup is full where I download using BULK API and then incremental subsequently. If there is a change in the schema ...
user avatar
  • 1,079
2 votes
2 answers
4k views

Process Builder Error with Bulk API

I set up a process to update the owner of a custom object (Program), When Formula evaluates to true: [Program__c].OwnerId <>[Program__c].Franchise__c.OwnerId Allow process to evaluate a record ...
user avatar
1 vote
1 answer
3k views

REST api to upload multiple notes and attachments at once

I am working on an app that allows customers to upload images, video, (even gif) into my app. Once the case is processed on my app, I want to place those media files into Salesforce. I have a case ...
user avatar
3 votes
1 answer
2k views

Unexpected Error while trying to perform simple Upsert

When sending the following XML and CSV, I get this error on the Bulk Data Load Job Detail screen: Got an unexpected error while processing BULK-API. Contact support with error ID: 1070223644-7484 ...
user avatar
7 votes
1 answer
2k views

Unable to upload an Attachment - Bulk API

I'm using Bulk API to upload attachments and getting an error: InvalidBatch : Failed to parse CSV header. Number of Records Processed: 0 While I'm getting following error at the Salesforce ...
user avatar
  • 918
8 votes
3 answers
4k views

Bulk API Query - Splitting large query into batches

I'm currently using the bulk-api to return all records for a given sObject. I can make it work via one very large batch, but I think it would be more efficient if I could split it into multiple ...
user avatar
3 votes
1 answer
11k views

Exporting Data to CSV file via Bulk API

I am having trouble with my Bulk API code. What I want is to take the records in the Opportunity object, and a few of their fields, and export them to a csv file for reading. The code is currently as ...
user avatar
  • 33
1 vote
1 answer
1k views

Salesforce Rest API create account

We are using the Salesforce Rest API to integrate our external website with Salesforce Sales Cloud. When a user registers on our website, we create a contact record in Salesforce. The response to ...
user avatar
  • 57
6 votes
5 answers
11k views

Setting field value to Null when using Bulk API

I am trying to create a Data Load Tool similar to Data Loader which will upload the data from a CSV file to Salesforce. This tool is built using java and using "Bulk API". While this tool works fine, ...
user avatar
3 votes
2 answers
1k views

is it possible to execute QueryAll() using Bulk API

We are trying to get deleted records via bulk API, is it possible. I am already aware that with SOAP API this is possible, but if we need to handle large volume of data Bulk should have this option.
user avatar
  • 653
3 votes
1 answer
227 views

Bulk query CampaignMemper query failed

I am running into the following error while querying CampaignMember: -------------- Failed ----------CampaignMember [BatchInfo id='751c0000001HqUQAA0' jobId='750c0000001Mpg1AAC' state='Failed' ...
user avatar
  • 1,079
2 votes
1 answer
746 views

How to get batch count for a Bulk API v2 Job?

Looking at Bulk API 2.0 and Bulk API Developer Guide, I did the following: Create a job Upload Job Data Closed Job I am now interested in knowing how many batches have been created for the job. The ...
user avatar
  • 471
1 vote
1 answer
668 views

InvalidUrl Bulk API creating a bulk job using postman

URI i'm using is: https://yourInstance.salesforce.com/services/async/46.0/job so in my case example is https://cs89.salesforce.com/services/async/46.0/job but it still says InvalidUrl. X-Session-Id ...
user avatar
1 vote
1 answer
16k views

How to get the profile name and role name from User object

We already have a soql query to retrieve the User object (which returns the role id and profile id) was wondering if we could retrieve the RoleName and ProfileName from within the same query instead ...
user avatar
1 vote
1 answer
2k views

Bulk Retreive: Rest API - SF Marketing Cloud

I need to pull various data from Salesforce Marketing Cloud (ExactTarget) including subscriber information, last open, last click, success rate (opens/total eligible campaigns), first bounce date, and ...
user avatar
1 vote
1 answer
172 views

Getting Bulk API details from my.salesforce.com organization

I am trying to query a BULK API Job for its status. My organization's URL ends in my.salesforce.com (e.g. https://.my.salesforce.com) but I cannot figure our the correct URL to get the job status. I ...
user avatar
0 votes
2 answers
506 views

Query 100,000 users from Salesforce

I'm writing a software in C# that need to pull all the information about 100,000 users in Salesforce (Id, Username, all other attributes). I think to use Bulk API for that, it's the best option for ...
user avatar
0 votes
1 answer
2k views

Problem loading million records in Salesforce using Bulk API

Hi I am loading some millions of data in Salesforce using Bulk API. Is there any limitation on that? The external system has failed to insert the records. Records is around 1 million. Is there any ...
user avatar
  • 4,521
0 votes
2 answers
551 views

How can I communicate a trigger exception to user in a bulk upsert for each record?

I am performing a bulk upsert with a large batch (sometimes as much as 3000 records at one time). I am splitting the list of 3000 into 5 batches and performing an upsert using the Bulk API. When I ...
user avatar
  • 149
0 votes
1 answer
2k views

how to query job batches info bulk api 2.0

Before, using bulk api 1.0 endpoint. I could make request to get all job's batches like so: ` req.setEndpoint('callout:BulkApi' + '/' + jobId + '/batch'); req.setMethod('GET'); req.setHeader('...
user avatar