Hello, We need to calculate total duration for which conversations are snoozed for analytical purposes. I went through the community forum and found this
In the above topic, it’s mentioned that their isn't a direct method provided for generating a report specifically for snooze time in conversations.
Although we have found out that we can derive snooze durations and it would be helpful if we can get a review from the Intercom community over this method, or if we can get some other attributes or methods (provided by the Intercom API) through which we can calculate snooze durations, this would be extremely useful for us.
We are aiming to derive the snooze duration based on the following:
- Calculate snooze time by tracking conversation state transitions through conversation parts, which provide the most granular state information for each conversation.
- Each conversation_part has a
statusfield that captures the conversation state (open, closed, or snoozed) and a created_at field which tracks the time at which that conversation_part was created - Calculate total snooze time by summing the duration between consecutive state transitions - specifically, measure the time from when status becomes 'snoozed' until it changes to 'open' or 'closed', using the created_at field. And in case if the latest or last state is snoozed, then add the difference b/w it's created_at field with the snoozed_until attribute (the time in the future when this conversation will be marked as open)
- API limitation: The maximum number of conversation parts that can be returned via the API is 500, If a conversation has more than that, then API will return the 500 most recent conversation parts. Hence t_snooze for a particular conversation will cover the snooze duration for the latest 500 conversation_parts.

