CRM · Store create & edit

Multi-step store editor covering general data, physical-store attributes, the store QR code and centre-defined extra attributes, including social links, opening data, categories, zone, gift-card administrators and integration codes.

AreaCRM
Routescrm.commerces.new · crm.commerces.edit
Centre modulescrm · fideliza · intranet-sovos · intranet-yardi
Staff levelsroot · admin · manager · scmanager · weboperator
Modelscampaign · commerce · commerce-extra · commerce-type · extra · language · zone
UI labelcrm.commerce.general-data
Coverage4 use cases · 2 happy · 8 failure

Known issues (1)

How it works

Steps and tabs are computed, and several are module-conditional: hasYardi adds the tenant-code field (with a centre-specific label via yardiCodeLabel), hasFideliza brings in gift-card administrators, and canSeeIntelISales exposes IntelliSales. Extra attributes are handled separately from the model: requiredExtras is assembled per label and isValidCommerceExtra sets a bespoke extraError of the form `${label} is required` — note this message is built in code, not translated. saveCommerce validates the commerce, then saves extras, and special-cases HTTP 422 from the adapter. A loyalty-QR flow (downloadQr, searchCampaign, loadSelectedCampaign) ties a store QR to a campaign. Category selection supports select-all.

Use cases

Why someone opens this (4)

  • Onboarding a new tenant: address, categories, contact, social links and images.
  • Setting the Yardi tenant code so the store’s sales can be exported.
  • Nominating gift-card administrators for a Fideliza-enabled centre.
  • Printing a store’s loyalty QR code tied to a specific campaign.

Path map

flowchart LR
    F(["Store create and edit"]):::feat
    F --> H1["Store created with extras"]:::ok
    F --> H2["Loyalty QR downloaded"]:::ok
    F -.-> X1["Mandatory store fields missing"]:::bad
    F -.-> X2["Yardi code missing"]:::bad
    F -.-> X3["Malformed URL"]:::bad
    F -.-> X4["WhatsApp number without country code"]:::bad
    F -.-> X5["Invalid gift-card administrator emails"]:::bad
    F -.-> X6["Required extra attribute empty"]:::bad
    F -.-> X7["Unprocessable entity from the API"]:::bad
    F -.-> X8["Extras image/HTML with embedded images"]:::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

Store created with extras

  1. User fills general data: name, categories, zone, address, locality, province, image.
  2. Yardi centres also require the tenant code.
  3. Extra attributes required by the centre are completed.
  4. saveCommerce validates the model, saves it, then persists the commerce-extras.
  5. The store appears in the directory and in the app.

Loyalty QR downloaded

  1. User searches and selects a campaign for the store QR.
  2. downloadQr renders and downloads the QR image with the store name as alt text.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Store created with extras
  • ✅ Loyalty QR downloaded
  • ⛔ Mandatory store fields missing
  • ⛔ Yardi code missing
  • ⛔ Malformed URL
  • ⛔ WhatsApp number without country code
  • ⛔ Invalid gift-card administrator emails
  • ⛔ Required extra attribute empty
  • ⛔ Unprocessable entity from the API
  • ⛔ Extras image/HTML with embedded images

Implementation


Generated from doc/feature-inventory.json · id crm-commerce-form · commit 276788ca6