Do you need to analyze your Salesforce data in Power BI? Then, you need to know how to connect Power BI to Salesforce first.
In this article, you will learn how to do it in 4 ways.
Here’s how we are going to tackle this topic:
- About Power BI
- Benefits of Power BI and Salesforce Integration
- Integration via Power BI Salesforce Connector
- Integration via Salesforce APIs and Data Loader Tool
- Integration via Skyvia
About Power BI
Power BI is not just a data visualization tool. It’s a collection of software services, apps, and connectors. This collection turns unrelated data into interactive insights.
It has 3 significant parts:
- Power BI Desktop, where you develop your reports using different data sources.
- Power BI Service, where you can publish your interactive reports online. And then share them with your organization.
- And Power BI Mobile, where you can access your reports through a mobile device. With this app, your reports are accessible whenever, wherever.
Power BI can work on your data, whether online or on-premise. This includes online services like Salesforce.
Before we get into the ways to connect Power BI to Salesforce, here’s the Power Bi Desktop version we are going to use:
Benefits of Power BI and Salesforce Integration
Sound business decisions are the fruits of data visualization and analysis. So, Power BI Salesforce integration will let you do just that.
Salesforce is a top-of-the-line CRM. The home page for the Asia Pacific says it all:
And it also has Application Programming Interfaces (APIs). It allows you to use external tools to extend its functionality. And Power BI is one of those external tools.
Meanwhile, Power BI is a good companion tool for visualizing Salesforce data.
- It has a built-in connector to Salesforce objects and reports.
- Easy to use report designer (Power BI Desktop).
- You can share your report easily in the cloud through Power BI Service.
- Design visually appealing, interactive dashboards.
- Embed Power BI in Salesforce.
Power BI has a 4.4 rating from more than 2000 users. So, this is a good testimony coming from real customers.
Up next, let’s look at Power BI’s own Salesforce connector.
Integration via Power BI Salesforce Connector
Power BI has 2 native connectors to Salesforce. One is the Power BI Salesforce Object connector. And another is the Power BI Salesforce Reports connector. This is the easy and direct way to integrate Power BI with Salesforce. See below:
You need a valid Salesforce account with API access enabled to take advantage of this. The following are the steps to connect to Salesforce Objects:
- Open Power BI and click Get Data.
- From the search box, type Salesforce.
- Select between Production or Custom. Our example later will use Production.
- Login to your Salesforce account.
- Click Connect.
- Another window will open. Select the Salesforce object you wish to do data visualization.
See it in action below:
Using the built-in connector is easy. But there are limitations to this. For example, Salesforce Objects has a limited number of concurrent query connections. Meanwhile, Salesforce Reports have a 2000-row limit. For more information, visit the documentation for Salesforce Objects and Salesforce Reports.
Integration via Salesforce APIs and Data Loader Tool
Are you stuck without a workaround when you reach the limits of these connectors? Then, you need to use indirect ways to connect your Salesforce data to Power BI. Indirect means you will load your Salesforce data into another database like PostgreSQL. And Power BI will connect to it.
Sounds easy? It depends on what skill sets your organization has.
Let’s start by using Power BI Salesforce APIs.
Using Salesforce APIs
Salesforce provides the following 3 APIs:
- REST API – this provides programmatic access using Representational State Transfer (REST).
- SOAP API – this provides programmatic access using Simple Object Access Protocol (SOAP).
- Bulk API 2.0 – based on REST but suited for larger data sets. If your data operation involves more than 2000 records, this is a good candidate for Bulk API 2.0.
If you click those links above, you will be taken to Salesforce developer documentation. And that means you need someone in your organization who will understand these technologies. And through these APIs, you can integrate Salesforce into your existing system.
So, if you have developers on board your company, they can choose between the 3 APIs above.
Let’s have an example in Python using the simple-salesforce REST API client. Your developer only needs a few lines to extract Salesforce Contacts like this:
from simple_salesforce import Salesforce sf = Salesforce(instance='customdomain.my.salesforce.com', session_id='your_access_token') data = sf.query("SELECT Id, Email, Lastname, Firstname, Phone FROM Contact")
Then, from here, your developer can load the Salesforce contacts to your database. Aside from Salesforce contacts, there are more objects accessible through this Python library. Then, Power BI can connect to your database for data visualization. Note that you need to use a database where Power BI has a connector (like SQL Server, PostgreSQL, or MySQL).
But you may ask: Is there another way to do this without coding?
Using Salesforce Data Loader
Salesforce provides a tool to get Salesforce data without coding. If you have someone in your company who knows how to install software, Salesforce Data Loader is for you. But here’s the catch:
- You only have 1 target format, which is CSV. Comma-Separated Values (CSV) is a flat-file format.
- You need someone to extract the data to CSV manually and regularly.
- The data exported may stale quickly. Data updates can happen from the time the data is exported to CSV.
Once the needed CSVs are available, Power BI can connect to each of these using the CSV connector.
Here’s how the Data Loader is used:
Then, connect the CSV file or files to Power BI. See it in action below:
For more information on how to install and use the Salesforce Data Loader, please check this link.
Integration via Skyvia
Another option is to use a cloud data platform like Skyvia.
This offers several advantages:
- Built-in connector to Salesforce. No programming is needed.
- Easy, drag-and-drop interface to extract data from Salesforce. And then load it to your database of choice.
- Perform transformations before loading to the database.
- No more manual extractions with the automated scheduler.
- If the target database is in the cloud, there’s nothing to install. But if your database is on-premise, you need to install just one: the Skyvia Agent.
Steps to Automate the Integration in Skyvia
In this section, we also show how to connect PostgreSQL to Salesforce.
STEP 1: Create a Connection to Salesforce
STEP 2: Create a Connection to PostgreSQL
Using an on-premise PostgreSQL database and the Skyvia Agent, follow the example below.
STEP 3: Design a Skyvia Data Flow
The simplest data flow you can do is shown below.
STEP 4: Run and Test the Skyvia Data Flow
After you create the Data Flow, run and test it for errors. Also, check the target database if the loading really happened.
STEP 5: Create a Runtime Schedule
STEP 6: Connect to Power BI
We hope you learn from the four ways to connect Power BI to your Salesforce data. The easier but more flexible method among the four is using Skyvia. We urge you to try this out for free today and connect your business data from anywhere right now!