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
cguppycguppy 

Bulk API - "Unexpected error" when upserting using custom External Id

I am trying to perform an upsert via the Bulk API with C#.net http posts.

 

The upsert works fine if I use external id = "ID"

However, when I change to use a custom external id, I receive this error:

Got an unexpected error while processing BULK-API. Contact support with error ID: 375837484-3025 (-1477247585)

 

Is there a configuration option I need to check?

 

dkadordkador

Is this still happening for you?

cguppycguppy

No, we've fixed it. I'm only using the API, but it seems that the External Id was not set-up correctly.

It needed to be marked as "unique", to allow upserts to work.

 

Also, I later had a problem with foreign key references using an external id.

Found this solution.

For example, table Role needs to reference Contact, using custom external id on contact.

The correct name for the column on the Role csv file is: "Contact__r.My_External_Id__c"

 

Notice the "__r" suffix on the related table name.

This does not seem to be well documented and took a while to find.

 

Hope this is of help to others.

NK123NK123

Hi cguppy,

 

Can you share one working example of using Bulk API to create Job & and add batch to a job? 

 

Thanks,

NK