Skip to content

Auto-Resolve & Idle Countdown

Auto-resolve conversation settings
Auto-resolve conversation settings

When a customer goes silent after an agent replies, Mahadata can close the conversation automatically instead of leaving it open in the queue forever. Agents don’t need to remember to mark each conversation as resolved.

The flow has two phases (both optional):

  1. Warning phase — N minutes before the resolve deadline, send a message like “Are you still there? We will close this in X minutes.” to the customer and mark the conversation as warned.
  2. Resolve phase — at the deadline, set the conversation status to resolved, optionally send a closing message, and trigger post-resolution actions (e.g., a CSAT survey).

Configuration — Settings → Auto Resolve

Section titled “Configuration — Settings → Auto Resolve”

Per-tenant configuration:

FieldMeaningTypical value
EnabledMaster toggleOn
Idle minutesTime since the agent’s last reply before the conversation is auto-resolved30
Warning minutesTime before the resolve point when the warning message is sent (set to 0 to skip the warning)5
Queued Timeout (minutes)Idle time for conversations in the queue (not yet picked up by an agent) before being closed automatically1440 (24 hours)
Warning messageTemplate/text “Are you still there?” that the customer sees before resolution”We haven’t heard from you. We will close this conversation in {'{{warning_minutes}}'} minutes.”
Resolve messageClosing template/text sent upon resolution (optional)“Closing this conversation. Reply anytime to reopen.”
Excluded tagsConversations tagged with any of these are NEVER auto-resolvedKOMPLAIN

One per line auto_resolve_configs per client_account_id.

The countdown starts from the agent’s last reply (last_agent_reply_at). The auto-resolve sweeper runs every 2 minutes and looks for conversations that:

  1. Tenant has auto-resolve active
  2. Conversation status open
  3. The most recent message in the conversation was sent by the agent
  4. The agent’s last reply is older than idle_minutes

Only conversations that meet all four conditions are resolved. Conversations that have an excluded tag (for example, KOMPLAIN) is skipped.

The inbox displays a small Jam + Xm (and a red “Overdue” pill) on the conversation row only when the agent is the latest sender AND the conversation is open AND auto-resolve is configured for the tenant. The chip then counts down toward last_agent_reply_at + idle_minutes.

If the customer replies, the chip disappears — the conversation is now in the agent-action phase (waiting for the agent), not the customer-idle phase. Auto-resolve never runs while the customer is the latest sender.

When the agent replies again, the chip reappears with a new last_agent_reply_at that are new.

Excluded scenarios — when the sweeper intentionally skips a conversation

Section titled “Excluded scenarios — when the sweeper intentionally skips a conversation”

The sweeper will NOT auto-resolve a conversation when any of these is true:

ReasonWhere
Auto-resolve is not enabled for the tenantauto_resolve_configs.enabled = false
Conversation is already closedconversations.status != 'open'
The customer’s reply is the latest messageconversations.last_message_sender_type != 'agent'
The agent has never repliedconversations.last_agent_reply_at IS NULL
The conversation has a tag KOMPLAIN (or another tag marked in the configuration)tag membership

All of this is by design — agents are not ignoring customers in these cases.

When warning_minutes > 0, the sweeper does this on every pass:

  1. Calculate batas_peringatan = sekarang - (idle_minutes - warning_minutes) menit
  2. Calculate batas_idle = sekarang - idle_minutes menit
  3. If last_agent_reply_at <= batas_idle → resolve the conversation (Phase 2)
  4. If last_agent_reply_at <= batas_peringatan AND not yet warned → send a warning message and stamp auto_resolve_warned_at (Phase 1)

A conversation is warned at most once per agent-reply cycle. If the customer replies after the warning, auto_resolve_warned_at is reset when the agent next replies.

When warning_minutes = 0, the warning phase is skipped — the sweeper only resolves at idle_minutes.

When a conversation is resolved automatically, the platform:

  1. Configure conversations.status = 'resolved' and stamp resolved_at
  2. Send resolve_message that is configured (if any) via the same channel last used by the customer
  3. Resolving the linked live ticket on the conversation (lifecycle coupling) — the ticket moves to the Resolved status without requiring a disposition code; disposition codes are only requested when agents manually resolve the conversation from the inbox. Tickets that are already resolved/closed are not touched
  4. Publish event events.conversation.auto_resolved for downstream consumers (KPI counters, CSAT triggers, etc.)
  5. Triggering a CSAT/NPS/CES survey if the tenant has an active survey (customer replies do not reopen the conversation — see Customer Surveys)
  6. The conversation leaves the active inbox queue

CSAT responses arriving within the survey window are captured and stored in the conversation timeline (visible to agents reviewing the conversation later) without reopening the conversation.

The chip on each conversation row in the inbox list reflects time relative to the auto-resolve deadline:

VisualMeaning
HiddenThe customer is the most recent sender (waiting for agent), OR there is still plenty of time, OR the feature is not active, OR last_agent_reply_at null
Dim gray pill (5j 12m)More than warning_minutes remaining; the conversation is in the customer-idle phase
Amber pill, blinking (24m)Inside the warning window — auto-resolve is approaching
Red pill, “Overdue”Past the deadline. The sweeper runs every 2 minutes — within that window the conversation will soon be resolved

Refresh interval: the chip recalculates every 30 seconds.

SymptomPossible causeSolution
Conversation stays open past the idle limitAuto-resolve is not enabled in configurationSettings → Auto Resolve → enable
Conversations with the KOMPLAIN tag are not auto-resolvedBy design — complaint conversations require manual closingIf unintended, remove the tag
Resolve message not sentThe channel does not allow free-form messages outside the customer service window (CSW)Move the closing text to a template marked AUTHENTICATION or UTILITY
Auto-resolve sweep fails in the worker-scheduler logsDatabase error, event publish error, or last_inbound_phone_number_id missing on the conversationCheck the logs worker-scheduler for specific errors
Sweep runs but nothing changesAll open conversations are in the agent-action phase (the customer replied last), or all are tagged KOMPLAIN, or idle_minutes has not been reachedCheck via SQL: SELECT count(*), last_message_sender_type FROM conversations WHERE status = 'open' GROUP BY last_message_sender_type
”Overdue” chip stays red for more than 2 minutesThe sweeper is not running, or the sweep failed for that conversationCheck the worker-scheduler logs + DB: confirm auto_resolve_configs.enabled = true and the conversation has no excluded tags
TermDefinition
idle_minutesTotal time after the agent’s last reply before auto-resolve runs
warning_minutesTime before the resolve point when the warning is sent. 0 disable the warning phase
last_agent_reply_atTimestamp of the agent’s most recent message on this conversation
last_message_sender_typeWho sent the most recent message: agent, contact, bot, system, or supervisor_whisper
Timestamp when the warning was sent. Used to prevent duplicate warnings within a single cycle
SweeperBackground loop in worker-scheduler that runs the resolve logic every 2 minutes