Skip to content
AISARAISAR
All articles

Auto-closing idle conversations

How to turn on automatic closing of conversations nobody has written in for a long time: the period, what is closed, what happens on close and why old conversations are closed gradually.

What it does

If nobody has written in a conversation for a long time, AISAR closes it by itself. The count starts from the last message and any participant resets it: the client or an employee. This keeps the "Active" list clean and removes manual tidying from operators.

How to turn it on

  1. Open Settings, Messaging automation, Chat behavior.
  2. Turn on "Close conversations automatically".
  3. In "Close after, hours" set the period: a whole number from 1 to 720 (72 by default, that is three days).
  4. Save. You need the right to edit company settings.

What gets closed and what does not

  • Only active private conversations are closed. Group chats and conversations already closed by hand are not touched.
  • A conversation where a scenario is waiting for the client reply (the "Wait for reply" step) is skipped: the wait is not interrupted.
  • A conversation an employee reopened by hand and where no new messages appeared is not closed again: the operator decision wins.
  • A satisfaction survey is not sent on auto-close: in a long-silent conversation it would be spam.

What happens on close

Auto-close works like a manual close: the conversation.closed webhook is sent, linked records in Bitrix24 and amoCRM are updated, and the scenario trigger "Conversation closed" fires (its source is auto_close). If you have a scenario that sends the client a message on close, it fires for every auto-closed conversation.

When the client writes again, a new conversation opens (and a new deal if automatic deal creation is on), as after a manual close.

On the first run the accumulated old conversations are closed gradually, not all at once: the check runs every 5 minutes and closes at most 200 conversations per company at a time, that is up to 2400 per hour. A large tail of old conversations disappears over a few hours. Turning it on or off, or changing the period, starts the pass over.

Setting through the API

The fields auto_close_enabled (boolean) and auto_close_after_hours (integer from 1 to 720) are part of GET and POST /v1/companies/current/chat-behavior. More: REST, conversations.

See also