+ Start a Discussion

"Invalid Batch" error when upserting records via Bulk API

I'm getting an "Invalid Batch" error when upserting records via DBAmp that uses the native Salesforce Bulk API. We've had this failure several times and I believe that all permissions have been set appropriately. The last change made to the custom object was 2 new fields that the calling user has write access to.

Please help.
Here's the exact error message provided by the Bulk Data Job log entry:

InvalidBatch : Failed to process CSV file. Upsert requires view all data on a non-unique custom index

This error is saying that if you are using a non-unique field in your upsert (such as LEad.Email, or Contact.Email) you need to have the View All Data on the profile of the running user.

If you add the View All Data permission, the load should work.

Hope this helps.