Safety note: this module only performs internal assignment and flagging — it sends no customer messages, changes no prices, publishes nothing, and never touches the production DB. Assignment results are written to the log table only and are idempotent.
Automatic Session Assignment Rules
When the master switch is on: sessions are routed by the AI-first setting, then assigned to agents who are online and under their session cap per the new/returning visitor rules.
Still assign to the original agent when they are offline/busy
AI first (visitors enter the bot list instead of being assigned to agents)
No-reply timeout (sessions not replied to beyond this duration are flagged red)