> 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/imports-exports/imports/sample-import-files/member-custom-attributes.md).

# Member Custom Attributes

Use this import to add or update custom attributes on members in bulk. Custom attributes are key and value pairs stored against a member, useful for data that does not fit the standard member fields — a CRM reference, a store of origin, or a partner tier, for example.

**File format:** CSV, up to 100 MB.

### File structure

The first column is always `memberId` and holds the member identifier. The column after it is the custom attribute: the column header is the attribute key, and the cell beneath it is the value.

| memberId                             | crm\_reference |
| ------------------------------------ | -------------- |
| e82c96cf-32a3-43bd-9034-4df343e5fd93 | CRM-88213      |

Values are upserted. If the attribute does not exist on the member it is created, and if it already exists its value is replaced.

> The first column header is always `memberId`, whichever identification method you choose. It does not change to match the identifier type.

Use `lower_snake_case` for attribute keys, in line with custom attributes elsewhere in Open Loyalty.

### Choosing an identification method

Before uploading you select an identification method, which tells Open Loyalty how to match the values in the `memberId` column to existing members. The available options are:

* **Email**
* **Loyalty card number**
* **Phone**
* **Member ID** — the member's UUID in Open Loyalty

The method you select must match the type of identifier in your file. The field is required and the import cannot be started without it.

### Sample files

#### Using Member ID

```csv
memberId,crm_reference
e82c96cf-32a3-43bd-9034-4df343e5fd93,CRM-88213
a1b2c3d4-e5f6-7890-abcd-ef1234567890,CRM-88214
```

#### Using email

```csv
memberId,crm_reference
john.doe@example.com,CRM-88213
jane.smith@example.com,CRM-88214
```

#### Using phone

```csv
memberId,crm_reference
+1234567890,CRM-88213
+0987654321,CRM-88214
```

#### Using loyalty card number

```csv
memberId,crm_reference
CARD-00001,CRM-88213
CARD-00002,CRM-88214
```

### Running the import from the Admin Panel

1. Go to **Imports / Exports → Imports**.
2. Click **Import** and choose the member custom attributes option.
3. Select the **Identification factor** matching your file.
4. Upload your CSV and click **Import**.

The import appears in the list on the same screen. Open it to see one row per record, showing the member ID, the attributes applied, and a record status.

If a row fails, its status reads **Failed to import**. Use the overflow menu on that row to open the error details.

### Running the import via the API

```
POST /api/{storeCode}/import/memberCustomAttributes
```

Send as `multipart/form-data` with two fields:

| Field                                          | Description                                          |
| ---------------------------------------------- | ---------------------------------------------------- |
| `import[file]`                                 | The CSV file                                         |
| `import[additionalData][identificationMethod]` | One of `uuid`, `email`, `phone`, `loyaltyCardNumber` |

`uuid` corresponds to **Member ID** in the Admin Panel.

###


---

# 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/imports-exports/imports/sample-import-files/member-custom-attributes.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.
