Skip to content

πŸ‘€ 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 ​

DataPlaceNotes
Login (username/email + password)πŸ”‘ Core-commerceUsed to sign in, reset password, etc.
Sign-in & refresh tokensπŸ”‘ Core-commerceSession handling
Account activation & confirmationπŸ”‘ Core-commercee.g. confirming a new registration
Customer numberπŸ”‘ Core-commerceStored as an account attribute, linking the account to its Centric customer record
EnvironmentπŸ”‘ Core-commerceStored as an account attribute (which environment the account was created in)
E-mail addressπŸ”‘ Core-commerce, 🏬 CentricUsed 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🏬 CentricFor business customers
Preferred language🏬 Centric
Newsletter subscription🏬 Centric
Invoice address🏬 Centric
Delivery addresses🏬 CentricOne or more, managed separately from the invoice address
Home store🏬 CentricThe store the customer is associated with
Shopping listsπŸ’Ύ SPAR platform databaseSaved product lists per customer, keyed by customer number
Saved recipesπŸ’Ύ SPAR platform databaseRecipes 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.