HomeGuidesRecipesAPI
HomeGuidesAPILog In

Salesforce

❗️

Contact your sales representative if you are interested in obtaining a license for the Salesforce Connector Module for your SmartIQ environment.

The Salesforce Connector’s purpose is to unlock the data within this repository for use in SmartIQ. This connector focuses on treating Salesforce as a core system of record allowing processes to read and write information.

Action

Salesforce Actions

Data Connection Settings

Salesforce Connector Settings

Data Source

  • Picklist
  • All Picklists for an Object
  • Salesforce Object

Features

  • Query Salesforce Objects
  • Retrieve Salesforce Object Picklists
  • Create new Objects in Salesforce
  • Update existing Objects in Salesforce
  • Store documents in Salesforce

Connecting to Salesforce

You are given a security token the first time you log into Salesforce. If you cannot locate the token you can reset it.

The Salesforce Connector needs to access Salesforce data remotely. To grant access to this data, Salesforce requires a “Connected App” be configured for remote access. This can be configured in Salesforce under 'App Manager', you will need a Connected App Name, API Name and Contact Email.

Enable OAuth Settings and enter a Callback URL. Depending on which OAuth flow you use, this is typically the URL that a user’s browser is redirected to after successful authentication. Most of the time this is https://login.salesforce.com/services/oauth2/token. Add all supported OAuth scopes, Full access (full) is recommended.

Once you click save, the page will refresh with a Consumer Key and Consumer Secret. Take note of both as you'll need them for the connector settings.

For more information, see salesforce help.

Configuring the Data Source

The connection string is structured as a key=value pair, separate pairs must be separated by a semi-colon.

keyDescription
urlAuthentication URL for the OAuth Id Flow.
Defaults to “https://login.salesforce.com/services/oauth2/token”
consumerkeyThe OAuth Id Consumer Key for the SmartIQ Application
consumersecretCorresponding Consumer Secret for the Consumer Secret
tokenAPI User Token supplied by Salesforce which makes the Username given.
usernameOptionally used if the Credentials Area of the Datasource is not populated.
passwordOptionally used if the Credentials Area of the Datasource is not populated.
url=https://test.salesforce.com/services/oauth2/token;consumerkey=keyHere;consumersecret=codeHere;token=tokenHere

The Credentials area of the Connector settings is used to specify the username and password instead of using the name/value pair within the Connection String.

You are given a security token the first time you log into Salesforce. If you cannot locate the token you can reset it.

Adding Data Objects

The Datasource Provider employs Object Types to split the different functions available. Object querys are limited to 255 characters in length.

Object TypeDescriptionFilter Fields
Salesforce ObjectOption 1. To retrieve all fields on an object
By adding the Object Type name to the Data Object Name the Connector will retrieve all fields for and object as key fields and display fields.
E.g Account
All fields for the object type
Salesforce ObjectOption 2. To selectively retrieve fields on an object
By adding an object name and then a bracket enclosed, pipe separated list of API field names for that Object type the connector will only make those fields available for searching and display.
E.g Account[Id|Name|Education_Level__c]
Only the fields specified between brackets in the data Object Name
Salesforce ObjectOption 3. To selectively retrieve fields on an object
By adding object name and then manually choose a subset of entire list of API/schema fields for that Object type from "Available Schema Fields", the connector will only make those fields available for display.
All fields for the object type
PicklistRetrieves all possible values for a specific picklist on a specific object type. This is expressed using the dot notation to separate the object name and the picklist name. Both names are given as the Salesforce API name. Eg. Account.Education_level__cactive
defaultValue
label
value
controllerLabel
controllerValue
All Picklists for an ObjectGiven an Object type by it’s API name this Data Object will retrieve all picklists associated with this Object type as a hierarchical datasource. At runtime all values will be loaded once. This Data Object can provide a performance improvement when the same picklists are reused throughout a complex Object Type. E.g retrieving Account.Countries once and reusing it across 10 other account fields that require a countries list, saving 9 calls to the database cache or Salesforce itselfnone

🚧

Salesforce enforces a limit on the query length which SmartIQ can generate.

This can mean that for Object Types with many field names the generated query may become too long, be truncated and return no data. This will typically occur with Account, Lead and Opportunity but could apply to any other Object type or Custom Object type.