Customers
The customer base is the master of people and their identity. Three layers, and the loyalty program depends on all three:
- Identity β which identifier represents this person in POS, e-commerce, app and physical card.
- Profile β the fields campaigns, audiences and consent rules read.
- Relationships β merges, households, associations and cards, for when one person ends up with more than one record.
Identity is not a detail of this entity, it is the entity. Discounts, points, vouchers, rewards, games, challenges and audiences all resolve against the customer identifier used at runtime, so a customer loaded under the wrong ID is a customer no campaign can reach β and one whose benefits land somewhere the shopper cannot see.
Channel and schedule for this entity: a daily delta is the usual starting point, either as a Customers file or through the API, and the customer base is part of the initial load. See Data β Two channels for the same data.
Non-purchase behaviour is the other half of this section β see Custom Events. Purchases are not here: they live on the company side as Carts.
Identity is the decision that costs the most to get wrongβ
The target state is one stable Customer ID per person, used by every channel, with Loyal Guru told whenever two identities are consolidated. Where the retailer cannot guarantee that, the integration has to choose explicitly how duplicates, cards and relationships are handled β before the initial load, not after.
| Pattern | When it applies | What the integration has to build |
|---|---|---|
| Unified Customer ID | The retailer has a single customer master or centralised SSO, and POS, e-commerce, app and card systems can all send the same ID. | Create or update once, then reference the same ID on every loyalty action. No merge logic, no card resolution, no split benefits. |
| Separate online/offline | A person can be enrolled independently per channel, with different IDs β an e-commerce account and a POS loyalty card. | Decide who detects duplicates and who triggers the merge, then implement it. Until the merge runs, points, vouchers and challenge progress are split across both records. |
| Household (pooled benefits) | Family members or several cards should share one balance. | Merge the card accounts into a main household customer. |
| Soft association | Accounts must be linked for visibility, but each keeps its own balance. | Create an association. Never a merge. |
| Card renewal | A physical card is lost or replaced and the history must survive. | Add the new card to the existing customer, or merge after verifying identity. |
Who owns deduplication is the part that gets decided late and hurts:
| Owner | How it works | Trade-off |
|---|---|---|
| Middleware or IAM | Touchpoints create customers freely. A middleware detects that two records are the same person, validates the match, then calls POST /customers/transfer. | POS and e-commerce stay simple, but duplicate loyalty accounts exist until the middleware runs, and benefits are split during that window. |
| The touchpoint | The channel resolves the person before creating. On a unique-field conflict it verifies ownership and merges immediately. | The split window nearly disappears, but every touchpoint has to implement the same lookup, verification and merge logic. |
Resolve the person before creating β a blind create is the main source of duplicates. The read side (POST /customers/search, and GET /customers/{value} for runtime lookup) is identification rather than data loading: schemas are in the API Reference, and identification at the point of sale belongs to Checkout integration.
Enrollment and profile maintenanceβ
| Concept | Integration responsibility |
|---|---|
| Stable external ID | Send the retailer's own identifier when there is one. This is what a cart will carry at checkout months later β see One ID strategy. |
| Consent and contact fields | Include everything the Company configuration requires, or campaigns and audiences will exclude the customer for reasons that look like a bug. |
| Profile changes | Always PATCH the existing ID. A delete-and-recreate keeps the person and loses their points, vouchers, challenges and history. |
| Unique-field conflicts | Never create a second customer. Search, verify ownership, then update or merge. |
| Referrals | Send referred_by when a referral program is in scope. |
| Deletion and anonymisation | DELETE /customers/{value} serves privacy processes. Confirm with the Loyal Guru team whether the Company uses soft anonymisation or hard delete, and coordinate before any bulk run β deletion affects reporting and open vouchers. The same soft anonymization path is used when Inactivity Lifecycle automatically moves dormant Customers to deleted; downstream systems that subscribe to customer / delete should treat automated and manual anonymization the same way. |
| Reactivation | To reactivate a Customer set to inactive by Inactivity Lifecycle (or by a manual block), send status: "active". A new cart alone does not reactivate the Customer. |
API path: POST /customers (enroll), PATCH /customers/{value} (update), DELETE /customers/{value} (delete or anonymise).
Custom fields β Attributesβ
Legacy integrations may still write or read custom1βcustom11 (text) and custom1fβcustom8f (numeric) on POST /customers, PATCH /customers/{value} and GET /customers/{value}. These fields are deprecated β use the attributes object instead.
| Legacy custom fields | Current model | |
|---|---|---|
| Field | custom1β¦custom11, custom1fβ¦custom8f | attributes (freeform key-value object) |
| Shape | Fixed, numbered slots | Named keys, JSON Schema-validated |
| Configuration | None (implicit) | Owner: Configuration β Company β Custom Attributes |
| Constraints | 11 text + 8 numeric slots | Single-level only, max 50 attributes, 10 KB total; unknown properties are silently discarded |
attributes is returned in GET /customers/{value} and accepted in POST /customers / PATCH /customers/{value}.
In Owner, up to three Customers attributes can be marked Searchable for the Customers list (exact match; arrays match if any element equals the filter value), and at most one of those can be shown as a list column. That replaces relying on legacy custom1 for list search. See Custom Attributes β Searchable attributes and list column.
Not the same as Calculated Attributes. GET /customers/{id}/attributes is a separate, unchanged entity β auto-derived KPIs computed by Loyal Guru from ingested data (purchase frequency, spend, and so on), configured under Data Management. Migrating custom fields to attributes does not affect calculated attributes.
Merges and householdsβ
Merge when two records are the same person, or when a household must pool benefits. A merge consolidates points, vouchers, challenges and history onto one surviving account, and for day-to-day operations it is effectively irreversible β verify identity first.
| Goal | Use |
|---|---|
| One person, two enrollments (online and offline) | Merge after verification |
| Family or several cards share points and vouchers | Merge the card accounts into the main household customer |
| Link accounts but keep separate balances | Soft association β see Associations and cards |
| Identity not verified yet | Soft association, or wait. Do not merge. |
| Endpoint | When to use |
|---|---|
POST /customers/transfer | Both accounts exist and the destination ID must survive β for example the e-commerce Customer ID. |
POST /customers/transfer-new | Neither existing ID should remain, or onboarding defines a new master ID. |
POST /customers/{associate_id}/unmerge | Undo a previous merge or association. Confirm the behaviour for your Company before relying on it in a production runbook. |
For households: the main account stays active and the card accounts are merged into it. Transactions from any card feed the main balance, while individual card history remains available for reporting and segmentation. Once a card is merged into a household it must not accrue points independently β if it should, the model needed was an association, not a merge.
Fraud risk
Do not merge on a matching email or phone alone. If an attacker registers with another customer's unverified email and the touchpoint merges automatically, points, vouchers and rewards can be taken over. Require OTP or an equivalent ownership check, and create a soft association instead when identity cannot be trusted.
Associations and cardsβ
An association links customers for visibility, relationship tracking, segmentation or support, without pooling points, vouchers or redemptions. Typical cases: family members with separate balances but shared visibility; a physical card account and an unconfirmed digital account before identity is verified; employee and customer accounts linked for traceability.
POST /customers/{id}/cards attaches a loyalty card identifier to an existing customer β a new physical card for a known shopper, or digitising a card onto an existing profile. Resolve the target customer first so the card is not created under a duplicate.
For a replacement card: if the new card is already registered as a separate customer, verify identity and merge; if it does not exist yet, add it to the existing customer. Creating a new customer for a replacement card is what loses the history.
Identity verification is not Loyal Guru's job
Loyal Guru does not prove that the person requesting a card replacement or an account consolidation owns the original account. The store process or the retailer's IAM must verify identity before calling transfer, unmerge or card endpoints.
Before you change an identityβ
A merge, a transfer or a card replacement moves loyalty state. Validate the impact on each of these before running one, and before running any of them in bulk:
- Points and wallet balance.
- Active and selected vouchers.
- Reward transactions.
- Challenge progress and game history.
- Audiences and calculated attributes.
- Cart history and discount reports.
- Consent and communication preferences.
Core endpointsβ
Implementation map only. Schemas, auth, errors and rate limits: API Reference.
| Action | Endpoint |
|---|---|
| Create / enroll | POST /customers |
| Update profile | PATCH /customers/{value} |
| Delete / anonymise | DELETE /customers/{value} |
| Find an existing customer before creating (deduplication) | POST /customers/search |
| Merge into an existing customer | POST /customers/transfer |
| Merge into a new customer | POST /customers/transfer-new |
| Unmerge | POST /customers/{associate_id}/unmerge |
| Create / update / delete association | POST / PATCH / DELETE /associations |
| List associated customers | GET /customers/{id}/associates |
| Add loyalty card | POST /customers/{id}/cards |
Markdown endpoint catalog: Customers Β· HTTP API Β· API Keys
WL App flows
Digitising a physical card through the app, using the Loyal Guru app as IAM, or syncing app-created customers back to a retailer IAM by webhook are white-label app implementation topics, not generic data-loading scenarios. See WL App SDK.
Checklistβ
- The customer identifier loaded here is the one POS and e-commerce will send on carts β same format, same case.
- Email is unique across the customer file, as the pre-send checks require.
- Deduplication has a named owner β middleware or touchpoint β and it is implemented, not assumed.
- Ownership verification runs before any merge or card replacement.
- Profile changes go through
PATCH, never delete-and-recreate. - Consent fields required by the Company are populated on create and kept current.
- New integrations write
attributes, notcustom1βcustom11.
Troubleshootingβ
| Symptom | What to check |
|---|---|
| Customer cannot use a voucher | The channel may be sending a different identifier than the one that owns the voucher. Compare the identifier on the cart with the one on the voucher. |
| Duplicate customers receive separate benefits | Lookup keys and deduplication rules before enrollment; whether the merge step is actually running. |
| Challenge progress or points disappeared after a profile change | Whether the customer was merged, transferred or recreated instead of updated. |
| Points consolidated into the wrong account | Source and destination IDs reversed on transfer; a merge executed without ownership verification. |
| Household members expected separate balances | A strong merge pools benefits β the model needed was a soft association. |
| Associated accounts do not share points | Expected. Associations are visibility-only; pooling needs a household merge. |
| Card renewal lost the loyalty history | A new customer was created instead of adding the card or merging. |
| Unmerge did not restore the previous state | Confirm Company support and which side effects are reversible. |
| Works in the app, fails at POS | Online and offline enrollments may have created two records with different IDs. |
Whole-section symptoms β how the base arrives, and which channel owns which entity β are in Customer Data.