Salesforce APIs

Bulk API

  • REST based

  • Asynchronous

  • CSV data

  • Version 1 (OLD) and Version 2

  • Large Data Volumes

    • For Data Migrations

  • Query, Insert, Update, Upsert and Delete

  • Bulk API Version 1.

  • Bulk API 2.0 is available in API version 41.0 and later. Query jobs in Bulk API 2.0 are available in API version 47.0 and later.

  • Difference between version 1 and version 2.

    • https://developer.salesforce.com/blogs/2017/12/slim-new-bulk-api-v2.html

      • Bulk API v2 does away with the need to manually break up data into batches. Simply submit jobs with the full set of records, and Salesforce automatically determines the most efficient way to batch the data.

      • Bulk API v2 simplifies the basic daily limits. Instead of having limits based on the number of Bulk jobs and batches, you’re simply limited to a maximum number of records (100 million) per 24 hour period.

        • Note now 150 million records per day as of Summer '20

        • Maximum number of records uploaded per rolling 24-hour period

        • Files to upload have to be max 150MB AFTER Base 64 encoding.

        • The maximum number of query jobs per 24-hour rolling window is 10,000 with The total query results that can be generated per 24 hour rolling window being 1TB

        • Queries don’t use Batches

      • If the job completes but encountered errors during processing, request the complete list of failed records with one API call, determine why the records failed, and submit a new job as needed.

      • You can specify different column delimiters and line endings for your CSV data, including:

        • backquotes, carets, pipes, semi-colons, and tabs for delimiters (instead of commas)

        • carriage-return & linefeed line endings (instead of just linefeeds)

    • Salesforce creates a separate batch for every 10,000 records in your job data, up to a daily maximum of 150,000,000 records. If the limit is exceeded while processing your job data, the remaining data isn’t processed. The job is marked as having failed. Create a new job to process the records that were not processed.

    • For each internal batch, if Salesforce can’t process all the records in a batch in 10 minutes or less, the batch fails. Salesforce retries failed batches up to a maximum of 10 retries. If the batch still can’t be processed after 10 retries, the entire job is moved to the Failed state and remaining job data is not processed. Use the Failed Record Results and Unprocessed Record Results resources to determine what records were not processed and what errors occurred.

  • Note there are more changes in V50 of the API, but that won’t be in the exam I’m taking

  • And Bulk API is available in Event Monitoring as of Winter '21

Chatter REST API / Connect API

The Chatter API became the Connect API in Summer '20 https://releasenotes.docs.salesforce.com/en-us/summer20/release-notes/rn_chatter_api.htm

  • Chatter Feed

  • Users

  • Groups

  • Followers

  • Data is structured for rendering on websites and mobile devices.

  • Returned information is localized to the user's time zone and language.

  • Changed values that are tracked in a feed are returned as value-pair representations.

  • Rate limiting for Chatter REST API is per user, per application, per hour. The rate limiting for SOAP API and REST API is by organization. When you exceed the rate limit, all Connect REST API resources return a 503 Service Unavailable error code.

  • If needed, extract an ID from the REST API and use it in requests to Chatter REST API.

Metadata API

  • the metadata of the Org

Streaming API

See Streaming, Platform Events and CDC

Email Service

  • Process Contents, Headers and Attachments of Inbound Email

  • Messaging.InboundEmailHandler

Â