KPIs - Number of Deals Entering Certain Stages


New to using the Pipedrive API - what would be the simplest way to pull information on how many Deals entered certain stages on a daily basis?

I’m looking to track the daily number of Deals Opened, “Offers Made” (i.e. a random Stage ID), “Contracts Received” (another intermediate stage ID), and Deals Won.

I see the Get deals in a stage [GET /stages/{id}/deals] endpoint, but I don’t see a field showing when it was added to the stage. I don’t want to seemingly recreate managing the state of deals on my side (i.e. Deals A, B, & C are in stage Y yesterday, now Deals A, B, C, & D are in stage Y -> so 1 deal was added).

Is there a simpler way I’m missing?



What do you think about subscribing to deal update events via Webhooks instead of pulling data via API?

You can configure webook in “Settings -> Tools -> Webhooks”, to the “” event. Once a deal is updated (moved to the different stage is also a deal update event), webhook is triggered, with the following payload:

 // ...
 "current": {
    "stage_id": "<current stage id>",
 "previous": {
    "stage_id": "<previous stage id>",
 // ...

You can get stages ids by calling!/Stages/get_stages, and once a current deal stage matches you desirable stage id and previous stage id is not the same as a current one, +1 into KPI calculations for that stage.

Would it work for your need?


Ok great, I’ll check that out. Thanks!