13 Salesforce Integration tips, tricks, and obscure info
- Salesforce advises to “Create a special user in your organization, solely for integration purposes.”
To avoid an infinite loop of outbound messages that trigger changes that trigger more outbound messages, the user who updates the objects should not have the “Send Outbound Messages” permission.
- Upserting rows into Salesforce is not always a good idea because many tables have create-only fields. Such as the PricebookEntryId on the OpportunityLineItem. Upserting the same row twice, will fail on the second upsert because that column can’t be updated.
By default, Salesforce allows free-text in State or Country fields. This is particularly problematic when external systems expect ISO-3166 codes.
- Salesforce formats phone numbers this way.
- Outbound Messages are retried independent of their order in the queue. This may result in messages being delivered out of order.
- While each outbound message should be delivered at least once, it may be delivered more than once
- This has never come up for a real user, but it was a fun series of errors for the integrations user.
- Polymorphic relationships in SOQL queries have terrible error messages.
- I have seen so many Salesforce forums advice downloading entire tables, and matching records up in Excel. This isn’t reasonable for any large amount of data. Even if it can be automated, it’s still a lot of data being moved around.
- The error message for updating a column in Salesforce is the same for both the absence of the field, and the lack of user permissions to access the field.
- Salesforce Trailhead is excellent platform training.
- Understand the Salesforce Execution Governors and Limits.
Salesforce is becoming a pretty good platform, perhaps held back a little bit by legacy and non-breaking changes, but it’s solid.