If you want to create data sources for custom Klips, you're in the right place.
If you want to add pre-built Klips, see Pre-built Klips and the Klip Gallery and Klip Gallery: Salesforce.
If you're using PowerMetrics and want to create data sources for custom metrics, go here.
Visualize, discover, and act on your data with Klips and Klip dashboards.
Get started by setting up a connection between Klipfolio and your Salesforce data and adding some data sources.
When you're finished adding Salesforce data sources, you'll use them to power your custom Klips.
Notes:
- Before you connect your data to Klipfolio, make sure your Salesforce account has the necessary permissions and features.
- To help you get to your data faster, when creating your Salesforce data source, the data preview will only display up to 2MB of data by default. After creating the data source, select it from your list of data sources to open its details page. The preview there will include all of the Salesforce data you requested.
This article includes:
- Connecting to your Salesforce data
- Connecting to Salesforce Sandbox data
- Building using Salesforce Reports
- Building using an SOQL query
- Building using the Simple SOQL Query Mode (No SOQL knowledge required)
- Building using the Advanced SOQL Query Mode
- I've added Salesforce data sources - What's next?
Connecting to your Salesforce data
Here are a couple things to note about connecting Klipfolio to your Salesforce data:
Your data is safe with us. The first time you connect your Salesforce data to Klipfolio, you'll be prompted to sign in to Salesforce and give permission to allow Klipfolio to securely access data within your Salesforce account. We are serious about protecting your data privacy.
Managing your connections. By default, your connection name looks like this: yourname@Salesforce <date and time created>. You can modify the default connection name when you create a new connection or from your list of connections, accessed by clicking your Account Name (located at the bottom of the left navigation sidebar) and selecting Account > Connected Accounts or by clicking the button in the left navigation sidebar and selecting Connections.
You can use the same account connection every time you connect to Salesforce. If you have trouble accessing an existing connection, your OAuth token may have expired. If that happens to you, check out these troubleshooting tips.
Connecting to Salesforce Sandbox data
You connect to your data and create data sources in the same way as for Salesforce. Select Salesforce Sandbox from the list of connectors (instead of Salesforce) and authenticate using your Salesforce Sandbox account credentials.
Building using Salesforce Reports
The Salesforce Report option enables you to access all your Summary reports and Detailed reports and base your data visualization on information contained in those reports.
When running data through the Salesforce API, reports can return up to 2000 rows of data. Summary reports show “aggregate-level” information that could be based on >2000 rows of data, for example, the number of opportunities for a specific region or total revenue for this month. Detailed reports display detailed “record-level” information, for example, every new sale today with all details.
Use the Salesforce Report option when:
- The data you're accessing exists in the same Salesforce Object or in a Custom Report Type.
- You have a limited number of API calls within your Salesforce organization and want to preserve them for other integrations or uses.
Notes:
- To make sure a report is selectable from your list of reports in Klipfolio, you must view and run the report in Salesforce. This marks it as a recently viewed report.
- The Salesforce API returns a maximum of 2000 rows for a report. If your Salesforce query exceeds this limit, try one of the following options:
- Apply filters to your data in Salesforce to limit the amount of data returned.
- Use a Summary Report (if you don’t need specific record-level details).
- Use the Build a SOQL Query option to return the full set of data.
To create a data source using the Salesforce report option:
- In Klipfolio, on the Configure your data source page for Salesforce, at Retrieval Method, select Salesforce Report.
- At Retrieval Format, select how you want your data formatted: Summary data (CSV) for tabular Summary reports, Detailed data (CSV) for tabular Detailed reports, or Raw Data (JSON) for Detailed reports in JSON format.
- Choose a report from the list and click Get data.
Note: In addition to your unmodelled data source, you can create a modelled version of your data source at this stage. To create a modelled data source, ensure that the checkbox next to Model this data source is selected before clicking Continue. Learn more about creating a modelled data source. - Verify that the data returned is what you want and click Continue.
- Enter the name and description, set the refresh rate and click Save.
Note: By default, the original report name in Salesforce is set as the name of the data source in Klipfolio, and the Report ID is set as the description.
To check if your Salesforce query is returning the full set of data:
- Change the Retrieval Format drop-down list item to Raw Data (JSON).
- Select the desired report.
- In the data returned, check the allData field:
Building using an SOQL query
Use the SOQL query method when:
- The data you are accessing exists across different Salesforce Objects and you don’t have custom reports that enable you to relate multiple objects. SOQL enables you to query related objects.
- You need to process data that exceeds 2000 rows.
- You want to pull more detailed information from the History Objects, for example, AccountHistory, LeadHistory, and OpportunityHistory. This is especially useful when you only have access to standard, out-of-the-box Salesforce reports.
After selecting Salesforce from the list in the Connector Gallery in Klipfolio, there are two ways you get Salesforce data using SOQL:
- On the Choose a pre-built or custom connection page, select a pre-built SOQL query to get your data quickly and easily. Or, click Create a custom Salesforce data source, to write your own SOQL query using either Simple or Advanced Query Mode.
Building using the Simple SOQL Query Mode (No SOQL knowledge required)
Choose Simple to build your query using drop-down menus and filters. This method enables you to specify the data you want to access from Salesforce by choosing the Salesforce Object and the data Fields you want returned per object. You can also filter the data by choosing Add Filter.
To create a data source using the Simple SOQL Query Mode:
- In Klipfolio, on the Configure your data source page for Salesforce, at Retrieval Method, select SOQL.
- At Retrieval Format, select Tabular data (CSV) or Raw data (JSON).
- At Query Mode, select Simple.
- At Salesforce Object, use the drop-down list to choose an object or use the search bar to find a specific object, for example an Account, Opportunity, or Lead.
- At Select Field(s), use the drop-down list or start typing a field name to find and select one or more fields of data.
- You can optionally click Add Filter to create one or more filters to further specify the returned data.
At Filter(s):- Select a field from the first drop-down list.
Note: Filtering on compounded fields, for example, BillingAddress, is not supported. You can filter on each field separately. - Select a condition from the second drop-down list.
- Enter a value in the third textbox.
Note: If you choose a field that contains dates, you can select a time period for the third part of the filter.
- Select a field from the first drop-down list.
- Click Get data.
Note: In addition to your unmodelled data source, you can create a modelled version of your data source at this stage. To create a modelled data source, ensure that the checkbox next to Model this data source is selected before clicking Continue. Learn more about creating a modelled data source.
Note: If you want to add to the query created in Simple mode, click Submit, select Advanced, and edit the query. If you switch back to Simple mode after editing in Advanced mode, your previous selections will not be saved.
Building using the Advanced SOQL Query Mode
To create a data source using the Advanced SOQL Query Mode:
- In Klipfolio, on the Configure your data source page for Salesforce, at Retrieval Method, select SOQL.
- At Retrieval Format, select Tabular data (CSV) or Raw data (JSON).
- At Query Mode, select Advanced.
- Enter your SOQL query. Here are some example queries:
- Click Get data.
Note: Nested SOQL queries are not currently supported in Tabular data (CSV) Retrieval Format. For nested queries, select Raw data (JSON) format.
Next steps
Great! You've connected to your Salesforce data and created one (or more) data sources. Now you're ready to use those data sources in custom Klips.