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
11 votes
2 answers
22k views

How to perform upsert in Salesforce Bulk API

I have created a class with which I can insert, update and delete records from Salesforce using their bulk API. I have searched the web and have come across various resources; but I cannot seem to ...
user avatar
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
10 votes
1 answer
2k views

Can't I use ALL ROWS in asynchronous Salesforce queries?

I would like to perform asynchronous queries that could retrieve deleted rows as well. However, if I submit a batch with SOQL like select Id, IsDeleted, Name from Account where IsDeleted = true and ...
user avatar
  • 451
10 votes
1 answer
3k views

How to convert Person (consumer) Account to Business Account and keep the same URL

The backstory: The org I am working in allows Person (consumer) and Business records to be created by users and a host data push process in Account. As a result, today we have a large number of each ...
user avatar
10 votes
1 answer
1k views

Providing multiple batches to the Bulk API 2.0

We're attempting to create multi-batch jobs in the Bulk API 2.0. Our previous single-batch workflow was to do: POST /services/data/v43.0/jobs/ingest PUT /services/data/v43.0/jobs/ingest/<job-id>...
user avatar
9 votes
4 answers
18k views

Bulk api query batch size limit is 10,000 records

When running bulk api query, batch size limit is 10,000 records (from documentation: A batch can contain a maximum of 10,000 records.) What can I do if my query result is bigger than 10000, how can I ...
user avatar
  • 91
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
9 votes
2 answers
6k views

How to retrieve compound fields like address using Bulk API?

Attempting to retrieve address fields (such as BillingAddress on Account) via Bulk API gives an error: Failed to process query: FUNCTIONALITY_NOT_ENABLED: Selecting compound data not supported in ...
user avatar
  • 16.2k
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
8 votes
2 answers
4k views

Problem creating Job in Bulk API

I have been successfully able to use REST API for my application but I found that Bulk API will be better for my application. So, now I am trying to switch to Bulk API but I am stuck at the first step....
user avatar
  • 81
7 votes
1 answer
1k views

Query API Limits

Is there a way to programmatically query how many API calls an organization has made for the 24-hour period? We have a program that imports data from external databases to SFDC in a fancy way, and we ...
user avatar
  • 7,326
7 votes
2 answers
6k views

Will Trigger and Workflow get fired while using Bulk API

I am trying to upsert records in Account using Bulk API. After upserting records I need to update some of the custom field values to standard field values using trigger or workflow. Is it possible ??? ...
user avatar
7 votes
1 answer
434 views

Recommended architecture for bulk-refreshing Salesforce?

We would like to keep Salesforce synced with data from our organization's back-end. The organizational data gets updated by nightly batch processes, so "real-time" syncing to Salesforce isn't in view. ...
user avatar
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
7 votes
4 answers
5k views

Bulk API & Foreign Key Resolution on Lookup Fields

We are designing an Integration leveraging Bulk API & Enterprise WSDL (The client code is handled by the source system). The target Force.com Object has few Lookup Fields. Wanted to understand how ...
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
6 votes
1 answer
2k views

Uploading 100,000 binary files as attachments to Case record - best approach

I want to upload files (.doc, .pdf) from external system to the attachments of Case record. There are two approaches I have found from Salesforce Help. 1) Uploading Attachments by data loader ...
user avatar
6 votes
1 answer
1k views

Bulk data API: How to Avoid Upserts

I'm working on an daily integration of about 5 million records (file delta's is not an option). Best practices for large data volumes recommends avoiding upserts. The only alternative solution I can ...
user avatar
  • 9,537
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
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
6 votes
1 answer
364 views

Is there a way to know if a bulk query result was truncated due to size limit?

The documentation says that bulk queries' results are limited in size. http://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_concepts_limits.htm However I can't find any ...
user avatar
5 votes
1 answer
5k views

NUMBER_OUTSIDE_VALID_RANGE: value outside of valid range on numeric field: 100.0

I get this error in the results of a Bulk API upsert: 'NUMBER_OUTSIDE_VALID_RANGE:Normalized Score: value outside of valid range on numeric field: 100.0:normalized_score__c --' The metadata for that ...
user avatar
  • 453
5 votes
2 answers
1k views

What is the maximum time limit whithin which we can add batches to the Bulk data load using Bulk API

I am wondering will there be any time limit for the batches to added to a Bulk API job once after the job has been initiated and before it can be closed? To be short, how long will a Bulk API job ...
user avatar
  • 6,644
5 votes
1 answer
231 views

Bulk API Upserting Datetime fields - Time is Off By Inconsistent Number of Minutes

I am upserting data to Datetime fields using the Bulk API. Here is an example Datetime value that I've loaded to a record (from the Bulk API logs to confirm): [{"External_Id__c": "...
user avatar
  • 435
5 votes
1 answer
2k views

Does Salesforce Bulk API 2.0 accept JSON as the contentType?

I see that Bulk API 1.0 supports JSON payload as the content type for insert operations. However, I cannot ascertain if Bulk API 2.0 also supports JSON. In my Job Create body I've tried sending: { "...
user avatar
5 votes
1 answer
2k views

large bulk insert/delete using jsforce

When I'm trying to insertBulk a lot of records using jsforce, only 10k records get inserted (single bulk job is being registered). The same happens with bulkDelete, when piping query result to ...
user avatar
5 votes
1 answer
713 views

How many batches can be created in a JOB via Bulk API?

I went through limitations about Bulk API but could not get explanation on the limit of Batches created per job in Salesforce. I can read Batch limitation but no limitation in Job. Your help is ...
user avatar
5 votes
1 answer
1k views

Disable Data Loader by Profile

