Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
18 views

Bulk API 2.0 Daily CSV upload, need new job every day?

Does a daily CSV upload using the Bulk API 2.0 require a new job created each day? Or can one job handle a new upload daily. Having a hard time finding this on the docs. I see the sample process ...
0
votes
1answer
26 views

Apex: An error has occured reading the CSV fileList index out of bounds: 2

I recieve this error when testing the bulk uploading that we have implemented on our SF environment Apex Class: public class CarrierUpdateController { public transient Blob fileContent {get;set;} ...
-1
votes
0answers
38 views

Bulk API success (201) but no records processed

I am using the bulk API to send records to upsert the Account object. everything seems to work fine, I get a response of 201, but when I look at the Bulk Data load jobs, no records are processed nor ...
0
votes
0answers
39 views

Issue upserting Account Contact Relationship - INVALID_FIELD_FOR_INSERT_UPDATE:Unable to create/update fields: AccountId

I'm upserting Account Contact Relationships the first load, works fine and we are upserting on a customer external ID field. When the upsert is run a second time - we see this error in the logs: "...
1
vote
1answer
10 views

How to upload ContentVersion records using BulkAPI?

So I've been trying to follow the sample java app provided in the documentation to write some Java code to upload ContentVersion records (files) into Salesforce using the Bulk API. It should be so ...
1
vote
1answer
67 views

I am querying more than 2000 records. Is it a good idea to use the BULK API?

I'm new to the Salesforce community, so I apologize if this question is asked wrong. I was running into essentially the exact same problem mentioned in this post. Basically, I have a query that ...
1
vote
0answers
37 views

Bulk API 2.0 Upload for files bigger than 150Mb

I'm trying to use the Bulk API 2.0 to upload big files. I need to know how I have to upload the data in case the file converted to base64 exceeds the 150Mb allowed. After reading the documentation I'...
1
vote
1answer
124 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 ...
0
votes
1answer
22 views

External Website integration with Salesforce

We have an external website that is integrated with Salesforce via REST API. On the website, when a user registers, a contact record is created and also a welcome email is sent right away. Users ...
0
votes
1answer
42 views

Can the Bulk API solve the CPU Time Limit Issue I am having

As it stands currently, I have created a scheduled apex job that is supposed to run nightly and compare records being imported into a 'staging' object against records already in custom objects, and ...
1
vote
1answer
59 views

DateTime values in Bulk Query results - difference between CSV and JSON formats

I'm running Bulk API queries in Python, using both the simple_salesforce and salesforce_bulk libraries. I've encountered a confusing result when querying DateTime fields. Given a simple_salesforce ...
1
vote
1answer
48 views

Bulk API 2.0 works in sandbox but broken in production

I'm trying to bulk import Task records using the Bulk API 2.0, which works perfectly fine in the sandbox, but fails with this error every time when I try to create the job in production: [{"errorCode"...
0
votes
0answers
18 views

Monitor import wizard for platform Users

My org has some Users who import data through import wizard. It works for them but they are not able to monitor it as they don't have permission to monitor bulk load, Neither can i give them the '...
2
votes
1answer
55 views

Exporting Related Object Records - Bulk Api / DataLoader

I am looking to export only case comments and notes related to particular standard and custom objects. Ex: All CaseComments for cases of a particular record type. All notes for a custom object with a ...
1
vote
0answers
77 views

How do I get the record ID's for a bulk data insert using sfdx CLI?

I'm trying to use sfdx-cli to perform bulk-insert jobs, but can't find a way to access the batch results on a per row level. I see that the command force:data:bulk:status informs you of how many ...
4
votes
0answers
60 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 ...
3
votes
0answers
110 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/...
0
votes
1answer
194 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 ...
0
votes
1answer
94 views

Trouble Using Bulk API 2.0 Multipart Request

I am sending up this payload --BOUNDARY Content-Type: application/json; charset=utf-8 Content-Disposition: form-data; name="job" {"columnDelimeter":",","contentType":"CSV","lineEnding":"\r\n","object"...
0
votes
1answer
151 views

Trouble with Creating a Job for Bulk API 2.0

I'm Using this documentation https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/create_job.htm With this URI https://cs30.salesforce.com/services/async/44.0/jobs/ingest ...
1
vote
0answers
35 views

Staggered query of Salesforce bulk api from Ruby

I'm trying to do a staggered query using the Bulk API from a RoR app since the filter (WHERE App_Id__c IN :listOfIds) I'm using is over 4000 chars. The list of IDs I'm filtering on is quite long, so ...
4
votes
1answer
38 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 ...
1
vote
1answer
127 views

Bulk API 1.0 - use Workbench

How can I use Bulk API 1.0 (for query) with Salesforce Workbench (or Postman) ? I found that doc explaining Bulk API 1.0 but only with cURL, and I'd like to use Workbench or Postman if possible, but ...
2
votes
1answer
486 views

Setting the batch size via Bulk API

I'm using the Bulk API to make updates to ~50k records. I'm splitting those up into jobs of about 5k apiece, but I was hoping there'd be a way to control the batch size similar to that of using ...
4
votes
2answers
186 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 ...
1
vote
2answers
77 views

Salesforce Bulk API Unable to lock row

I'm currently using the Salesforce Bulk API within a Rails app to update a custom object in Salesforce. This works fine when I send a single record through, but when I batch in sets of 200, I get ...
2
votes
1answer
176 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: { "...
0
votes
1answer
54 views

Mass Update Records - AWS S3

Currently, I utilize an AWS endpoint that returns a small JSON response based on my request. I am considering updating all of my records (300,000+) daily. My AWS counterparts can generate a JSON ...
1
vote
1answer
312 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 ...
4
votes
1answer
173 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>...
0
votes
1answer
125 views

Bulk Api parent child relation

i am trying to use Bulk Api to create a case. Case object contains Account,other custom child objects and Account contains Contact. How can i insert/update/upsert this object structure using BulkApi ...
1
vote
1answer
106 views

Salesforce Bulk APi Session Id

I have used the salesforce REST API a ton in the past, but I am at the point where I need more speed for fetching/inserting/updating a large number of records at once. I have a remote application ...
0
votes
2answers
139 views

How Can I mass delete Account Records with a specific Record Type in Salesforce using Workbench?

I tried to delete Account Records using workbench and it gives me this error: Failed: InvalidBatch : Referenced file "request.txt" is missing or is a directory I am not able to understand how to ...
0
votes
0answers
148 views

Bulk API with PK-Chunking creates huge sets of batches when query is with where clause and subset of the records needs to be extracted

We have a Java API which uses Bulk API to extract records from an Object. The "select query" has a where clause, which should extract a subset of records, to honour the where clause, but we see that ...
2
votes
2answers
184 views

Using bulk API, do seperate serial batches still run parallel to eachother?

I have to load several million child records distributed over about 2000 parent records, so obviously I'm running into locking issues. I'm trying to find a way to avoid locks as much as possible, so I ...
0
votes
0answers
42 views

How do the Bulk API Jobs Status work?

I'm currently automating some data migrations with the SFDX CLI and I came upon a situation which confused me. While loading data with the command sfdx force:data:bulk:upsert and checking it with the ...
0
votes
1answer
48 views

null result in bulk api 2

I followed the insert walkthrough in the bulk api 2 docs. But when I checked the results I got 0 records processed and an unhelpful status of null:InternalServerError : null I toyed with the ...
0
votes
1answer
54 views

Does Bulk API 2.0 support field mapping?

Does Bulk API 2.0 support field mapping like old version as per below link? https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_mapping.htm
0
votes
0answers
244 views

Retrieve large data sets from salesforce using Rest API or Bulk API

We have external system which retrieves the data from Salesforce by using Rest Api. It was working fine till the return resultSet is limited. However, when we are working on large data set it works as ...
1
vote
1answer
574 views

Uploading files to SFDC attachment object using REST call

I have requirement to upload files to SFDC attachments object. I am making REST call from my Java code to SFDC with required details. curl -X POST \ https://ap.salesforce.com/services/data/v29.0/...
0
votes
0answers
153 views

Record with duplicate external id was inserted through bulk API upsert

I have Account with user id as external id. I have a record of Account with user id 123 created 2 months ago. I have an upsert job created through bulk API yesterday with user id as ...
0
votes
1answer
51 views

How to handle Exception for bulk update in trigger

I have one Object for which we are doing bulk data update from Mulesoft, there is nothing which we are doing in salesforce for the same. Now due to some validation, few records are getting failed. I ...
0
votes
1answer
233 views

Exporting data APIs?

What's the best way to programatically export data in a custom object from Salesforce? Like with the Bulk API 2.0, but to automatically export data daily from Salesforce to a system in another server....
1
vote
0answers
63 views

OAuth2.0 returns unreachable instance_url

We've run into a very interesting (and frustrating!) problem while onboarding a customer whose Salesforce instances are on the *.cloudforce.com domains. Our app uses OAuth2 to connect with our clients'...
0
votes
1answer
452 views

Understanding the implementation of “Use Bulk API” Trailhead

With regards to this trailhead: Use Bulk API I have completed the example provided in the explanation part, but when I came to the actual challenge, I was stumbled. In the example, it says: For ...
0
votes
0answers
240 views

Bulk API v2.0 Failed records are confused

I'm developing code in java for upload data to Salesforce. All did fine but I've a problem with failed records with bulk API 2.0 with upsert action I have the next file csv for upload data for ...
0
votes
1answer
103 views

Error when bulk updating Saleforce

I have a dataframe of two columns namely Id and datetimehelp (Holds time stamp value). Given below is the view of the data in the dataframe labelled account_update_subset Id,datetimehelp 123,18/05/...
1
vote
1answer
17 views

How to make uniqueness check for email on contact object

We are ISV and using Bulk API we are creating contact objects. However we want to ensure if contact with a given email exist, it should be updated rahter than creating duplicate contact object with ...
0
votes
0answers
205 views

Error when doing a bulk update using simple_salesforce in python

I am trying to do a bulk update to account object in Salesforce. Given below is the code I use to update. Note: Running in a sandbox environment #Upload to Salesforce #Insert Subset if len(...
1
vote
2answers
545 views

FIELD_CUSTOM_VALIDATION_EXCEPTION happens without upserting the field

I wrote a script to export the data to SFDC using the bulk API 2.0 I upserts a bunch of user ids which is an external id of the object. I was expecting it returns errors "REQUIRED_FIELD_MISSING:...