Pipelines
Quartz API enables an easy access to pipeline data, metrics through the /pipelines API endpoint.
Pipelines and sub-pipelines represent a set of open opportunities (meaning opportunities still active in the CRM).
Pipeline is the set of all opportunities within the CRM for a company
Sub-pipeline is a subset of the complete pipeline. e.g team pipeline or individual pipeline
Pipelines
Get Pipelines
Retrieves the complete list of pipeline and sub-pipelines of open opportunities for the company.
{
"snapshot_id": "4af7c8d0-20c7-11ef-acef-1568cab95b54",
"created_at": "2024-06-02 10:00:48",
"pipeline_definitions": [
{
"label": "Sales Pipeline",
"pipeline_definition_id": "572af52d-20c7-11ef-aa7d-1568cab95b54",
"pipelines": [
{
"id": "57bdc608-20c7-11ef-84a5-1568cab95b54",
"is_sub_pipeline": true,
},
{
"id": "57a86818-20c7-11ef-89c0-1568cab95b54",
"is_sub_pipeline": false,
},
{
"id": "57bdc6f7-20c7-11ef-b68a-1568cab95b54",
"is_sub_pipeline": true
}
]
}
]
}
Get Pipeline Stages
Pipeline stages are defined in the CRM part of the initial configuration. We offer an endpoint to retrieve these stages for use in your application.
GET /pipelines/stages
{
"pipeline_definition_id" : "572af52d-20c7-11ef-aa7d-1568cab95b54"
}
{
"pipeline_definition_id": "572af52d-20c7-11ef-aa7d-1568cab95b54",
"stages": [
{
"label": "Appointment Scheduled",
"id": "ba03eb99-1da2-11ef-a5fa-ab11d6dd9cee",
"order": "0",
"metadata": {
"is_closed": "false",
"probability": "0.2"
}
},
{
"label": "Qualified To Buy",
"id": "ba03ec0e-1da2-11ef-8be3-ab11d6dd9cee",
"order": "1",
"metadata": {
"is_closed": "false",
"probability": "0.4"
}
},
...
]
}
Pipelines Data
Get Pipeline Metrics
Retrieves pipeline metrics as documented in Metrics Reference.
All available metrics can be retrieved.
GET /pipelines/metrics
{
"pipeline_id" : "s-53fJK-ervon-65ezc-hgEtE"
}
{
"pipeline_id" : "s-53fJK-ervon-65ezc-hgEtE"
"metrics" : {
"PIPELINE_METRIC_APINAME_1",
"PIPELINE_METRIC_APINAME_2",
},
}
{
"metrics": [
{
"metric_definition": {
"id": "fa39ee34-1e6b-11ef-83ef-951eff9d6bcd",
"api_codename": "win-rate"
},
"scope": {
"pipeline": "ddc96daf-1e6b-11ef-aec0-0b6c155b44cd"
},
"metric_value": {
"value": 0.4444444444444444,
"unit": "percentage"
}
},
],
...
"status" : {
"message" : "Pipeline metrics found and retrieved",
"success" : true,
"statusCode" : 200,
}
}
Get Pipeline Metrics as Time Series
Retrieves pipeline metrics as time series by specifying the metric and the duration to retrieve.
GET /pipelines/timeseries
{
"pipeline_id" : "s-53fJK-ervon-65ezc-hgEtE"
"metrics" : {
"metric_name" : "PIPELINE_METRIC_APINAME_1",
"duration" : 30,
},
"status" : {
...
}
}