13 Salesforce Integration tips, tricks, and obscure info

  1. Salesforce advises to "Create a special user in your organization, solely for integration purposes."
  1. While talking about integration user, make sure their permissions don't require outbound messaging.

    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.

  1. 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.
  1. By default, Salesforce allows free-text in State or Country fields. This is particularly problematic when external systems expect ISO-3166 codes.

  1. Salesforce formats phone numbers this way.
  1. Outbound Messages are retried independent of their order in the queue. This may result in messages being delivered out of order.
  1. While each outbound message should be delivered at least once, it may be delivered more than once
  1. The Login Limit is 3600 calls per user per hour.

    • This has never come up for a real user, but it was a fun series of errors for the integrations user.
  1. Polymorphic relationships in SOQL queries have terrible error messages.
  1. Upsert Salesforce Records by ExternalID is your friend.

    • 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.
  1. 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.
  1. Salesforce Trailhead is excellent platform training.
  1. Understand the Salesforce Execution Governors and Limits.

Summary

Salesforce is becoming a pretty good platform, perhaps held back a little bit by legacy and non-breaking changes, but it's solid.