ATS-CRM-REG-006 Determine an address’s geographic region: Capability Test Specification
Markdown Design / CRM / Regions / Geographic Assignment Policy / Capability Test Specification Determine an address’s geographic region: Capability Test Specification Coverage A covered category has an authored proof; execution and remaining variants are tracked separately.
Saved matching is shared by preview and placement. The interaction scenario connects retire regions while preserving their references, build the geographic assignment policy, check an address against the saved policy, keep placements aligned with address changes, apply the current policy across existing records with this capability. Cross-workflow expectations are proposed where no executable binding is present.
Show evidence (sources, provenance, origins, pinned commits)Coverage Rule covered Transition not-applicable Validation gap: FND-CRM-REG-051 Permission not-applicable Edge covered Failure covered Boundary covered Concurrency gap: FND-CRM-REG-051 Invariant gap: FND-CRM-REG-051 Interaction covered Test Scenarios 15 scenarios proving CAP-CRM-REG-006 ; 12 bound to an existing test.
02 Fallback is deferred and the final enabled fallback wins edge unit test
Proves BR-CAP-CRM-REG-006-02 Preconditions A fallback precedes geographic coverage and another fallback appears later. Steps Evaluate a covered and an uncovered address. Expected The geographic target wins for coverage and the later enabled fallback wins otherwise. Data Prepared geographic coverage examples. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #region_for_address › tries the rest-of-the-world rule last wherever it sits in the order 04 Text intervals include their endpoints boundary unit negative test
Proves BR-CAP-CRM-REG-006-04 Preconditions Postal coverage spans the configured five-digit interval. Steps Evaluate both endpoints, an interior ZIP+4 and the next uncovered code. Expected The endpoints and interior value match while the uncovered code does not. Data Postal inputs spanning the relevant boundary cases. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #region_for_address › compares postal codes as strings, so a ZIP+4 code inside the range matches 06 State matching preserves case sensitivity edge unit negative test
Proves BR-CAP-CRM-REG-006-06 Preconditions A rule lists an uppercase state code. Steps Evaluate the upper- and lowercase versions. Expected Only the uppercase value matches. Data Two contrasting address inputs. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #region_for_address › matches states exactly, so a lower-case state is not the upper-case one 07 Country matching supplies the legacy default edge unit test
Proves BR-CAP-CRM-REG-006-07 Preconditions Coverage includes the United States in lowercase. Steps Evaluate uppercase, lowercase, blank and missing country values. Expected All four inputs match US coverage. Data Four address examples for the comparison. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #region_for_address › matches the country whatever the case of the address or the rule 08 Uncovered addresses can remain unplaced rule unit test
Proves BR-CAP-CRM-REG-006-09 Preconditions The policy contains no fallback. Steps Evaluate an address outside its geographic rules. Expected The matcher returns no region. Data Prepared geographic coverage examples. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #region_for_address › answers no region when nothing matches and there is no rest-of-the-world rule 09 An absent address cannot use fallback edge unit test
Proves BR-CAP-CRM-REG-006-10 Preconditions The policy includes a fallback. Steps Evaluate absent and entirely empty address inputs. Expected Neither input receives a region. Data Prepared geographic coverage examples. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #region_for_address › answers no region for no address even with a rest-of-the-world rule 10 Saved matching is shared by preview and placement interaction api proposed
Proves BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-007-01 BR-CAP-CRM-REG-008-01 Preconditions Two active regions have overlapping coverage and automatic placement is enabled. Steps Save the geographic policy, preview an address, create a contact with that deciding address and deliver assignment; reverse the coverage order and repeat with a new contact. Expected Each preview and corresponding new placement select the same first matching target in the saved order. Data Two active regions have overlapping coverage and automatic placement is enabled. Source WF-CRM-REG-001 11 Unsupported criteria fail instead of choosing a target failure unit negative test
Proves BR-CAP-CRM-REG-004-01 Preconditions A direct matcher caller supplies a rule kind outside the supported set. Steps Evaluate a nonempty address against that rule. Expected Evaluation throws an unsupported-kind error and supplies no regional result. Data A direct matcher caller supplies a rule kind outside the supported set. Bound to Source services-crm:modules/regions/tests/unit/region-matching.spec.js #refuses a rule type it does not know 12 Nongeographic recognized input establishes fallback eligibility edge api proposed
Proves BR-CAP-CRM-REG-006-11 Preconditions A saved policy has one geographic rule and one enabled fallback. Steps Evaluate an address containing only a street line, then an address containing only unrelated properties and finally an empty address. Expected The street-only input receives fallback; unrelated-only and empty input receive no match. Data A saved policy has one geographic rule and one enabled fallback. Source services-crm:modules/regions/services/region-assignment/region-matching.ts:hasAddress, geographicAddressOf, matchRegionRule 13 A saved reversed interval supplies no match boundary browser test
Proves BR-CAP-CRM-REG-006-12 Preconditions A saved postal rule has its end lexically before its start and no fallback is enabled. Steps Save that interval and preview a code between its reversed bounds. Expected Saving succeeds and preview returns no regional match. Data A saved postal rule has its end lexically before its start and no fallback is enabled. Bound to Source react-console:acceptance/crm/playwright/journeys/configuration/CRM-ACC-0358.spec.ts #CRM-ACC-0358 14 Save-time geographic cleaning feeds matching rule api test
Proves BR-CAP-CRM-REG-006-08 Preconditions Enabled state and country rules target local regions. Steps Save a contact address with its state written as a supported full name, deliver assignment and repeat with a supported full country name. Expected The cleaned address codes select the expected geographic targets. Data Enabled state and country rules target local regions. Bound to Source services-crm:modules/regions/tests/integration/services/region-assignment/region-assignment.integration.spec.js #normalized address variants (the save-time cleaning, docs/migrations/contact-and-organization-cleaning/) › matches a state rule from the state written out in full 15 Retired targets remain consistent across preview and traversal interaction api proposed
Proves BR-CAP-CRM-REG-002-08 BR-CAP-CRM-REG-006-01 BR-CAP-CRM-REG-011-05 Preconditions An enabled rule targets a retired definition and an eligible addressed contact has an older placement. Steps Preview the contact’s deciding address, run recalculation and read its final placement and the retained definition. Expected Preview and recalculation both select the enabled rule’s retired target while its definition remains readable. Data An enabled rule targets a retired definition and an eligible addressed contact has an older placement. Source ADR-CRM-REG-005 ← Previous Capability Test Specification ATS-CRM-REG-005 · Maintain individual rules alongside the shared policy: Capability Test Specification Next Capability Test Specification → ATS-CRM-REG-007 · Check an address against the saved policy: Capability Test Specification