Setting up Salesforce SOQL As a Source

Connecting Salesforce with SOQL lets you query your custom objects alongside standard ones, so all your organization's unique data structures become searchable through the same simple query language.

šŸ‘„

Access Required

Guru Access: You need to be an Admin, Source Creator, or relevant custom role to set up Sources.

Salesforce Access: You need to be a Salesforce Admin to set up SOQL as a Source because it requires creating an app in Salesforce. See: Connected App Documentation. Due to the complex nature of this, it is highly recommended that a Salesforce Developer creates the SOQL query.

SOQL (Salesforce Object Query Language) is a query language used to retrieve specific records and data from Salesforce databases. It enables users to search and extract information from both standard and custom Salesforce objects using SQL-like syntax. Connecting Salesforce SOQL as a Source will give admins more flexibility to connect custom objects not synced through the Salesforce CRM or Service Cloud sync.

Setting up Salesforce SOQL as a Source

  1. In Guru, go to Manage.
  2. Select Sources, then click Add Source.
  3. Choose Salesforce SOQL from the list of integrations.
  4. Select Configure integration to open the installation wizard.
  5. Optional, rename the source.
  6. Before connecting Salesforce, you need to create a Connected App:
    1. In Salesforce, go to Setup → Apps → App Manager
    2. Click "New Connected App"
    3. Fill in basic information (Connected App Name, API Name, Contact Email)
    4. In "API (Enable OAuth Settings)" section:
      1. Check "Enable OAuth Settings"
      2. Set Callback URL to: https://oauth2.integrations.getguru.com/callback
      3. Add OAuth Scopes: "Manage user data via APIs (api)" and "Perform requests on your behalf at any time (refresh_token, offline_access)"
      4. Check "Enable Authorization Code and Credentials Flow"
      5. Check "Require Secret for Web Server Flow"
      6. Check "Require Secret for Refresh Token Flow"
    5. Save the Connected App
    6. After saving, go to "External Client App Manager" → Your connected app → Settings to get your Consumer Key (Client ID) and Consumer Secret (Client Secret)
    7. Use these credentials in the Salesforce Connection in the wizard.
  7. If your organization uses a custom domain or My Domain in Salesforce, you may need to update the OAuth URLs in the wizard (Authorize URL, Token URL, and Revoke URL) to match your custom login URL (e.g., https://your-domain.my.salesforce.com instead of https://login.salesforce.com).
  8. Click Connect and authorize with your credentials.
  9. Click Next.
  10. Paste the SOQL query from Salesforce into the text box. You'll need to add any fields from lookups to other objects to the SOQL (ie if you want the Account Name from a custom object that looks up to an account, include Account__r.Name)
  11. Enter the title field, this should be the name of the object you are syncing to Guru because this will impact the naming convention of the results as they are displayed in Guru.
  12. Choose which Guru Groups should have access to this source.
  13. Click Connect to finalize the integration.


Did this page help you?