HOURS_SPENT_IN_STATE

Description

HOURS_SPENT_IN_STATE returns the total number of hours a case has spent (or has so far spent) in a given state, based on the case's transition history.

You can pass the state positionally or using the named argument state.

If you need the result in days rather than hours, use DAYS_SPENT_IN_STATE.

Example

HOURS_SPENT_IN_STATE('in_review')

This returns the number of hours the current case has spent in the in_review state.

Example with named argument

HOURS_SPENT_IN_STATE(state: 'in_review')

Last updated

Was this helpful?