Why do I have the error "Invalid record hashcode. Unable to find matching record from the response returned by the bulk job"?
Question.
When trying to copy all Contact records it produce some errors like "Invalid record hashcode. Unable to find matching record from the response returned by the bulk job.".
My export.json is:
{
"operation": "Upsert",
"externalId": "Email",
"query": "SELECT Id, Name,Email,Platform_Role__c,LastName,FirstName,Salutation,Secondary_Email__c,MailingCity FROM Contact"
}
The console output shows:
\[WARN\] \[Batch\# 7502g000000rYc5AAE:Insert\] {Contact} Incompleted.
51901 records succeeded, 592 records failed.
However, no Contact records actually inserted into the target.
Answer.
By default the plugin uses the modern Bulk Api V2.0.
Sometimes it can happen when the Plugin is using this API. The is no permanent solution for this.
As a workaround try to switch back to the Bulk Api v1.0 by setting bulkApiVersion : "1.0"
{
"objects": [
{
"operation": "Upsert",
"externalId": "Email",
"query": "SELECT Id, Name,Email,Platform_Role__c,LastName,FirstName,Salutation,Secondary_Email__c,MailingCity FROM Contact"
}
],
"bulkApiVersion": "1.0" // This will set using the Bulk Api v1.0
}