Skip to content

Add bulk actions on conversations (assign, status, priority)#286

Open
mageaustralia wants to merge 1 commit intoabhinavxd:mainfrom
mageaustralia:feat/bulk-actions
Open

Add bulk actions on conversations (assign, status, priority)#286
mageaustralia wants to merge 1 commit intoabhinavxd:mainfrom
mageaustralia:feat/bulk-actions

Conversation

@mageaustralia
Copy link
Copy Markdown

Adds bulk actions on conversations, per the item you mentioned in #259. Focused PR as you suggested there.

What

Per-row checkboxes on the conversation list. When at least one conversation is selected, the filters bar swaps for a small toolbar with three dropdowns: Assign (agent or team), Status, Priority. Shift-click selects a range. The X on the right clears.

How

Frontend only. The bulk operations call the existing per-conversation API endpoints (updateAssignee, updateConversationStatus, updateConversationPriority) in parallel via Promise.allSettled. No new backend handler.

That keeps the diff small. Trade-offs worth flagging:

  • 50 selected items = 50 concurrent HTTP requests. Wall-clock for a typical bulk op is sub-second on a fast network, but it's not ideal at scale.
  • No transactionality. If some calls fail, you get a toast like "Updated 47, failed 3 of 50" and the per-uuid errors are logged to console.

Permissions

Each dropdown is gated on the corresponding existing permission:

  • Assign Agents: `conversations:update_user_assignee`
  • Assign Teams: `conversations:update_team_assignee`
  • Status: `conversations:update_status`
  • Priority: `conversations:update_priority`

A user with none of these still sees the count and clear button (since they could already select rows).

i18n

8 new keys under `conversation.bulkActions.*` in `i18n/en.json`. Reused `globals.terms.{agent,team,status,priority,error}` for the singular and plural labels, so the Crowdin export is small. Other locales fall back to `en` until translated.

Testing

Tested manually against a cloned production dataset (~5k conversations, ~80k contacts). Verified:

  • Single selection, multi-selection, shift-click range
  • Bulk assign agent, bulk assign team
  • Bulk change status, bulk change priority
  • Clear selection, including after a partial-failure run
  • Toolbar shows the correctly localized count (singular vs plural)
  • Permission gating verified by removing perms from a test role

Per-row checkboxes on the conversation list. When at least one
conversation is selected, the filters bar swaps for a small toolbar with
three dropdowns: Assign (agent or team), Status, Priority. Shift-click
selects a range. The X on the right clears.

Frontend only. The bulk operations call the existing per-conversation
API endpoints (updateAssignee, updateConversationStatus,
updateConversationPriority) in parallel via Promise.allSettled. No new
backend handler.

Each dropdown is gated on the corresponding existing permission
(conversations:update_user_assignee, _team_assignee, _status,
_priority). Toolbar strings are localized via 8 new keys under
conversation.bulkActions.* in i18n/en.json.
@abhinavxd
Copy link
Copy Markdown
Owner

abhinavxd commented Apr 23, 2026

Hey thanks for the PR! This is amazing and is exactly what we needed at work.

I tried it locally few suggestions -

  • Place the checkbox on top of the avatar and show it on hover. This saves space and removes the need for a permanently visible checkbox on the left.
image

  • The top options could be just icons to save space.
image

We can also allow changing the assigned team separately using the SelectCombobox component, since it supports search filter.
We could also allow setting tags.

Overall: assign team, assign agent, set tags, and status - all with icons to save space, with tooltips on each icon.
We can drop priority; not having it will space space.

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.

2 participants