This article explains how to connect Salesforce with your Pigment Workspace to retrieve any of your Salesforce report data into Pigment blocks.
As with all other native Pigment integrations, you’ll first need to configure a Connection in the integration Library page. Once configured, this connection can be used by any Application that is authorized as a data source. These authorized Apps are defined during the ‘Import Data’ configuration step. Now, let’s see how to configure and use this native integration!
Configure the Salesforce Connection
Note: you need to be a Workspace Admin to be allowed to configure.
In the sidebar, click the Settings tab to navigate to the Integration page. Once there find the Salesforce connector and click on “+ Add”.

If it’s your first Salesforce Connection, click on “Setup a connection”. | ![]()
|
For all your Connections, you need to provide the following information:
Select the Saleforce environment (“Production” or “Sandbox”). Click on Connect to start the OAuth app connection process. | ![]()
|
Here are the permissions required by the Pigment integration.
Click on Allow. If you are not already logged in to your Salesforce account, a first modal will ask you to log-in.
Warning: Pop-up might be blocked by your browser, please make sure you enable them.
| ![]()
|
Click on Setup to finish the process. | ![]()
|
The Pigment connector with salesforce is an OAuth connected app using the following OAuth scopes:
- Access the identity URL service
- Manage user data via APIs
- Manage user data via Web browsers
- Perform requests at any time
As a Salesforce Admin, you can review the Pigment OAuth app usage from the Connected Apps OAuth Usage page (doc).
Load a Salesforce report into Pigment
Once the Salesforce Connection is configured, open any Application for which this Connection is available and open the “Import Data” interface.
Instead of “Upload file”, select the Integration option and select your Salesforce Connection.

Now, you just need to add the Report ID of the report you want to load into Pigment. You can find this Report ID in the Salesforce URL when you open that report. It should look like an 18 character long code (ex: 00O7R000007wbfpUAA
). Once you have this ID, add it and click on “Start Import”.

The report data should load in Pigment within a few seconds!
Warning: the “Report” import mode only allows you to load up to 2,000 rows of data. for larger amount of data, please use the “Custom Query” import mode
Load raw Salesforce data into Pigment with Custom Queries
For large dataset, Salesforce the “report” import mode is too limited. The preffered solution is to use the Custom Query Mode.

The current version of the SOQL does not support Parent/Child Relationships within a hierarchy.
Here is an example of SOQL query to load some filed of the Opportunity Table:
SELECT Id, AccountId, Name, Probability, IsClosed, IsWon, CreatedDate
FROM Opportunity
Once your SOQL query is inputted, you can just click on “Start Import” and continue the standard import flow.
Resources for those New to Salesforce SOQL
Writing SOQL can be difficult for new SFDC users, reach out to your Salesforce Admin for help.
- Salesforce GSheet addon: use the import mode and click on “SOQL Query” once you selected the data you want to load. The SOQL query will appear in a modal, you can just copy/past it in Pigment. Link:https://workspace.google.com/marketplace/app/salesforce_connector/857627895310
-
Salesforce Developer Documentation - SOQL: The official Salesforce documentation on SOQL provides comprehensive information, examples, and best practices. It's a great starting point for learning about SOQL. Link: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_intro.htm
-
Trailhead - Apex & SOQL for Developers: Trailhead is Salesforce's interactive learning platform. This module covers SOQL and Apex programming in-depth and includes hands-on exercises to practice your skills. Link: https://trailhead.salesforce.com/en/content/learn/modules/apex_database
-
Force.com SOQL Explorer: This interactive tool allows you to explore the SOQL syntax and test queries against a Salesforce org. It's an excellent way to experiment and understand query results. Link: https://www.salesforce.com/tools/soql-query-builder/
-
Salesforce Stack Exchange: The Salesforce community is very active on Stack Exchange. You can find a plethora of SOQL-related questions, answers, and discussions that can help you learn and troubleshoot. Link: https://salesforce.stackexchange.com/
-
Advanced SOQL Queries Cheat Sheet: A cheat sheet with various examples of advanced SOQL queries to handle complex scenarios like relationship queries, aggregate functions, subqueries, etc. Link: https://resources.docs.salesforce.com/216/latest/en-us/sfdc/pdf/soql_sosl_cheatsheet.pdf
-
Salesforce Ben - SOQL Guide: This blog post from Salesforce Ben covers the basics of SOQL and provides practical examples to illustrate how to write effective queries. Link: https://salesforceben.com/soql-salesforce-object-query-language/
-
Developerforce YouTube Channel - SOQL Videos: Salesforce's official Developerforce YouTube channel has video tutorials on various Salesforce development topics, including SOQL. Link: https://www.youtube.com/user/developerforce/search?query=soql
-
Simple-SOQL-Tester: An open-source web application that lets you run SOQL queries against your Salesforce org without having to write any code. Link: https://soql.herokuapp.com/
-
Salesforce Weekly - SOQL Series: This blog series from Salesforce Weekly provides a series of articles covering various aspects of SOQL queries. Link: https://salesforceweek.ly/tag/soql
-
Salesforce Ben - Salesforce Schema Explorer: While not entirely focused on SOQL, this tool helps you explore Salesforce schema, which can be helpful in understanding object relationships and building queries. Link: https://schemaexplorer.io/
-
Salesforce Query editor(developper consol): powerfull and fast but not very user friendly. Link: https://help.salesforce.com/s/articleView?id=sf.code_dev_console_tab_query_editor.htm&type=5
-
Workbench: a third party tool very user friendly to write SOQL queries when you are not familiar with that syntax. Link:https://workbench.developerforce.com/login.php
Remember that practice is key to mastering SOQL. Experiment with different queries, join Salesforce developer communities, and leverage these resources to become proficient in writing SOQL queries in Salesforce.