Skip to content

Integration

TODO(David)

Write this page. Stub created for structure only.

TODO

External Client Apps, named credentials and external credentials, external services, auth providers, remote site settings, platform events and CDC

Standards for integration: the choice of API, and integration metadata such as External Client Apps, named and external credentials, external services, and the settings that control outbound and inbound access.

Choosing an API

A best practice: an integration uses the API that suits the job, and the people who build it know when each API is the right one. It matters most when records are loaded or updated in large numbers, and above all when parent and child records are loaded together.

  • A large load or update goes through Bulk API 2.0, which processes the records in the background. Salesforce draws the line at about 2,000 records: an operation above it is a good candidate for Bulk API 2.0, and one below it for synchronous calls that each carry many records (Introduction to Bulk API 2.0 and Bulk API).
  • A small set of parent and child records is created in one request. sObject Tree creates up to 200 records, in trees up to five levels deep (sObject Tree), and a composite graph runs up to 500 related requests and can complete all of them or none (Using Composite Graphs).
  • A large load of parent and child records is planned before it runs. The parents are loaded first, and each child names its parent through a relationship column in its file (Relationship Fields in a Header Row).

No rule checks this. Reviewers do.

Endpoints

An endpoint names a host, never an IP address. An address ties the org to one machine: when that machine moves, every reference to it has to be found and redeployed, and a certificate is issued to a name, not to a number.

  • No endpoint in integration metadata is an IP address. A value that is an IPv4 address, or a URL whose host is one, blocks the pull request (severity 1). Enforced by AvoidHardcodedIpAddressMetadata.

Integration metadata here is Named Credentials, Remote Site Settings, CSP Trusted Sites, CORS allowlist origins, External Data Sources, Auth Providers, and workflow outbound messages. An organisation adds the other types in which it keeps endpoints, such as the custom metadata type that holds them.

Rules

The rules that this page mentions. The Standard column gives each rule's standard in one line, and the Section column links to the section that mentions the rule; "Not yet written" marks a rule of this page that no section mentions yet. Appendix F.6 holds the full cross-reference.

Rule Kind Severity Standard Section
AvoidHardcodedIpAddressMetadata Custom PMD XPath 1 No endpoint in integration metadata is an IP address Notes on this rule. Endpoints