Conversation Window: keep related conversations together

Ticket: CIM-34383  |  Release: 5.14.0  |  Status: End-to-end testing in progress

What it does

A channel can keep a customer's conversation open for a set number of days. When the customer's session ends (they leave, or the customer activity timer fires) the conversation is kept instead of closed. If the customer comes back on the same channel inside the window, they continue the same conversation. QM and agents then see one conversation instead of many short ones.

Why

On social media comment channels, a customer message starts a conversation, the agent replies, and the customer goes quiet. The inactivity timer ends the conversation after one or two messages. One customer issue becomes 10–20 unlinked conversations, so QM cannot judge how the agent handled the whole issue.

How to turn it on

  • Admin UI: Channel Manager → channel settings → Conversation Window (days).

  • 0 (or not set) = off. This is the default, and conversations end exactly as before.

  • 1 or more = the number of days. The maximum (10 days) is enforced in the admin UI.

  • Applies to every non-voice channel. Voice channels reject the setting.

Rules

Situation

What happens

When does the window start?

When the conversation is created. It is a fixed lifetime; a customer returning does not extend it.

Session ends, customer has left, no agent in the conversation, window still open

The conversation is parked. Its activities are saved as usual, but it is not closed: no end time, no CLOSED event, and no record in the conversations collection (so the ETL never sees it).

Customer returns on the same channel inside the window

The parked conversation is restored (same conversation id, creation time and room) and routed fresh, like a new conversation. A different agent may pick it up.

Customer returns on a different channel

A new conversation starts (phase 1). The parked one stays parked until it expires or is closed.

Agent closes a parked conversation

Closed for good. A returning customer gets a new conversation.

Window ends

A timer closes the parked conversation at creation time + N days. If the customer is in the conversation at that moment, it closes when their session ends.

Window off (0)

No change from today.

What QM and agents see

  • Customer history already includes a parked conversation's activities, because they are saved when it is parked.

  • Conversation events for a restored conversation return the earlier events (from Mongo) followed by the new ones, in one list.

APIs

  • CCM POST /channels and PUT /channels/{id}: optional conversationWindowDays (0 = off; omitted on update keeps the current value). Channel responses include it (0 when off).

  • Conversation Manager POST /customer-topics/{conversationId}/close-parked: closes a parked conversation. Returns 200, or 404 if none is parked with that id.

Known limits (phase 1)

  • Restore works only on the same channel, and only when the customer has no other open conversation (an existing open conversation on another channel keeps the room busy).

  • There is no new conversation state. “Parked” means a record exists in parked_conversations/

  • The expiry uses the shared timers library, whose timer types are fixed, so it reuses the hold-timer type under a park: key. If the timer is lost, a parked conversation stays parked.

  • The agent desk has no “close parked conversation” button yet; only the API exists.