# Import & Export

## Import your passes to The Wallet Crew

The Wallet Crew provides a powerful import tool that allows you to bulk import or update passes using XLSX files. This guide will walk you through the process and explain important considerations.

### Overview

The import tool supports:

* Bulk creation of new passes
* Updating existing passes
* Handling different pass types
* Managing pass identifiers and additional data
* Progress tracking and error reporting

### Before You Begin

1. **File Format**: Prepare your XLSX file with the following considerations:
   * Column names should be clean and avoid special characters
   * Data should be properly formatted according to the expected types
   * The file should contain all necessary pass information
2. **Required Columns**:
   * `id` (optional): If present, used to identify existing passes
   * `passType` (optional): The type of pass. If not specified, you'll need to select a default type
   * Other columns will be treated as additional data
3. **Data Validation**:
   * Email addresses should be properly formatted
   * Phone numbers should follow standard formats
   * Dates should be in a consistent format

### Import Process

#### Step 1: Access the Import Tool

1. Navigate to the **Passes** section in your Wallet Crew account
2. Click the **Import Passes** button
3. Select your XLSX file\
   ![Passes List](https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-9b4da63f56be675465ae930e3a77be0162234747%2Freadme_1.png?alt=media)

#### Step 2: Configure Import Settings

The import modal will show you two important settings:

1. **Discriminator Column**:
   * If your file has an `id` column, it will be automatically selected
   * Otherwise, choose a column that uniquely identifies each pass
   * This column will be used to determine if a pass should be created or updated
2. **Default Pass Type**:
   * Select the default pass type for passes that don't specify one
   * This is required if your file doesn't include a `passType` column

#### Step 3: Review and Import

1. Review the total number of passes to be imported
2. Check that the discriminator and pass type settings are correct
3. Click **Import** to begin the process\
   ![Import Modal](https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-712b3ab91ccd553682111349056cc75f79e0fba7%2Freadme_2.png?alt=media)

#### Step 4: Monitor Progress

During the import:

* A progress bar shows the current status
* You can see the number of passes created and updated
* Any errors are displayed in real-time
* You can cancel the import at any time\
  ![Import Progress](https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fgit-blob-703387aecb3f18b34fedfc8ffd222f01a4a0739c%2Freadme_3.png?alt=media)

### Important Notes

1. **Batch Processing**:
   * Passes are imported in batches of 16 for optimal performance
   * The process continues even if some passes fail to import
2. **Error Handling**:
   * Invalid data formats are reported
   * Missing required fields are highlighted
   * You can review errors and make corrections
3. **Cancellation**:
   * You can cancel the import at any time
   * The browser window should remain open during the process
4. **Data Processing**:
   * Empty values are converted to `null`
   * Special columns (id, secret, creationDate, etc.) are excluded from additional data
   * Metadata fields are handled separately

### After Import

1. The page will automatically refresh to show the updated passes once you close the modal
2. You can review the import report showing:
   * Number of passes created
   * Number of passes updated
   * Any errors that occurred

### Best Practices

1. **Data Preparation**:
   * Clean your data before import
   * Use consistent formatting
   * Validate email addresses and phone numbers
2. **File Structure**:
   * Keep column names simple and clear
   * Use standard date formats
   * Include all required fields
3. **Large Imports**:
   * For large files, consider splitting them into smaller batches
   * Monitor the progress and check for errors
   * Keep the browser window open during import

### Troubleshooting

If you encounter issues:

1. Check the error report for specific problems
2. Verify your file format and data
3. Ensure all required fields are present
4. Try importing a smaller batch to test
