> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/implementation-guide/module-checklists/members-and-profile.md).

# Members & Profile

Registering members from your channels, keeping their profiles in sync, and removing them when they leave — with the API calls, webhooks and checks for each step.

Every other module depends on members existing in Open Loyalty with the right identifier. This page covers how members get there from your channels, how their profiles stay in sync, and what happens when they leave.

Before you start, decide how members are identified — see [Member identity](https://help.openloyalty.io/implementation-guide/plan-and-foundations/member-identity.md). For the Admin Panel side, see [Adding members](https://help.openloyalty.io/members-and-activity/members/member-list/adding-members) and [Removing members](https://help.openloyalty.io/members-and-activity/members/member-list/removing-members).

## Who does what

| Area                                    | Responsibility                                                                                                             |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Admin Panel**                         | Member configuration (identifiers, required fields), custom fields, wallets, the welcome campaign                          |
| **Integration layer**                   | Creates, updates and removes members when the channel's customer account changes; stores the `customerId`; handles retries |
| **Channels** (website, app, e-commerce) | Tell the integration layer about registrations, profile changes and account closures; show loyalty data to the member      |
| **CRM / marketing automation**          | Receives loyalty membership and profile changes through webhooks                                                           |

## Design decisions

| Decision                         | Options                                                  | Recommendation                                                                                                       |
| -------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| When a customer becomes a member | Automatically at account creation, or by explicit opt-in | Automatic enrolment keeps the integration simple. With opt-in, create the member only when they opt in.              |
| Which system owns the profile    | The channel's customer system, or Open Loyalty           | The customer system owns personal data; Open Loyalty keeps a copy for rules and messages. Send changes one way only. |
| What "leaving" means             | Delete, anonymise or deactivate                          | See the removal options below. Agree it with your privacy team before go-live.                                       |
| Personal data to send            | Everything, or only what rules and messages need         | Send only fields that campaigns, segments or messages use.                                                           |

## Recommended flow

{% stepper %}
{% step %}

### Configure (Admin Panel)

Set the member identifiers in [member configuration](https://help.openloyalty.io/members-and-activity/members/configuration) — usually the loyalty card number as required, unique and used for event matching. Create the [custom fields](https://help.openloyalty.io/integrations-and-data-exchange/custom-fields) and wallets the programme needs, and a welcome campaign on the [**Member Was Activated**](https://help.openloyalty.io/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/internal-event) internal event.
{% endstep %}

{% step %}

### Register

When a customer account is created, the integration layer sends `POST /api/{storeCode}/member` with the customer ID as `loyaltyCardNumber`. The member is active straight away, which triggers the welcome campaign. Store the returned `customerId` with the customer.
{% endstep %}

{% step %}

### Keep the profile in sync

On every profile change, read the member, merge the change and write the full profile back (GET → merge → PUT). For labels or custom fields only, use PATCH. Mark the source of each change so webhook echoes can be ignored.
{% endstep %}

{% step %}

### Tell other systems

Subscribe to `CustomerRegistered`, `CustomerUpdated` and `CustomerDeactivated` [webhooks](https://help.openloyalty.io/integrations-and-data-exchange/webhooks/configuration) to update CRM or marketing automation.
{% endstep %}

{% step %}

### Remove

When the member leaves, delete, anonymise or deactivate them — see below.
{% endstep %}
{% endstepper %}

## Sequence diagrams

<figure><img src="https://226878483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ4Fuoa1PTF0DrNTgjzJu%2Fuploads%2Fgit-blob-66e48822aa0a682ce7cc27f77c88d42b643a1fcb%2Fig-members-registration.png?alt=media" alt="The channel tells the integration layer a customer account was created. The integration layer creates the member in Open Loyalty with the customer ID as loyalty card number. Open Loyalty activates the member, opens wallets and runs the welcome campaign, then returns the customerId. Open Loyalty sends a CustomerRegistered webhook, and the integration layer marks the contact as a loyalty member in CRM." width="628"><figcaption><p>Registration</p></figcaption></figure>

<figure><img src="https://226878483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ4Fuoa1PTF0DrNTgjzJu%2Fuploads%2Fgit-blob-3ae174f21aa694f4d5579e73f89ace3f8d8978b6%2Fig-members-update.png?alt=media" alt="The channel reports a profile change. The integration layer reads the member, merges the change and sets the source, then writes the full profile with PUT. Open Loyalty sends a CustomerUpdated webhook, which the integration layer ignores when the change came from the same channel. For labels or custom fields only, PATCH is used instead." width="461"><figcaption><p>Profile update</p></figcaption></figure>

<figure><img src="https://226878483-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ4Fuoa1PTF0DrNTgjzJu%2Fuploads%2Fgit-blob-c17a25b77096316ab1d2361f1b87f51643431e8e%2Fig-members-removal.png?alt=media" alt="Three alternatives. When a member leaves, the integration layer deletes the member, removing profile, wallets, balances, badges and progress. For an erasure request it anonymises the member, removing personal data but keeping transactions. To pause the account it deactivates the member. Re-joining after removal creates a new, empty profile." width="542"><figcaption><p>Removal: delete, anonymise or deactivate</p></figcaption></figure>

## Removal options

|                          | Deactivate                                                                                                   | Anonymise                                                         | Delete                                      |
| ------------------------ | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------- |
| Use when                 | The account is suspended and may come back                                                                   | A member asks to be forgotten, but you need history for reporting | The member leaves and nothing should remain |
| Personal data            | Kept                                                                                                         | Removed permanently                                               | Removed permanently                         |
| Transactions and history | Kept                                                                                                         | Kept, without personal data                                       | Removed                                     |
| Earning                  | Transactions and custom events no longer match the member; purchase, tier and time-based campaigns don't run | —                                                                 | —                                           |
| Reversible               | Yes — activate again                                                                                         | No                                                                | No                                          |
| Call                     | `POST /member/{member}/deactivate`                                                                           | `POST /member/{member}/anonymize`                                 | `DELETE /member/{member}`                   |

A member who re-joins after being deleted gets a **new, empty profile** — points, badges and progress start from zero. Tell members this in your terms if it applies. See [Removing members](https://help.openloyalty.io/members-and-activity/members/member-list/removing-members) for what an inactive member can still do, and [GDPR](https://help.openloyalty.io/faq/gdpr) for data-protection questions.

## Go-live checklist

### Admin Panel

* [ ] Member identifiers are configured: the shared identifier is required, unique and used for event matching.
* [ ] Custom fields exist for every profile attribute the integration sends.
* [ ] The welcome campaign is active and tested with a new member.

### Integration layer

* [ ] Registration sends the customer ID as `loyaltyCardNumber` and stores the returned `customerId`.
* [ ] A `409` on registration is handled as "member already exists", not as a failure.
* [ ] Every profile update reads, merges and writes the full profile, or uses PATCH for labels and custom fields.
* [ ] Webhook echoes of the integration's own changes are ignored.
* [ ] Account closure calls the agreed removal option.
* [ ] Failed calls are logged with their payload and retried with backoff.

### Channels and CRM

* [ ] The channel shows a loyalty profile only after registration succeeds.
* [ ] CRM receives `CustomerRegistered`, `CustomerUpdated` and `CustomerDeactivated` and updates the contact.

### Validation

* [ ] Register a member: the profile, wallets and welcome reward appear.
* [ ] Change the email, phone and address in the channel: Open Loyalty shows the change and no labels are lost.
* [ ] Retry a registration: no duplicate member is created.
* [ ] Deactivate a member: a transaction for them doesn't earn.
* [ ] Delete and re-register a member: the new profile starts empty.

## Key endpoints

* `POST /api/{storeCode}/member` — [Add a member](https://help.openloyalty.io/api-reference/member/add-a-member)
* `GET /api/{storeCode}/member/{member}` — [Get member's details](https://help.openloyalty.io/api-reference/member/get-members-details)
* `PUT /api/{storeCode}/member/{member}` — [Update member's details](https://help.openloyalty.io/api-reference/member/update-members-details)
* `PATCH /api/{storeCode}/member/{member}` — [Partially update member details](https://help.openloyalty.io/api-reference/member/partially-update-member-details)
* `POST /api/{storeCode}/member/{member}/deactivate` — [Deactivate a member](https://help.openloyalty.io/api-reference/member/deactivate-a-member), and `…/activate` — [Activate a member](https://help.openloyalty.io/api-reference/member/activate-a-member)
* `POST /api/{storeCode}/member/{member}/anonymize` — [Anonymize member's data](https://help.openloyalty.io/api-reference/member/anonymize-members-data)
* `DELETE /api/{storeCode}/member/{member}` — [Delete a member](https://help.openloyalty.io/api-reference/member/delete-a-member)

**Webhooks:** [CustomerRegistered](https://apidocs.openloyalty.io/#tag/Webhook-event/operation/CustomerRegistered), [CustomerUpdated](https://apidocs.openloyalty.io/#tag/Webhook-event/operation/CustomerUpdated), [CustomerDeactivated](https://apidocs.openloyalty.io/#tag/Webhook-event/operation/CustomerDeactivated)

{% hint style="warning" %}
**Common pitfalls**

* A PUT built only from the channel's fields wipes labels and custom fields — always merge into the current profile first.
* Treating a `409` on a retried registration as an error creates duplicate support tickets; the member already exists.
* Without a source marker, a profile change can loop between the channel, Open Loyalty and CRM.
* Deleting instead of anonymising removes the history your reports depend on.
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/implementation-guide/module-checklists/members-and-profile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
