> 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/integrations-and-data-exchange/custom-fields/setup-for-members.md).

# Setup for Members

Once a group and its fields are active (see [Setting Up Custom Fields](broken://pages/fab9589035d3fde779766df6d224e52d26b136fa)), they become available on every member profile.

### Entering values

* The **Add member / Edit member** form shows a **Custom Fields** section listing every active field defined for members, grouped exactly as configured in the schema. Required fields are marked with an asterisk and block saving when empty.
* Subgroup rows (e.g. **Owned Vehicles**) are added and removed independently of the rest of the profile.

***

### Viewing and editing values on the Single Member View

The **Single Member View** shows one section per active group, using the group's name and description from the schema.

* Fields with no value are shown as **None**.
* Each field has its own **⋮** menu with **Edit** and **Clear field**, so you can update a single value without opening the full edit form.

Subgroups render as their own table underneath the group, e.g. **Owned Vehicles** with columns for Plate No, VIN, and Make:

* **Add** opens a modal to create a new row with all subgroup fields.
* **Manage columns** controls which subgroup fields are shown in the table (all subgroup fields are still stored, whether or not they're displayed).

{% hint style="info" %}
Deleting a member removes all of their Custom Field values along with the profile. Deactivating a field or group, by contrast, only hides it — the stored values are preserved and reappear if it's reactivated.
{% endhint %}

***

### Getting values via the API

Custom fields are **opt-in on read** — they're not part of the default member API response.

```http
GET /api/{storeCode}/member/{memberId}
GET /api/{storeCode}/member/{memberId}?customFields=driving_insights
```

The first call returns every group; passing a group's system code returns just that group. The response nests groups on the first level and field system codes on the second:

{% code title="Response" %}

```json
{
  "customerId": "3f1c…-uuid",
  "customFields": {
    "driving_insights": {
      "score": 85,
      "risk": "low"
    }
  }
}
```

{% endcode %}

To create, replace, or partially update values, use the member `customFields` payload:

* `POST` / `PUT` — `customFields` is part of the member payload; `PUT` **replaces** the full set of values (omitted groups/fields are cleared).
* `PATCH` — only the fields sent are written; omitted groups/fields are left untouched, and a field explicitly sent as `null` is cleared.

{% hint style="info" %}
Subgroups are always replaced as a whole — sending a subgroup replaces all of its rows, there's no partial row update.
{% endhint %}

For the full request/response reference, including validation error shapes, see the API Reference section of this guide.

***

### Import, export, and audit log

* **Member import** — Custom Fields are part of the standard member import file.
* **Dedicated JSON import** — behaves exactly like the `PATCH` endpoint above (same validation, same merge semantics), and can match members by ID, e-mail, phone number, or loyalty card number.
* **Exports** — member exports and the analytical S3 exports include Custom Field values.
* **Audit log** — every change made via the member `POST`/`PUT`/`PATCH` endpoints, or the dedicated Custom Fields `PATCH`, is recorded, showing the state **after** the change. Adding, updating, and clearing values are all logged.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.openloyalty.io/integrations-and-data-exchange/custom-fields/setup-for-members.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
