How to Read Clari's Export API Output
Overview
The Clari API enables you to retrieve revenue data out of the Clari platform and enrich downstream reporting and revenue systems. The API returns JSON-encoded responses and uses standard HTTP response codes, authentication, and verbs. To learn more about how to extract real-time data and predictive insights with the Clari API, click here.
You are probably on this page because you’ve just completed your first export job — congrats! In this article, you’ll learn how to read the JSON response. The response is split into five lists and is structured similar to look up tables.
"entries":[...],
"users":[...],
"fields":[...],
"timePeriods":[...],
"timeFrames":[...]
See details of what’s included in each list below:
-
entries: values for specific fields for a given user. Each entry includes a userId, fieldId, timePeriodId, and timeFrameId for easy mapping.
-
users: are all the users that fall into the requested scope of the export request.
-
fields: include all columns from the grid in Forecasting.
-
timePeriods: maps to the quarter the forecast entry was made.
-
timeFrames: for current forecasts, this is the week in which the data was pulled.
Entries
Entries are specific values or fields for a given user. Each entry can be used as a “look-up” table for additional information. For example, you’ll see an entry includes a userId, fieldId, timePeriodId, and timeFrameId.
Those IDs map to their own list, where you’ll find additional information about the associated user, field, time period, or time frame.
Example for Forecast entry values:
"entries":[
{
"forecastValue": 160000.0,
"updatedBy": "0050W00032424XYQA2",
"updatedOn": 1580938887979,
"currency": {
"code": "USD",
"symbol": "$"
},
"timeFrameId": "TF:2020-02-01",
"isUpdated": true,
"timePeriodId": "2021_Q1",
"fieldId": "fc_newarr_bestcase",
"userId": "67246:00E0W342401dhnJUAQ"
},
{
"forecastValue": 90000.0,
"updatedBy": "0050W0000074CXYQA2",
"updatedOn": 1580976000000,
"currency": {
"code": "USD",
"symbol": "$"
},
"timeFrameId": "TF:2020-02-06",
"isUpdated": false,
"timePeriodId": "2021_Q1",
"fieldId": "fc_newarr_bestcase",
"userId": "67246:00E0W342401dhnJUAQ"
}
]
Example for CRM, ingested, and quota attainment values:
{
"aggregationTotal": 1000000.00,
"currency": {
"code": "USD",
"symbol": "$"
},
"timeFrameId": "TF:2024-01-25",
"timePeriodId": "2024_Q1",
"fieldId": "fc_newarr_coverage",
"userId": "67246:00E0W342401dhnJUAQ"
},
{
"aggregationTotal": 1200000.00,
"currency": {
"code": "USD",
"symbol": "$"
},
"timeFrameId": "TF:2024-02-01",
"timePeriodId": "2024_Q1",
"fieldId": "fc_newarr_coverage",
"userId": "67246:00E0W342401dhnJUAQ"
},
Users
With the userId found within each entry, you’ll be able to extract additional user data from the user list below.
"users": [
{
"userId": "126532:00E0W000001uqtMUAQ",
"name": "Jason White",
"email": "jwhite@clari.com",
"scopeId": "125672::OWNER",
"crmId": "0050W000007c9pDQBN",
"hierarchyId": "00E0W000001uqtMUGN",
"hierarchyName": "Enterprise - Account Management",
"parentHierarchyId": "00E0Q120001ur9jUAA",
"parentHierarchyName": "Director, Enterprise Account Management"
},
{
"userId": "67246:00E0W000001dhnJUAQ",
"name": "Jason Brown",
"email": "jbrown@clari.com",
"scopeId": "67246::OWNER",
"crmId": "0050W0000074CXYQA2",
"hierarchyId": "00E0W000001dhnJUGN",
"hierarchyName": "Commercial West",
"parentHierarchyId": "00E0W000001dhnOUAQ",
"parentHierarchyName": "Director, Commercial West"
}
]
Fields
With the fieldId found within each entry, you’ll be able to extract additional field information from the list below.
"fields": [
{
"fieldId": "fc_newarr_worstcase",
"fieldName": "New ARR Worst Case",
"fieldType": "forecast"
},
{
"fieldId": "fc_newarr_mostlikely",
"fieldName": "New ARR Most Likely",
"fieldType": "forecast"
},
{
"fieldId": "fc_newarr_quota",
"fieldName": "Goal",
"fieldType": "quota"
}
]
timePeriods
The timePeriod maps to the quarter or month visible in your Forecast Module. The timePeriod can be configured when creating your export request and it can be any past, present, or future quarter.
"timePeriods": [
{
"timePeriodId": "2021_Q1",
"type": "quarter",
"label": "Q1",
"year": "2021",
"startDate": "2020-02-01",
"endDate": "2020-04-30",
"crmId": "026d0000001Bqa8AAC"
}
]
timeFrames
The timeFrame is the week(s) for which the forecast export data was pulled. If the includeHistorical parameter was set to false, then you will only see the current timeFrame. If the includeHistorical parameter was set to true, you will see every week from the first week of the quarter. Note that the timeFrame is based on your orgs Salesforce fiscal periods and the “startDate” is anchored according to your forecast week configuration in Clari.
"timeFrames": [
{
"timeFrameId": "TF:2020-04-23",
"startDate": "2020-04-23",
"endDate": "2020-04-29"
},
{
"timeFrameId": "TF:2020-02-06",
"startDate": "2020-02-06",
"endDate": "2020-02-12"
},
{
"timeFrameId": "TF:2020-04-30",
"startDate": "2020-04-30",
"endDate": "2020-04-30"
}
]
Check out this article on how to use Postman to test an API.