Appearance
π€ Accounts β
A customer's account information is not stored in one single place. It is split across three systems: Core-commerce, Centric and the SPAR platform database. This page explains what lives where.
The three systems are linked through the customer number: Core-commerce stores it as an attribute on the account, and it is used as the key for both Centric lookups and SPAR's own database records.
π Where account data lives β
| Data | Place | Notes |
|---|---|---|
| Login (username/email + password) | π Core-commerce | Used to sign in, reset password, etc. |
| Sign-in & refresh tokens | π Core-commerce | Session handling |
| Account activation & confirmation | π Core-commerce | e.g. confirming a new registration |
| Customer number | π Core-commerce | Stored as an account attribute, linking the account to its Centric customer record |
| Environment | π Core-commerce | Stored as an account attribute (which environment the account was created in) |
| E-mail address | π Core-commerce, π¬ Centric | Used for login in Core-commerce and stored as part of the profile in Centric. Updating it changes Core-commerce first, then Centric β if the Centric update fails, the Core-commerce change is rolled back so the two stay in sync |
| Name (first, middle, last) | π¬ Centric | |
| Gender | π¬ Centric | |
| Date of birth | π¬ Centric | |
| Phone number | π¬ Centric | |
| Company name | π¬ Centric | For business customers |
| Preferred language | π¬ Centric | |
| Newsletter subscription | π¬ Centric | |
| Invoice address | π¬ Centric | |
| Delivery addresses | π¬ Centric | One or more, managed separately from the invoice address |
| Home store | π¬ Centric | The store the customer is associated with |
| Shopping lists | πΎ SPAR platform database | Saved product lists per customer, keyed by customer number |
| Saved recipes | πΎ SPAR platform database | Recipes a customer bookmarked, keyed by customer number |
Core-commerce also has its own concept of account addresses and a profile (name, phone, gender, date of birth), but SPAR does not use these for the customer-facing profile β that comes from Centric instead.
π¬ Which preferred store is used β
The "preferred store" (a.k.a. home store) decides which store's assortment, prices and stock the customer sees. Which store is used depends on whether the customer is logged in:
- Not logged in β the store is read from a cookie set on the browser.
- Logged in β the store from the account (Centric) is used, ignoring the cookie.
- Logging in, account has no store yet, but a cookie is set β the cookie's store is saved to the account, so it becomes the account's home store going forward.