---
id: SCR-CRM-REG-003
title: Assignment Rules editor
route: '/console/{tenantId}/configuration/crm/regions/assignmentRules'
surface: console
product_area: crm
module: regions
revision: 2
status: draft
design_intent: confirmed
origin: >-
  Andrew approved 2026-10-15 (a read-only Assignment Rules tab with its own editor screen), cited in
  services-crm:docs/migrations/crm-regions/README.md#2026-10-15 — Final acceptance (console follow-ups)
implementation_evidence: observed
inference: []
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
purpose: >-
  Allow an authorized administrator to stage assignment settings and ordered coverage, then save them together
  without changing record placements.
supports:
  - JNY-CRM-REG-001
  - JNY-CRM-REG-002
  - CAP-CRM-REG-003
  - CAP-CRM-REG-004
  - CAP-CRM-REG-013
permission: The console's CRM settings management alias; the service requires crm.regions.update
entry_from:
  - The policy view’s Edit Assignment Rules control
  - The catalogue’s Add Rule prompt
  - Direct navigation checked by the settings-management gate
exits_to:
  - '/console/{tenantId}/configuration/crm/regions?tab=rules'
displays:
  - field: >-
      Staged switch, eligible kinds and deciding sources; named-type choices use applicability filtering while
      retaining an existing choice.
    source: >-
      getRegionAssignmentSettings; listAddressTypes (Entities), filtered by applicability with the saved type
      kept
  - field: 'Staged coverage order with each rule’s criteria, regional target and enabled status.'
    source: listRegionAssignmentRules; listRegions
  - field: Draft change count and blocking issues linked to their controls.
    source: the browser's draft comparison and issue check
  - field: Nonblocking browser coverage and target warnings.
    source: the browser's analysis of the staged rules
actions:
  - label: Save Changes
    operation_id: updateRegionAssignmentSettings
    permission: crm.regions.update (console alias crm.settings.manage)
    confirm: false
  - label: Cancel
    operation_id: 'none: discards the draft and returns to the Assignment Rules tab'
    permission: crm.regions.read
    confirm: only when unsaved changes require the navigation guard
  - label: 'New Rule and Edit Rule (drawer, staged)'
    operation_id: none until Save Changes (updateRegionAssignmentSettings)
    permission: crm.regions.update (console alias crm.settings.manage)
    confirm: false
  - label: 'Reorder, enable, disable or delete a rule (staged)'
    operation_id: none until Save Changes (updateRegionAssignmentSettings)
    permission: crm.regions.update (console alias crm.settings.manage)
    confirm: false
states:
  - loading
  - empty
  - error
  - read-only
validation:
  - BR-CAP-CRM-REG-003-04
  - BR-CAP-CRM-REG-003-10
  - BR-CAP-CRM-REG-003-12
  - BR-CAP-CRM-REG-004-01
  - BR-CAP-CRM-REG-004-02
  - BR-CAP-CRM-REG-004-04
  - BR-CAP-CRM-REG-004-06
  - BR-CAP-CRM-REG-004-08
  - BR-CAP-CRM-REG-004-11
  - BR-CAP-CRM-REG-004-12
  - BR-CAP-CRM-REG-004-13
  - BR-CAP-CRM-REG-013-06
patterns:
  - Full-width PageLayout with ConfigBreadcrumb and PageHeader
  - 'EditorActionBar showing change count, Save Changes and Cancel'
  - Unsaved-change reporting and guarded navigation
  - 'RadioGroup, Switch and AddressChoiceSelect for policy choices'
  - 'StagedRulesList using drag ordering, movement controls and row actions'
  - EditorDrawer containing GeographicCriteriaEditor and SearchableSelect
  - Issue-target reveal that scrolls and focuses the relevant control
component: components/regions/assignment-rules-editor.tsx (AssignmentRulesEditor)
evidence:
  - >-
    react-console at baf6dae3: components/regions/assignment-rules-editor.tsx, assignment-draft.ts,
    staged-rules-list.tsx, rule-dialog.tsx, address-choice-select.tsx, address-choice.ts;
    components/configuration/area-route.tsx (regionAssignmentRulesRoute); lib/configuration/regions.ts
    (assignmentsBody, addressTypesFor); components/regions/__tests__/assignment-rules-editor.test.tsx,
    assignment-draft.test.ts.
controls: [TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-003, TC-PRV-001, TC-PRV-002, TC-TEN-001, TC-TEN-002, TC-TEN-003]
---

# Assignment Rules editor

## What the Screen Is For

The dedicated editor stages the complete policy before sending a save. The request includes assignment choices, the ordered coverage list and the settings version captured when editing began. Placements are updated later through explicit recalculation.

## What It Shows and Lets People Do

Staff choose assignment status, participating record kinds and preferred or typed address sources. New address-type choices are filtered by applicability; an already selected type remains visible. Rules are added or edited through the shared right-hand drawer, then staged alongside reorder, enable and delete actions. Retained rules keep identifiers, while new staged rules receive persisted identifiers during the save.

## States and Errors

Enabled assignment activates blocking draft checks and issue reveal. Disabling assignment hides those checks but does not exempt the request from backend validation. Cancel and navigation invoke the unsaved-change guard when the draft is dirty. A stale save offers conflict feedback and reload or continued editing; other refusals remain in the editor.

## Patterns It Must Respect

The built editor uses the shared action bar, page layout, geographic controls and guarded drawers. It is not a separate visual regeneration request. Saving must preserve the complete intended rule list because the backend removes every omitted rule.
