Salesforce’s REST API can technically access report data, but it doesn’t return pre-calculated totals and requires complex SOQL queries plus custom aggregation code.
Here’s a simpler approach that gets you the same filtered closed won totals without wrestling with API limitations or authentication headaches.
Get filtered closed won totals directly in spreadsheets using Coefficient
Coefficient eliminates the need for complex REST API calls by importing your Salesforce Opportunity data directly into Google Sheets or Excel. You can apply up to 25 filters to match your report criteria exactly, then use simple SUM functions for instant totals.
How to make it work
Step 1. Connect Salesforce to your spreadsheet.
Install Coefficient and authenticate your Salesforce connection through the sidebar. This handles all the API authentication automatically so you never have to manage tokens or refresh cycles.
Step 2. Import Opportunity data with filters.
Select Opportunities as your object and choose the Amount field along with any other fields you need. Apply filters like Stage = “Closed Won” and set your date ranges using AND/OR logic to match your report exactly.
Step 3. Set up automatic aggregation.
Use a simple SUM formula on the imported Amount column to get your closed won total. The formula automatically handles null values and currency conversions that would require custom code in a REST API solution.
Step 4. Schedule automatic refreshes.
Set up hourly, daily, or weekly refreshes to keep your totals current. You can even point filter values to specific cells, so changing a date range updates your data without rebuilding queries.
Start pulling Salesforce data without API complexity
This approach gives you the same filtered closed won totals as complex REST API solutions while eliminating authentication management and custom aggregation code. Try Coefficient to streamline your Salesforce reporting.