Is it possible to disable the data loader based on profile (or role)? We have some non-tech users who like to use the data loader for bulk updates, unfortunately, they are also making mistakes when ...
user avatar
5 votes
2 answers
280 views

Transformation Spec limitation in Bulk API v1.0

We're using Transformation Spec feature of the bulk api when uploading records: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_mapping.htm This allows us to ...
user avatar
5 votes
2 answers
2k views

Rollback/Fail Entire Data Load on Error Instead of Partial Load

we have a process where we are loading events in via the Data Loader and have a before insert trigger on the event/activity to handle these records as they are being processed. We'd like that if one ...
user avatar
5 votes
1 answer
271 views

Bulk API Row Lock Root

How to get confirmation that Inserts/Deletes of Contacts using the Bulk API will cause Row Lock errors on the parent Accounts, especially if the # of Contacts is large and there are few parent ...
user avatar
  • 2,493
5 votes
1 answer
2k views

How to reliably detect whether BULK API is enabled for an org

We have a managed package which loads data into customer Salesforce orgs. We attempt to use the BULK API first and fall back to the REST API if necessary. So we need to be able to detect if the BULK ...
user avatar
  • 520
5 votes
1 answer
1k views

SalesForce Batch Compression Unexpected Error

In SalesForce' Bulk API, on page 60 of their documentation: Compression The only valid compression value is gzip. Compression is optional, but strongly recommended. Note that compression doesn'...
user avatar
4 votes
1 answer
4k views

Bulk API Error: UNABLE_TO_LOCK_ROW:unable to obtain exclusive access to this record or 124 records

During the process of loading 90,000 opportunities into Salesforce using the Bulk API, I get this error: UNABLE_TO_LOCK_ROW:unable to obtain exclusive access to this record or 124 records... After ...
user avatar
  • 8,292
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
4 votes
2 answers
2k views

Specify large set of IDs in SOQL query

I have an object with around 2 million records and list of IDs that I need to extract. The list is around 20k entries. Surely I can't just chug them into query parameter? What is the best way to do ...
user avatar
  • 4,479
4 votes
1 answer
229 views

A Few API Related Doubts

My first is related to Enterprise WSDL vs Partner WSDL. I know the basic difference between two: tightly coupled vs loosely coupled, one is tied to specific organization while other is used to build ...
user avatar
4 votes
3 answers
539 views

How can I *automatically* "restore" a sandbox environment with exactly the same data set?

I would like to be able to automatically "restore" a sandbox (actually developer org) with the same set of data. The org will be used for in-house training purposes, and the idea is that at the end of ...
user avatar
  • 3,363
4 votes
1 answer
237 views

Are salesforce reports persistent objects on the database?

Are salesforce.com reports actual objects that can be accessed on the database (e.g. using the BULK API)? Or are they really only metadata containing the queries required to return the data 'on the ...
user avatar
4 votes
2 answers
783 views

Updating record from Ruby on Rails to Salesforce

I'm using a Ruby gem that utilizes the Salesforce Bulk API and a few sidekiq workers to update records within Salesforce and am running into a UNABLE_TO_LOCK_ROW error. The issue stems from the ...
user avatar
  • 1,226
4 votes
3 answers
2k views

REST OAuth connection for Bulk API queries

Is it possible to authenticate an OAuth app for the user and then make Bulk API queries on their behalf? The results are easily going to be more than 20k records each authenticated user. When I have ...
user avatar
4 votes
1 answer
2k views

AllOrNoneHeader for Bulk API

I am trying to switch off Autocommit feature by using AllOrNoneHeader in Bulk API implementation through JAVA. I have searched over internet but see only example of implementing it for SOAP based ...
user avatar
4 votes
2 answers
484 views

Execution order of multiple Duplicates rules on an Object

I have two active duplicate rules on Account object. Is there a particular order in which they are executed? or is it random? If a record is marked as "duplicated" by a Duplicate Rule, this record ...
user avatar
  • 149
4 votes
3 answers
5k views

Query Bulk Data Load Jobs once completed

Can someone tell me how to query the data which is displayed in " Monitor Bulk Data Load Jobs" Section "Completed last 7 days"
user avatar
4 votes
2 answers
1k views

BULK API cURL commands to GET 100k records from Account

curl "https://xxx.salesforce.com/services/data/v35.0/query/?q=SELECT+Id,+Name,+Phone+FROM+Account" -H "Authorization: Bearer <access token> " But this only fetching 2000 records. I need all ...
user avatar
  • 39
4 votes
1 answer
946 views

Bulk API - Records in different parallel batches not visible in trigger

We're loading thousands of records into a custom object (Address__c) over the Bulk API, in parallel mode. It has a Master-Detail relationship with Contact There's a checkbox field on the object (...
user avatar
  • 1,621
4 votes
1 answer
2k views

SOQL query to load all documents in a content library

I am trying to query for all the documents in a library using the BULK API. The SOQL query I use is SELECT ContentDocument.Id,ContentDocument.CreatedDate,ContentDocument.LastModifiedDate,...
user avatar
4 votes
0 answers
80 views

SOQL query results differ on selecting from varying columns

I'm querying on Contact object where the results are varying on Bulk API vs querying on developer console. Total records on Contact is 997820. Query on developer console: select count(id) from ...
user avatar
  • 1,079
4 votes
0 answers
824 views

Salesforce Bulk API v2.0 INVALID_SESSION_ID

Following the Salesforce Bulk API v2.0 documentation at: https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/walkthrough_upload_data.htm https://developer.salesforce.com/...
user avatar
  • 203
4 votes
0 answers
198 views

Upserting objects with many to many relationship using api

I am writing a script to run on a schedule to automatically import data from our accounting software into salesforce using their API. I cannot find a good way to upsert objects with many to many ...
user avatar

1
2 3 4 5
8