Skip to main content

Salesforce

Overview

Salesforce is a leading cloud-based Customer Relationship Management (CRM) platform designed to help businesses connect with and understand their customers better. It offers a comprehensive suite of applications focused on sales, customer service, marketing automation, analytics, and application development. Salesforce enables organizations of all sizes to build stronger relationships with their customers through personalized experiences, streamlined communication, and predictive insights. Rill can ingest data from Salesforce as a source by utilizing the Bulk API, which requires a Salesforce username and password (and, in some cases, a token, depending on the org configuration) to authenticate against a Salesforce org.


Local credentials

When using Rill Developer on your local machine (i.e., rill start), you have the option to specify credentials when running Rill using the --env flag. For example, you can run the following command in the terminal when starting Rill:

rill start --env connector.salesforce.username="user@example.com" --env connector.salesforce.password="MyPasswordMyToken"

Alternatively, you can include the credentials directly in the underlying source YAML by adding the username and password parameters. For example, your source YAML may contain the following properties (these can also be configured through the UI during source creation):

type: "model"
connector: "salesforce"
endpoint: "login.salesforce.com"
username: "user@example.com"
password: "MyPasswordMyToken"
soql: "SELECT Id, Name, CreatedDate FROM Opportunity"
sobject: "Opportunity"
Beware of committing credentials to Git

Outside of local development, this approach is not recommended because it places the connection string (which may contain sensitive information like passwords) in the source YAML file, which will then be committed to Git.

Source Properties

For more information about available source properties and configurations, please refer to our reference documentation on Source YAML.

Did you know?

If this project has already been deployed to Rill Cloud and credentials have been set for this source, you can use rill env pull to pull these cloud credentials locally (into your local .env file). Please note that this may override any credentials you have set locally for this source.

Cloud deployment

Once a project with a Salesforce source has been deployed, Rill requires you to explicitly provide the credentials using the following command:

rill env configure
info

Note that you must cd into the Git repository from which your project was deployed before running rill env configure.

note

Leave the key and client_id fields blank unless you are using JWT (described in the next section below).

JWT

Authentication using JWT instead of a password is also supported. Set client_id to the Client Id (also known as the Consumer Key) of the Connected App to use, and set key to contain the PEM-formatted private key to use for signing.

Did you know?

If you've already configured credentials locally (in your <RILL_PROJECT_DIRECTORY>/.env file), you can use rill env push to push these credentials to your Rill Cloud project. This will allow other users to retrieve and reuse the same credentials automatically by running rill env pull.