Salesforce: Difference between revisions

From Starfish ETL
Jump to navigation Jump to search
No edit summary
Line 22: Line 22:


==The Bulk API seems to fail all rows after processing tens of thousands of records.==
==The Bulk API seems to fail all rows after processing tens of thousands of records.==
When using Serial Concurrency, Salesforce sometimes chokes. I always use parallel.
When using Parallel Concurrency, Salesforce sometimes begins throwing errors due to internal page locking or other exceptions. It is recommended to use the Serial Concurrency setting.

Revision as of 18:38, 10 August 2015

Salesforce Destination

Standard

Input your Username and Password, making sure to append your user's API Token to the end of your password. If you are not using Bulk Mode, be careful to not run too many transactions or you could hit your rolling 24 hour limit.

Bulk

Check the "Use Bulk Mode" checkbox to use Bulk mode. This creates local csv fils of your changes and uploads the csv files to Starfish to process in batches. If you are using Bulk Mode and performing updates or upserts, make sure you are matching on a field that is marked a unique identifier from a foreign program, else you will get an error.

To insert attachments, you need to use the "@@Bulk Attachments" "table" in your stage. This "table" is not in the dropdown so you must type it in. Note that the Bulk API can only handle attachments up to 10MB.

Concurrency: Parallel vs Serial. Parallel is a salesforce API option which tells it to process multiple records at the same time on their side, serial is one at a time. Salesforce a lot of the time chokes when using Parallel. I always use serial mode.

FAQ

SFBulkPost operation: /job error: System.Net.WebException: The remote server returned an error: (400) Bad Request.

When I received this error, I was matching against a standard text field. You must go into setup and check the "External ID" checkbox for the field you are matching on.

System.Web.Services.Protocols.SoapException: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.

When I received this error, I was using the non-bulk API and upserting Contacts one at a time. This caused me to very quickly go over my rolling 24 hour limit. We contacted Salesforce and were able to raise our API limit for 2 weeks. It's best to use the non-bulk API for troubleshooting and then switch to the bulk API for mass imports.

The Bulk API seems to hang.

When using the Bulk API, Starfish builds a csv file locally which is then uploaded to Salesforce and processed by Salesforce. Salesforce then returns the results of the process. Sometimes, Salesforce never responds - or the response doesn't match what Starfish is expecting. When this happens, Starfish continues to wait for a response. If this occurs, check the results of the data load inside Salesforce by going to Setup -> Monitor -> Jobs -> Bulk Data Load Jobs. Based on the results in Salesforce, you can choose when to Cancel the Job in Starfish and choose what to do as a result.

The Bulk API seems to fail all rows after processing tens of thousands of records.

When using Parallel Concurrency, Salesforce sometimes begins throwing errors due to internal page locking or other exceptions. It is recommended to use the Serial Concurrency setting.