Thanks for the quick reply @David, sorry for not being very clear.
If I cross-reference the order_of_stages field (which is the ‘natural’ order of the stages) and a non-null time in the stage I might be able to find out what the first stage of the deal was.
Only thing is when a deal has been added in a stage and then moved to an earlier stage, it is impossible to detect that and the wrong stage will be marked as being the first stage.
For example I get the following result when calling the API:
“times_in_stages”: {
"19": 27940,
"20": 80030,
"30": 1067656,
"32": 200495,
"33": 11340,
"34": 0,
"35": 0,
"36": 0,
"38": 0,
"40": 0,
"49": 0,
"50": 0,
"51": 0,
"52": 0,
"65": 349651,
"66": 0,
"67": 174,
"71": 0,
"72": 425401
},
“order_of_stages”: [
34,
40,
49,
50,
35,
36,
71,
38,
65,
66,
67,
51,
52,
72,
30,
32,
33,
19,
20
]
In this case the deal really has been added to stage 67 and moved back to 65. But using the deal order I would find that 65 was the first stage.
So my question aimed at querying this another way.
Thanks for your help!