Get Started with Salesforce Spiff Reporting API
Integrate Salesforce Spiff commission data with other systems, such as automated payroll or analytics tools. The Salesforce Spiff Reporting API provides endpoints for exporting and downloading Spiff custom reports in .csv format. These endpoints require OAuth 2.0 authentication with a bearer token that you generate with a Client ID and Client Secret from Spiff.
- Log in to Spiff as a user with the Company Admin role.
- On the Reporting tab in Spiff, select Reports.
- Click Create Report.
- Enter a report name.
- For report use case, select API.
- Click Create Report.
-
On the Admin tab in Spiff, select Settings and then select API Access Management.
-
Enter an application name, select the Custom Reports Export application scope, and click Create.
-
From the window that appears, copy the Client ID and Client Secret.
The Client ID appears in the Connected APIs list, but you can't view the Client Secret again. There's no way to recover these values, but you can generate new values.
-
Make a
POST
call with the getAccessToken endpoint and pass the Client ID and Client Secret that you copied.Replace these values:
CLIENT_SECRET
: The OAuth 2.0 Client Secret that you generated and copied from Spiff Settings.CLIENT_ID
: The OAuth 2.0 Client ID that you generated and copied from Spiff Settings.SUBDOMAIN
: The subdomain for your Spiff environment.- If you're in the US, use
us1
. - If you're in the EU, use
eu1
.
- If you're in the US, use
-
Retrieve
access_token
from the results. -
To verify that the bearer token is valid, make a
GET
call with the getReports endpoint.Replace
YOUR_BEARER_TOKEN
with the token you retrieved.
You can now use other endpoints in the Reporting API to access, export, and download API reports. Also, review limitations for the Reporting API.
See Also
- Salesforce Help: User Roles and Permissions in Salesforce Spiff
- Salesforce Help: Reports and Dashboards in Salesforce Spiff
- Salesforce Help: Hyperforce for Salesforce Spiff
- Trailhead: Salesforce Spiff Badges