> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contentwrap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Step 3: Upload & Map Fields

> Upload your Webflow CSV to MigrateKit and map fields to your Sanity schema with intelligent auto-suggestions and validation.

## Upload Your CSV

<Steps>
  <Step title="Access MigrateKit">
    Navigate to **MigrateKit** in your ContentWrap dashboard (app.contentwrap.io) or visit `/migratekit`
  </Step>

  <Step title="Upload your file">
    Drag and drop your CSV or click to browse

    <Check>
      MigrateKit detects Webflow format and shows a preview
    </Check>
  </Step>

  <Step title="Review the preview">
    Verify:

    * Total rows matches expectations
    * All columns are detected
    * Sample data looks correct
  </Step>
</Steps>

## Understanding the Mapping Interface

The mapping screen has two panels:

<CardGroup cols={2}>
  <Card title="Left: Sanity Schema" icon="diagram-project">
    Define your Sanity structure:

    * Document type name
    * Field names and types
    * Required field settings
  </Card>

  <Card title="Right: Webflow Data" icon="table-columns">
    Your CSV from Webflow:

    * Column names
    * Sample data
    * Detected data types
  </Card>
</CardGroup>

## Name Your Document Type

First, choose a name for your Sanity document type:

<Tabs>
  <Tab title="Good Names">
    * `blogPost`
    * `article`
    * `author`
    * `product`

    <Tip>
      Use **camelCase**: lowercase start, capitalize subsequent words, no spaces or hyphens
    </Tip>
  </Tab>

  <Tab title="Invalid Names">
    * `Blog Post` ❌ (space)
    * `blog-post` ❌ (hyphen)
    * `123post` ❌ (starts with number)
    * `BlogPost` ⚠️ (works but `blogPost` preferred)
  </Tab>
</Tabs>

## Map Your Fields

Connect each Webflow column to a Sanity field:

### Auto-Mapping

MigrateKit suggests mappings based on:

* Column names (e.g., `Name` → `title`)
* Data types detected in your CSV
* Common Webflow patterns

Review suggestions and adjust as needed.

### Manual Mapping

For each Webflow column:

<Steps>
  <Step title="Select the column">
    Click a Webflow column on the right to see sample data
  </Step>

  <Step title="Create or select a Sanity field">
    On the left, click **+ Add Field** or select an existing field
  </Step>

  <Step title="Configure the field">
    Set:

    * **Field name**: Sanity field name (e.g., `content`, `heroImage`)
    * **Field type**: Choose from Sanity types
    * **Required**: Whether field must have a value
  </Step>
</Steps>

### Quick Field Type Reference

| Webflow Column Type | Sanity Field Type | Notes              |
| ------------------- | ----------------- | ------------------ |
| Name, Title         | `string`          | Short text         |
| Rich Text, Body     | `portableText`    | HTML auto-converts |
| Main Image          | `image`           | Single image       |
| Slug                | `slug`            | URL-friendly ID    |
| Published Date      | `datetime`        | With time          |
| Price, Count        | `number`          | Numeric values     |
| Featured, Active    | `boolean`         | True/false         |
| Website             | `url`             | Web URLs           |

## Field Configuration Options

### Required Fields

Mark fields as required if they must have a value:

<Warning>
  **Important:** If a required field has empty values in some CSV rows, those rows will fail to import
</Warning>

### Field Renaming

Use different names in Sanity than Webflow:

| Webflow    | → | Sanity    | Why              |
| ---------- | - | --------- | ---------------- |
| Name       | → | title     | More semantic    |
| Post Body  | → | content   | Cleaner          |
| Main Image | → | heroImage | More descriptive |

### Fields to Skip

Don't map these Webflow columns (MigrateKit uses them internally):

* `Collection ID`
* `Item ID`
* `Locale ID`

Optionally skip Webflow timestamps (Sanity manages its own):

* `Created On` (Sanity creates `_createdAt`)
* `Updated On` (Sanity creates `_updatedAt`)
* `Published On` (Sanity creates `_publishedAt`)

<Tip>
  You CAN map these to custom fields if you want to preserve original Webflow dates
</Tip>

## Special Field Types

<AccordionGroup>
  <Accordion title="Portable Text (Rich Content)">
    **Use for:** Webflow rich text fields with HTML

    MigrateKit automatically converts:

    * Headings (H1-H6)
    * Paragraphs and line breaks
    * Bold, italic, underline
    * Lists (ordered and unordered)
    * Links
    * Embedded images

    Learn more: [HTML Conversion](/concepts/html-conversion)
  </Accordion>

  <Accordion title="Image Fields">
    **Use for:** Webflow image columns

    During import, MigrateKit:

    1. Downloads images from Webflow CDN
    2. Checks for duplicates (reuses if exists)
    3. Uploads to your Sanity project
    4. Creates proper image references
  </Accordion>

  <Accordion title="Slug Fields">
    **Use for:** Webflow slug column

    MigrateKit:

    * Sanitizes values (removes special characters)
    * Formats for Sanity's slug type (`{current: "value"}`)
    * Preserves URL-friendly format
  </Accordion>

  <Accordion title="Arrays">
    **Use for:** Comma-separated values (tags, categories, multiple images)

    Map to `array` and specify item type:

    * Array of strings
    * Array of images
    * Array of numbers
  </Accordion>
</AccordionGroup>

## Validation

MigrateKit validates your mappings before import:

<AccordionGroup>
  <Accordion title="Schema Validation">
    * Document type name is valid
    * No duplicate field names
    * Field types match data
    * Required fields are mapped
  </Accordion>

  <Accordion title="Data Validation">
    * Values can convert to target types
    * Required fields have data
    * Dates are parseable
    * Numbers are numeric
    * URLs are valid
  </Accordion>

  <Accordion title="Preview">
    Review sample transformed documents:

    * First 3-5 documents shown
    * Check Portable Text rendering
    * Verify image references
    * Confirm data looks correct
  </Accordion>
</AccordionGroup>

## Common Validation Issues

<Warning>
  **"Field type mismatch"**

  Data doesn't match chosen type (e.g., text in a number field).

  **Fix:** Change field type or clean data in CSV.
</Warning>

<Warning>
  **"Required field has empty values"**

  Some rows missing data for a required field.

  **Fix:** Make field optional, fill missing values, or skip those rows.
</Warning>

<Warning>
  **"Invalid Portable Text"**

  HTML couldn't be converted properly.

  **Fix:** Check HTML for malformed tags or unsupported structures. See [Troubleshooting](/troubleshooting/common-issues#html-conversion-errors).
</Warning>
