heroku / salesforce-bulk

Python interface to the Salesforce.com Bulk API
MIT License
207 stars 154 forks source link

Can't Access Campaign and CampaignMember objects #101

Closed parth-kbs closed 2 years ago

parth-kbs commented 3 years ago

When trying to upsert records to Campaign and CampaignMember objects, I get an error saying field names are not found.

Error: raise BulkBatchFailed(job_id, batch_id, status.get('stateMessage'), batch_state) salesforce_bulk.salesforce_bulk.BulkBatchFailed: Batch 7514x000004NePpAAK of job 7504x000004Qc36AAC failed: InvalidBatch : Field name not found : Id

lambacck commented 2 years ago

That error is coming from Salesforce and means you are either not including Id or a Unique External ID in the data you are sending. Also if you are using CSV, your CSV must have a header row with the field names.