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
Jon Sheldon 42Jon Sheldon 42 

Is the Bulk API Appropriate for this scenario?

Here is my scenario:
  • Will receive several X12 834 files per day via SFTP to an on premise server. There is potential for dozens and long term possibly 100s of files each day that need to be processed/imported.
  • Each file needs to be imported into a custom salesforce object
  • Some files may contain only 5000 records and some may contain 100,000+ records
To me it seems the Bulk API is the best means to import such data using a custom automated process.

The process would be roughly:
  1. Transform an 834 file into a CSV file with upsert records for the custom object.
  2. Create a Bulk API job for importing the CSV file.
  3. Separate the CSV upsert file into separate chunks (10MB or 10000 rows, whichever comes first) submitting each as a batch to the job.
  4. Check the state of the job/result of each batch.
Is the Bulk API a good solution for this, or is there another API which might be better suited?