# Apparel21 Export Templates

## File Templates for DotApparel Customers

* [Customers CSV](https://docs.google.com/spreadsheets/d/e/2PACX-1vR2AICCePoyb3fl7hHlNTsqoXTjtZtywlsxxxHj6Nt9qy6OFxAJc9fZUlqzgALsqp2utXNMddAHYdZ9/pubhtml?gid=1208722952\&single=true)
* [Orders CSV](https://docs.google.com/spreadsheets/d/e/2PACX-1vR2AICCePoyb3fl7hHlNTsqoXTjtZtywlsxxxHj6Nt9qy6OFxAJc9fZUlqzgALsqp2utXNMddAHYdZ9/pubhtml?gid=1181740664\&single=true)
* [Rewards CSV](https://docs.google.com/spreadsheets/d/e/2PACX-1vR2AICCePoyb3fl7hHlNTsqoXTjtZtywlsxxxHj6Nt9qy6OFxAJc9fZUlqzgALsqp2utXNMddAHYdZ9/pubhtml?gid=770697753\&single=true)
* Gift Cards CSV

## File Templates for DotApparel Loyalty

For merchants that have DotApparel Customers already, then the same Orders CSV can be used.

* [Orders CSV](https://docs.google.com/spreadsheets/d/e/2PACX-1vR2AICCePoyb3fl7hHlNTsqoXTjtZtywlsxxxHj6Nt9qy6OFxAJc9fZUlqzgALsqp2utXNMddAHYdZ9/pubhtml?gid=1181740664\&single=true)
* Refunds CSV

{% hint style="info" %}
Please note, a specific [file naming convention](/customers/data-export-approaches.md#file-naming-convention) for the CSV files must be followed before they can succesfully be uploaded to the SFTP server.
{% endhint %}

## Distinguishing Loyalty and Rewards

Despite the name, there's a clear distinction between Loyalty and Rewards in Apparel21.

* **Loyalty:** Encompasses staff discounts and VIP levels.
* **Rewards:** Refers to the Apparel21 rewards program module, covering tiers, spending, gifts, points, etc.

During the project kick-off, notify us of the status of your rewards program. If enabled, specify the precise rewards data you wish to incorporate into your `rewards.csv`  This file is tailored to meet your specific requirements, aligning seamlessly with the type of emails you intend to send.

## Field Definitions

#### Customers Export Fields

| Apparel21 Field     | Klaviyo Field Name  | Purpose of Field                                              |
| ------------------- | ------------------- | ------------------------------------------------------------- |
| PERIDX              | AP21 Person ID      | Internal AP21 Person IDX                                      |
| PERSON\_CODE        | Person Code         | Person code                                                   |
| FIRSTNAME           | First Name          | First name                                                    |
| SURNAME             | Last Name           | Last name                                                     |
| ADRS1               | Location Address 1  | Address line 1                                                |
| ADRS2               | Location Address 2  | Address line 2                                                |
| CITY                | Location City       | City                                                          |
| STATE               | Location State      | State                                                         |
| POSTCODE            | Location Post Code  | Post code                                                     |
| COUNTRY             | Location Country    | Country                                                       |
| MOBILE              | Mobile Number       | First mobile number                                           |
| EMAIL               | Email               | Person's primary Email                                        |
| DOB                 | Date Of Birth       | Date of Birth (YYYY-MM-DD)                                    |
| PRIVACY             | Privacy             | Privacy status (Yes is unsubscribed, No is subscribed)        |
| RETAIL\_REP         | Retail Rep          | Retail Representative (Yes if ticked, No if not ticked/blank) |
| LAST\_UPDATED       | Last Updated        | Last updated date (YYYY-MM-DD"T"HH24:MI:SS)                   |
| CREATED\_DATE       | Created Date        | Creation date (YYYY-MM-DD"T"HH24:MI:SS)                       |
| JOINED\_STORE\_ID   | Joined Store ID     | Internal Store ID where the person was created                |
| JOINED\_STORE\_CODE | Joined Store Code   | Store Code where the person was created                       |
| STORE\_ID           | Latest Store ID     | Last purchase store ID                                        |
| STORE\_CODE         | Latest Store Code   | Last purchase store code                                      |
| STORE\_NUMBER       | Latest Store Number | Last purchase store number                                    |
| REF1\_GROUP         | Ref1 Group          | For Reference (as required)                                   |
| REF1\_ID            | Ref1 ID             | For Reference (as required)                                   |
| REF1\_CODE          | Ref1 Code           | For Reference (as required)                                   |
| LOYALTY\_CODE       | Loyalty Code        | Most recent loyalty code if active, empty otherwise           |
| LOYALTY\_NAME       | Loyalty Name        | Loyalty Name/Description                                      |

#### Orders Export Fields

| Apparel21 Field     | Klaviyo Field Name       | Purpose of Field                                                                                                  |
| ------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| PERSON\_IDX         | AP21 Person ID           | Person IDX                                                                                                        |
| TRANSACTION\_ID     | Transaction ID           | Transaction IDX                                                                                                   |
| TRANSACTION\_NUMBER | Transaction Number       | Online order number                                                                                               |
| SALE\_DATE          | Sale Date                | Sale date (YYYY-MM-DD"T"HH24:MI:SS)                                                                               |
| STORE\_CODE         | Store Code               | Store code                                                                                                        |
| STORE\_NAME         | Store Name               | Store Name                                                                                                        |
| LINE\_ID            | Line ID                  | Index of the product                                                                                              |
| SKUIDX              | SKU IDX                  | SKU ID                                                                                                            |
| STYLE\_CODE         | Style Code               | Product code                                                                                                      |
| STYLE\_NAME         | Style Name               | Product description                                                                                               |
| COLOUR\_CODE        | Colour Code              | Colour code                                                                                                       |
| COLOUR\_NAME        | Colour Name              | Colour description                                                                                                |
| SIZE\_CODE          | Size Code                | Size code                                                                                                         |
| CATEGORIES          | Categories               | Existing product reference (array of categories)                                                                  |
| BARCODE             | Barcode                  | EAN number                                                                                                        |
| QUANTITY            | Quantity                 | Quantity                                                                                                          |
| PRICE               | Price                    | Recommended Retail Price (RRP price)                                                                              |
| VALUE               | Value                    | Total value of the order                                                                                          |
| DISCOUNT\_REASON    | Discount Reason          | Discount reasons for retail orders in AP21 ("None" or empty for online)                                           |
| DISCOUNT\_AMOUNT    | Discount Amount          | Discount amount for retail orders (0 for online)                                                                  |
| MARKDOWN            | Indicator for sale items | <p>Logic is based on difference between original RRP and current RRP<br>"Y" = Markdown</p><p>"N" = Full Price</p> |

## Additional Data

If you would like additional data beyond the standard CSV file templates, please inform us so that we can configure the necessary mapping in the solution during setup.

{% hint style="info" %}
Please note that the rewards data is not part of the standard templates and will require extra customisations when exporting from Apparel21.
{% endhint %}

#### Rewards Export Fields

The following will update the Klaviyo customer properties

| Apparel21 Field   | Klaviyo Field Name | Purpose of Field                                      |
| ----------------- | ------------------ | ----------------------------------------------------- |
| PERIDX            | AP21 Person ID     | Internal AP21 ID                                      |
| EMAIL             | Email              | Customer Email                                        |
| PERSON\_CODE      | Person Code        | Customer Code                                         |
| EVENT             | Event              | Description of the activity                           |
| REASON            | Reason             | Reason for the reward activity                        |
| EVENT\_DATE       | Event Date         | Date of activity                                      |
| PROGRAM\_NAME     | Program Name       | Reward program the customer is enrolled in            |
| TIER\_NAME        | Tier Name          | Current tier/level                                    |
| TIER\_DESCRIPTION | Tier Description   | Description of the current tier                       |
| EXPIRY\_DATE      | Expiry Date        | Expiry date for the current tier                      |
| POINTS\_TOTAL     | Points Total       | Total points earned by the customer                   |
| POINTS\_REDEEMED  | Points Redeemed    | Total points redeemed by the customer in transactions |
| POINTS\_REMAINING | Points Remaining   | Total current points available for the customer       |

The following will be added as a Klaviyo event

| AP21 Field        | Klaviyo Field    | Purpose of Field                              |
| ----------------- | ---------------- | --------------------------------------------- |
| REWARD\_TOTAL     | Reward Total     | Event points earned in the reward activity    |
| REWARD\_REDEEMED  | Reward Redeemed  | Event points redeemed in the same transaction |
| REWARD\_REMAINING | Reward Remaining | Event points left available for the customer  |
| GIFT\_REDEEMED    | Gift Redeemed    | Event gift redeemed by the customer           |

## Here's How The Data Will Appear in Klaviyo

<figure><img src="/files/gg1uqoOetDxjCUbLb43n" alt=""><figcaption></figcaption></figure>

Customer Properties will populate in the respective field in the "Details" section

Orders and Rewards Events will appear in the "Activity Log" section.


---

# Agent Instructions: 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:

```
GET https://docs.dotapparel.com.au/customers/apparel21-export-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
