Newer Version Available

This content describes an older version of this product. View Latest

Google Books™ Custom Adapter for Salesforce Connect

This example illustrates how to work around the requirements and limits of an external system’s APIs: in this case, the Google Books API Family.
To integrate with the Google Books™ service, we set up Salesforce Connect as follows.
  • The Google Books API allows a maximum of 40 returned results, so we develop our custom adapter to handle result sets with more than 40 rows.
  • The Google Books API can sort only by search relevance and publish dates, so we develop our custom adapter to disable sorting on columns.
  • To support OAuth, we set up our authentication settings in Salesforce so that the requested scope of permissions for access tokens includes https://www.googleapis.com/auth/books.
  • To allow Apex callouts, we define these remote sites in Salesforce:
    • https://www.googleapis.com
    • https://books.google.com

BooksDataSourceConnection Class

BooksDataSourceProvider Class