Close to Power BI

This page provides you with instructions on how to extract data from Close and analyze it in Power BI. (If the mechanics of extracting data from Close seem too complex or difficult to maintain, check out Stitch, which can do all the heavy lifting for you in just a few clicks.)

What is Close?

Close provides an inside sales SaaS and CRM platform that bundles calling, SMS, and email in a single platform. Users can make and receive calls and take business notes without getting on a phone or leaving the application. The software provides a single automated sales workflow system.

What is Power BI?

Power BI is Microsoft’s business intelligence offering. It's a powerful platform that includes capabilities for data modeling, visualization, dashboarding, and collaboration. Many enterprises that use Microsoft's other products can get easy access to Power BI and choose it for its convenience, security, and power.

With high-value use cases across analysts, IT, business users, and developers, Power BI offers a comprehensive set of functionality that has consistently landed Microsoft in Gartner's "Leaders" quadrant for Business Intelligence.

Getting data out of Close

You can use Close's REST API to get data about contacts, leads, opportunities, and many more objects into your data warehouse. For example, to get a lead, you could GET /lead/{id}/.

Sample Close data

Here's an example of the kind of response you might see when querying a lead.

{
    "status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
    "status_label": "Potential",
    "tasks": [],
    "display_name": "Wayne Enterprises (Sample Lead)",
    "addresses": [],
    "name": "Wayne Enterprises (Sample Lead)",
    "contacts": [
        {
            "name": "Bruce Wayne",
            "title": "The Dark Knight",
            "date_updated": "2019-01-06T20:53:01.954000+00:00",
            "phones": [
                {
                    "phone": "+16503334444",
                    "phone_formatted": "+1 650-333-4444",
                    "type": "office"
                }
            ],
            "created_by": null,
            "id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh",
            "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
            "date_created": "2019-01-01T00:54:51.331000+00:00",
            "emails": [
                {
                    "type": "office",
                    "email_lower": "thedarkknight@close.io",
                    "email": "thedarkknight@close.io"
                }
            ],
            "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI"
        }
    ],
    "custom.lcf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form",
    "date_updated": "2019-01-06T20:53:01.977000+00:00",
    "html_url": "https://app.close.io/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/",
    "created_by": null,
    "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
    "url": null,
    "opportunities": [
        {
            "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
            "status_label": "Active",
            "status_type": "active",
            "date_won": null,
            "confidence": 75,
            "user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
            "contact_id": null,
            "updated_by": null,
            "date_updated": "2019-01-01T00:54:51.337000+00:00",
            "value_period": "one_time",
            "created_by": null,
            "note": "Bruce needs new software for the Bat Cave.",
            "value": 50000,
            "value_formatted": "$500",
            "value_currency": "USD",
            "lead_name": "Wayne Enterprises (Sample Lead)",
            "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
            "date_created": "2019-01-01T00:54:51.337000+00:00",
            "user_name": "P F",
            "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
            "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O"
        },
        {
            "id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt",
            "organization_id": "orga_bwwWG475zqWiQGur0thQshwVXo8rIYecQHDWFanqhen",
            "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
            "lead_name": "Wayne Enterprises (Sample Lead)",
            "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk",
            "status_label": "Active",
            "status_type": "active",
            "value": 5000,
            "value_period": "monthly",
            "value_formatted": "$50 monthly",
            "value_currency": "USD",
            "date_won": null,
            "confidence": 75,
            "note": "Bat Cave monthly maintenance cost",
            "user_id": "user_scOgjLAQD6aBSJYBVhIeNr6FJDp8iDTug8Mv6VqYoFn",
            "user_name": "P F",
            "contact_id": null,
            "created_by": null,
            "updated_by": null,
            "date_created": "2019-01-01T00:54:51.337000+00:00",
            "date_updated": "2019-01-01T00:54:51.337000+00:00"
        }
    ],
    "updated_by": "user_04EJPREurd0b3KDozVFqXSRbt2uBjw3QfeYa7ZaGTwI",
    "date_created": "2019-01-01T00:54:51.333000+00:00",
    "id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O",
    "description": ""
}

Loading data into Power BI

You can analyze any data in Power BI, as long as that data exists in a data warehouse that's connected to your Power BI account. The most common data warehouses include Amazon Redshift, Google BigQuery, and Snowflake. Microsoft also has its own data warehousing platform called Azure SQL Data Warehouse.

Connecting these data warehouses to Power BI is relatively simple. The Get Data menu in the Power BI interface allows you to import data from a number of sources, including static files and data warehouses. You'll find each of the warehouses mentioned above among the options in the Database list. The Power BI documentation provides more details on each.

Analyzing data in Power BI

In Power BI, each table in the data warehouse you connect is known as a dataset, and the analyses conducted on these datasets are known as reports. To create a report, use Power BI’s report editor, a visual interface for building and editing reports.

The report editor guides you through several selections in the course of building a report: the visualization type, fields being used in the report, filters being applied, any formatting you wish to apply, and additional analytics you may wish to layer onto your report, such as trendlines or averages. You can explore all of the features related to analyzing and tracking data in the Power BI documentation.

Once you've created a report, Power BI lets you share it with report "consumers" in your organization.

Keeping Close data up to data

Now what? You've built a script that pulls data from Close and loads it into your data warehouse, but what happens tomorrow when you have new transactions?

The key is to build your script in such a way that it can identify incremental updates to your data. Thankfully, Close's API results include fields like date_created that allow you to identify records that are new since your last update (or since the newest record you've copied). Once you've take new data into account, you can set your script up as a cron job or continuous loop to keep pulling down new data as it appears.

From Close to your data warehouse: An easier solution

As mentioned earlier, the best practice for analyzing Close data in Power BI is to store that data inside a data warehousing platform alongside data from your other databases and third-party sources. You can find instructions for doing these extractions for leading warehouses on our sister sites Close to Redshift, Close to BigQuery, Close to Azure SQL Data Warehouse, Close to PostgreSQL, Close to Panoply, and Close to Snowflake.

Easier yet, however, is using a solution that does all that work for you. Products like Stitch were built to move data from Close to Power BI automatically. With just a few clicks, Stitch starts extracting your Close data via the API, structuring it in a way that is optimized for analysis, and inserting that data into a data warehouse that can be easily accessed and analyzed by Power BI.