Time in stage
The "Time in stage" robot returns, inside a Bitrix24 (Alaio) workflow, how long a deal, lead or smart process item spent in a given stage — in seconds and whole days, for the last visit or for all visits combined.
The robot measures time in a stage inside the Bitrix24 (Alaio) workflow itself, reading the transition history at run time. The stage is given by code or by name, with the code taking priority, so renaming a stage in the funnel breaks nothing. If the item is sitting in the stage right now, the clock runs up to the current moment — that is the main use, "it has been stuck for N days". When the item returned to the stage several times, take the last visit or the sum of all: the number of visits is returned separately and shows how often the item slipped back down the funnel. The result comes in seconds and in whole days, plus a flag saying whether the item is in that stage now. Deals, leads and smart process items are supported; by default the robot uses the item the workflow runs on. Time is calendar time.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Item | select | — | auto |
| Item ID (for the "by ID" modes) | string | — | |
| Smart process type ID (for the smart process mode only) | string | — | |
| Stage — code or name | string | yes | |
| What to measure | select | — | last |
What does the robot return?
| Parameter | Type |
|---|---|
| Time in stage, seconds | int |
| Time in stage, whole days | int |
| Number of visits to the stage | int |
| Currently in this stage (Y/N) | string |
| Stage code | string |
| Stage name | string |
| Stage found (Y/N) | bool |
| Success | bool |
What errors can the robot return?
The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.
- Stage "{stage}" was not found on the portal. Provide the stage code or its exact name.
- This item type has no stages. The robot works with deals, leads and smart processes; for the "by ID" modes provide a valid ID.
- API error while reading the stage history.
Scenario: a deal stuck in approval
- A recurring workflow runs the robot on a deal
- It measures the time spent in the current Approval stage
- If that is more than seven whole days, a task is created for the manager, and the visit count shows how often the deal has already slipped back