Skip to content

Router 0.12.0: snoozed kinds keep their owner - #176

Merged
kingsleydon merged 3 commits into
mainfrom
router-snoozed-kinds-keep-owner
Oct 24, 2026
Merged

kingsleydon merged 3 commits into
mainfrom
router-snoozed-kinds-keep-owner

Conversation

@kingsleydon

@kingsleydon kingsleydon commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Auto-answered kinds currently hand pending bot conversations to people after the canned reply. Chatwoot clears waiting_since for the reply, then re-arms it on pending assignment or bot handoff, so an answered customer still appears to be waiting for a human.

Snoozed kinds now send the guarded reply, complete the before-handoff hook, snooze as the account bot, and assign the confident owner. This preserves the cleared wait and puts the owner in place before the customer's next message reopens the ticket directly to open. Snoozed kinds use the same confidence, account-agent validation, and topic-label rules as routed tickets. Resolved kinds still set tickets aside without assigning an owner. Configuration remains backward compatible; the package and lockfile move to 0.12.0.

For a snoozed kind with cannedResponse, only a reply sent and confirmed by the current routing attempt permits snoozing. When the once-per-ticket guard finds an earlier reply, route normally to the owner or hand off so an unanswered follow-up stays open for people. Snoozed kinds without a canned response retain their configured status behavior. A changed status, inbox, or bot ownership after snoozing is logged before deferring the assignment.

Chatwoot v4.19.0 source checked for this change:

Verification

Node 24.21.0 / npm 12.1.0:

  • npm run lint — passed.
  • npm run typecheck — passed across the repository.
  • npm test -w packages/chatwoot-router — 198 tests passed in 5 files. Covers reply → hook → snooze → assignment order, no open/handoff mutation, no confident owner, resolved behavior, account-agent validation, takeovers after snooze, assignment errors/lost responses, a five-page turn plus hook within the 45-request budget, unanswered follow-ups with historical replies, and unchanged snoozing without a canned response.

Existing retry limitation: if assignment fails after snoozing, the next run releases the still-owned bot and leaves the conversation snoozed without an owner; it does not repeat the reply, hook, or status change. If Chatwoot committed the assignment but its response was lost, retry preserves the owner. These behaviors are documented and tested without adding an effects ledger.

Checklist

  • Required scoped verification listed above passes.
  • User-visible changes are described in CHANGELOG.md for the requested 0.12.0 release.
  • README, configuration reference, and routing behavior documentation are updated.

kingsleydon and others added 3 commits October 24, 2026 07:59
Snooze answered kinds before assigning their confident owner so Chatwoot keeps the cleared customer wait. Apply routed topic rules, preserve resolved behavior, and document retry semantics.

Co-Authored-By: Codex <noreply@openai.com>
Apply a canned-response snooze only after this routing attempt sends and confirms its reply. Route historical-reply follow-ups normally while preserving snoozed kinds without canned responses and resolved behavior.

Co-Authored-By: Codex <noreply@openai.com>
Warn with conversation identifiers when status, inbox, or bot ownership changes before the owner assignment.

Co-Authored-By: Codex <noreply@openai.com>
@kingsleydon
kingsleydon merged commit aef92c7 into main Oct 24, 2026
4 checks passed
@kingsleydon
kingsleydon deleted the router-snoozed-kinds-keep-owner branch October 24, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant