function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Bulk data update / upsert


I have data on CSV format that needs to sync with salesforce object. I know i can use Data loader as batch update but i would like to make this an automation.
The CSV contains the value as External Id (that related with object's custom field)

How can i update / upsert the CSV file every hour / other times to SF object? Bulk API or Schedule APEX class?

Can someone please provide an example code to kick off?

Abilash Kosigi 8Abilash Kosigi 8
For simple insert of an object, this link should help
James LoghryJames Loghry
The best way to do this is probably to look at an ETL / Middleware or Third party solution.  Solutions like Jitterbit's Cloud Data Loader ( can run on a schedule, read from a CSV file, and then load that CSV file into standard or custom objects.  Additionally, you could also use Data Loader in a scheduled capacity, but it's not as reliable and involves a lot more scripting to get it working.
@Abilash, Thanks for the sample. I will take a look.

@ James, I do use Jitterbit's for some adhoc update to SF. As i said i would like to make this process an automation without any user inputs. Means I can't run the jitterbit application locally everytime and the schedule job on jitterbit won't execute by itself if the application hasn't active locally.

So i am looking an apex class or bulk API script to tackle the situation. Any example available?
Irrin MadlerIrrin Madler
If you want to avoid the coding way to automatically update/upsert the CSV file to SFDC, take a look at - Skyvia ( It offers powerful mapping and flexible scheduling features (up-to-one minute)