Skip to main content
Connecting Salesforce with Gaviti
Updated over a week ago

The Salesforce adapter can be used to fetch customer and invoices data. It executes a SOQL (Salesforce Object Query Language) query, and the results are sent to a Gaviti adapter that is configured with field mapping. Every Gaviti field can be mapped to a Salesforce field.

Prerequisites

  1. Create an X509 certificate (to be done by the CSM):

    openssl req -x509 -sha256 -nodes -days 36500 -newkey rsa:2048 -keyout gaviti-salesforce-key.key -out gaviti-salesforce-certification.crt
  2. The certificate (.crt file) will be uploaded to Salesforce to validate the Gaviti integration. The private key (.key file) will be used to sign Gaviti integration calls and will be stored in the Gaviti adapter.

Salesforce Application Creation

  1. Login to Salesforce.

  2. Go to the setup area (gear icon in the top right).

  3. In the side nav, go to Apps > App Manager.

  4. Click New Connect App.

  5. In the Basic Information section, populate the required fields:

  6. In the API (Enable OAuth Settings) section:

    • Check Enable OAuth Settings

    • Check Use digital signatures. Upload the gaviti-salesforce-certification.crt file that was generated earlier.

    • For Selected OAuth Scopes, add:

      • Manage user data via APIs (api)

      • Perform requests at any time (refresh_token, offline_access)

  7. Click Save. If there are any errors, re-upload the gaviti-salesforce-certification.crt file.

  8. On the resulting app page, click Manage.

  9. Click Edit Policies.

  10. In the OAuth policies section, change Permitted Users to Admin approved users are pre-authorized.

  11. Click Save.

  12. Back on the app page, in the Profiles section, click Manage Profiles.

  13. On the Application Profile Assignment page, assign the user profiles that will have access to this app.

OAuth Access Configuration

To use the API, you will need the RSA private key and the Consumer Key (also known as the client ID) from the Salesforce application.

  1. The private key is the .key file that was generated in the Prerequisites section.

  2. To get the Salesforce application Consumer Key:

    1. Login to Salesforce.

    2. Go to the setup area (gear icon in the top right).

    3. In the side nav, go to Apps > App Manager.

    4. Find the application that you created in the App Creation section.

    5. From the drop-down in the application's row, click View.

    6. The Consumer Key is in the API (Enable OAuth Settings) section

Did this answer your question?