I am using the simple-salesforce Python package to upsert records into our Salesforce instance. I am finding that each bulk API call counts as 6 API requests. Is this correct? Is there a way to reduce this whilst performing this operation.
The function I am using to perform the upsert:
def bulk_upsert(self, object_name, data_set, identity_field): upsert_response = SFBulkType(object_name, self.bulk_con.connect.bulk_url, self.bulk_con.connect.headers, self.bulk_con.connect.session).upsert(data_set, identity_field) return upsert_response
The object name is the custom object created in Salesforce for our instance, the dataset is a list of dictionaries containing 200 records, the identity field is the external id for the Salesforce object.
I establish the Salesforce connection (sf) and then loop through requested_chunks which is a list of the data to upsert broken into 200 records each.
for request in request_chunks: upsert_response = sf.bulk_upsert(sf_object, request, sf_identity)
I am finding that each time through this loop it is costing 6 credits. I have done a comparison with the integration recommended by simple-salesforce and that also costs 6 calls per bulk upsert. Any thoughts?