For the complete documentation index, see llms.txt. This page is also available as Markdown.

Members

How to bulk import member profiles into Open Loyalty using XML files, including a sample template and field reference.

Use the member import to add multiple member profiles at once. This is especially useful during initial data migration or when onboarding a large batch of customers.

File format: XML

Sample file

members-import-sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<customers>
  <customer>
    <email>jane.doe@example.com</email>
    <loyaltyCardNumber>CARD-001</loyaltyCardNumber>
    <phone>+1234567890</phone>
    <firstName>Jane</firstName>
    <lastName>Doe</lastName>
    <gender>female</gender>
    <birthDate>1990-05-15</birthDate>
    <registeredAt>2024-01-10 09:00:00.000000</registeredAt>
    <address>
      <address1>123 Main Street</address1>
      <city>New York</city>
      <country>US</country>
      <postal>10001</postal>
      <province>NY</province>
      <street>Main Street 123</street>
    </address>
    <agreement1>1</agreement1>
    <agreement2>0</agreement2>
    <agreement3>0</agreement3>
  </customer>
</customers>

Field reference

Field
Required
Description

email

Yes *

Member's email address (must be unique)

loyaltyCardNumber

Yes *

Loyalty card identifier

phone

Yes *

Phone number (include country code)

firstName

No

First name

lastName

No

Last name

gender

No

male, female, or not_disclosed

birthDate

No

Date of birth in YYYY-MM-DD format

registeredAt

No

Registration timestamp in YYYY-MM-DD HH:MM:SS format

address

No

Address block — if included, provide only the fields you need

country

No

Must be an ISO 3166-1 alpha-2 code (e.g., US, GB, PL). Numeric codes are not accepted.

agreement1/2/3

No

Marketing consent flags: 1 = agreed, 0 = not agreed

Important notes

Country codes must be ISO alpha-2. Use two-letter codes like US, GB, PL — not numeric codes like 840 or 616. Invalid codes will cause the import to fail without a clear error message.

Common mistakes

Mistake
Fix

Using numeric country codes (840)

Use alpha-2 codes (US)

Leaving empty <company> or <address> blocks

Remove the entire block if not needed

Wrong registeredAt format

Use YYYY-MM-DD HH:MM:SS with timezone

Windows line endings (CRLF)

Convert to Unix (LF) — see Best practices

To find out more, please refer to the article below:

Members

Last updated

Was this helpful?