CRM · Store labels (store types)
CRUD for the code+name labels used to group stores, which campaigns and proposals can then target as a set instead of listing individual stores.
| Area | CRM |
| Routes | crm.commerce-types.index · crm.commerce-types.new · crm.commerce-types.edit |
| Centre modules | crm |
| Staff levels | root · admin · manager · crmmanager · weboperator |
| Models | commerce-type |
| UI label | menu.navbar.commerce-type / crm.commerce-types |
| Coverage | 2 use cases · 1 happy · 3 failure |
Known issues (1)
Missing translations
These keys are used on this screen but do not exist in
translations.json, so users see the raw key:
crm.commercy-types
How it works
Small but structurally important: onSelectedCommerceTypesChange in both the campaign and proposal editors expands a selected label into its stores, so a label is effectively a reusable store audience. canEdit/canDelete both collapse to canRead for the allowed roles.
Use cases
Why someone opens this (2)
- Grouping stores as ‘Fashion’, ‘Food court’ or ‘Services’ for campaign targeting.
- Selecting all food-court tenants for a proposal in one click.
Path map
flowchart LR F(["Store labels store types"]):::feat F --> H1["Label created and used for targeting"]:::ok F -.-> X1["Invalid record on delete"]:::bad F -.-> X2["Deleting a label in use"]:::bad F -.-> X3["Raw translation key on screen"]:::bad classDef feat fill:#157068,stroke:#157068,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Label created and used for targeting
- User creates a label with a code and name.
- Stores are assigned the label on the store form or via import.
- In a campaign or proposal the label is selected and expands to its stores.
Failure paths
Invalid record on delete
Cause —
deletecalled without a valid model.What happens — Throws
TypeError('model' is not a valid commerce-type).
Deleting a label in use
Cause — Stores or campaigns still reference it.
What happens — API rejection surfaced through the generic form error path.
Raw translation key on screen
Cause — The code references
crm.commercy-typesbut the key does not exist in translations.json.What happens — ember-intl renders the missing key (or its missing-message placeholder) instead of text — visible to every user of this screen until the key is added.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Label created and used for targeting
- ⛔ Invalid record on delete
- ⛔ Deleting a label in use
- ⛔ Raw translation key on screen
Implementation
app/controllers/crm/commerce-types/index.jsapp/routes/crm/commerce-types/*.jsapp/models/commerce-type.jsapp/abilities/commerce-type.js
Translation keys (5)
Key English menu.navbar.commerce-typeShop label crm.commerce-typesShop labels crm.commerce-types.newAdd new shop label crm.tags.codeCode crm.tags.nameName
Related
- Same area — Customer list & filtering · Customer create & edit · Customer deletion with unsubscribe notice · Customer CSV export with column picker · Customer CSV import · Children CSV import · AI natural-language customer filter · Save current filters as a segment · Segment list, refresh & export · Segment builder with automatic tag actions · Segment categories · User tags (user types) · Customer receipts tab & ticket-stamp generation · Customer loyalty — raffle tickets · Customer loyalty — cards & stamps · Customer loyalty — rewards · Customer loyalty — coupon exchanges · Customer children (dependants) · Receipt verification queue · Store list, filters & exports · Store create & edit · Store CSV import · Customer action log (dormant)
Generated from doc/feature-inventory.json · id crm-commerce-types · commit 276788ca6