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 as uncompressed .csv files or compressed .csv.gz files. These endpoints require OAuth 2.0 authentication with a bearer token that you generate with a Client ID and Client Secret from Spiff.

  1. Log in to Spiff as a user with the Company Admin role.
  2. On the Reporting tab in Spiff, select Reports.
  3. Click Create Report.
  4. Enter a report name.
  5. For report use case, select API.
  6. Click Create Report.

If you use custom roles, enable the Custom API Reports: Manage permission, under Reporting, on the Role Management page. This permission lets you access and export reports by using the Custom Report Export API.

Role Management option in Spiff

Reporting permissions page in Spiff, showing the Custom API Reports: Manage permission

  1. On the Admin tab in Spiff, select Settings and then select API Access Management.
  2. Enter an application name, select the Custom Reports Export application scope, and click Create.
  3. 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.
  1. 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.
  1. Retrieve access_token from the results.
  2. 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