iachat/app/views/api/v1/accounts
Tanmay Deep Sharma 341487b93e
feat: Add assignment policies controllers with jbuilder views (#12199)
## Linear reference:
https://linear.app/chatwoot/issue/CW-4649/re-imagine-assignments

## Description
This PR introduces the foundation for Assignment V2 system by
implementing assignment policies and their association with inboxes.
Assignment policies allow configuring how conversations are distributed
among agents, with support for different assignment orders (round_robin
in community, balanced in enterprise) and conversation prioritization
strategies

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Test Coverage:
-  Controller specs for assignment policies CRUD operations
-  Enterprise-specific specs for balanced assignment order
-  Model specs for community/enterprise separation

Manual Testing:
1. Create assignment policy: POST
/api/v1/accounts/{id}/assignment_policies
2. List policies: GET /api/v1/accounts/{id}/assignment_policies
3. Assign policy to inbox: POST
/api/v1/accounts/{id}/assignment_policies/{id}/inboxes
4. View inbox policy: GET
/api/v1/accounts/{id}/inboxes/{id}/assignment_policy
5. Verify community edition ignores "balanced" assignment order
6. Verify enterprise edition supports both "round_robin" and "balanced"

- testing the flows after enterprise folder deletion

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-08-18 19:15:21 -07:00
..
actions/contact_merges feat: Reverse the contact merge (#8057) 2023-10-10 08:20:48 +05:30
agent_bots feat: Ability to reset api_access_token (#11565) 2025-05-29 14:42:13 +05:30
agents chore: Fix agent API returning 500 error (#9193) 2024-04-04 19:44:47 +05:30
articles feat(v4): Update the help center portal design (#10296) 2024-10-23 22:09:36 -07:00
assignable_agents fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
assignment_policies feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
automation_rules fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
callbacks fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
campaigns fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
categories feat: Adds the ability to set an emoji for help center category (#8111) 2023-10-20 13:52:30 +05:30
channels/twilio_channels fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
contact_inboxes chore: Add an API to find the contacts using contact inbox sourceId (#8012) 2023-09-28 15:26:28 -07:00
contacts feat: hide tokens and password on contact inbox payloads (#10888) 2025-02-20 21:22:12 -08:00
conversations feat: API Endpoints to update message status (#11387) 2025-04-29 15:33:11 -07:00
csat_survey_responses fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
custom_attribute_definitions fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
custom_filters fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
dashboard_apps fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
inbox_members fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
inboxes feat: Add assignment policies controllers with jbuilder views (#12199) 2025-08-18 19:15:21 -07:00
integrations feat: Linear OAuth 2.0 (#10851) 2025-02-27 18:15:53 +05:30
labels Feature: Label APIs (#931) 2020-06-07 11:17:13 +05:30
macros fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
notification_settings Feature: Add web push notification permission in frontend (#766) 2020-05-06 00:10:56 +05:30
notifications feat(v4): Update Inbox view card design (#10599) 2025-01-07 21:11:54 +05:30
portals feat(cloud): Add support for viewing status of SSL in custom domains (#12011) 2025-07-30 10:52:47 -07:00
search feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
team_members fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
teams fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00
webhooks feat: Add event subscription option to webhooks (#4540) 2022-04-25 17:44:42 +05:30
whatsapp/callbacks feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
create.json.jbuilder fix: Cannot read properties of undefined (reading 'always_play_audio_alert') (#7260) 2023-06-06 15:16:25 -07:00
show.json.jbuilder feat: allow feature plan map in super admin (#9318) 2024-05-08 22:58:46 -07:00
update.json.jbuilder fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560) 2022-10-05 17:24:34 -07:00