Field Mapping

Learn how to map source data fields to WooCommerce fields using PrimeLink's visual mapping interface

Overview

Field mapping is the process of connecting your source data fields to WooCommerce fields. PrimeLink provides a visual drag-and-drop interface that makes this process intuitive and efficient.

The mapping interface is divided into two panels: source fields on the left and WooCommerce target fields on the right. You can drag fields from left to right, configure transformations, and preview the results.

Mapping Interface

Left Panel: Source Fields

The left panel displays all fields detected from your source data:

  • All columns/fields from your CSV, XML, or XLSX file
  • Search functionality to quickly find fields
  • Refresh button to reload fields if source changes
  • Fields are draggable - click and drag to map slots

Right Panel: WooCommerce Target Fields

The right panel shows all available WooCommerce fields organized into sections:

  • Collapsible sections for different field groups
  • Search functionality to find target fields quickly
  • Mapping slots where you drop source fields
  • Visual indicators for mapped vs unmapped fields

Basic Mapping

Drag and Drop

The simplest way to map fields is using drag and drop:

  1. Find the source field in the left panel
  2. Click and hold on the field
  3. Drag it to the target WooCommerce field slot on the right
  4. Release to complete the mapping

Removing Mappings

To remove a mapping:

  • Click the Edit button on the mapped field
  • Or click the Remove button (X icon) if available
  • The field will return to "unmapped" state

Auto-Mapping

Automatic Field Detection

PrimeLink can automatically map fields based on name similarity:

  1. Click the Auto-Map button (if available)
  2. PrimeLink will attempt to match source fields to WooCommerce fields
  3. Review the auto-mapped fields and adjust as needed

Custom Aliases

You can create custom field name aliases to improve auto-mapping:

  • Configure aliases in field options
  • Example: Map "title" to also recognize "name", "product_name", "title_sku"
  • This helps when source fields use different naming conventions

Field Options and Transformations

Accessing Field Options

Each mapped field has advanced options you can configure:

  1. Click the Edit button on any mapped field
  2. A modal or panel will open with field options
  3. Configure transformations, prefixes, suffixes, and more
  4. Save to apply the changes

Available Transformations

Text Transformations

  • Trim: Remove leading/trailing whitespace
  • Lowercase: Convert to lowercase
  • Uppercase: Convert to uppercase
  • Capitalize: Capitalize first letter
  • Title Case: Convert to title case
  • Normalize HTML: Clean and normalize HTML content

Advanced Text Transformations

  • Remove Accents: Remove diacritical marks
  • Slugify: Convert to URL-friendly slug
  • Extract Numbers: Extract only numeric characters
  • Extract Text: Extract only alphabetic characters
  • URL Encode/Decode: Encode or decode URLs

Number Transformations

  • Round: Round to nearest integer
  • Ceil: Round up
  • Floor: Round down
  • Format: Format with commas, dots, or spaces

String Operations

  • Substring: Extract portion of string
  • Pad: Pad string to specific length

Date/Time Transformations

  • Format Date: Convert from one date format to another
  • Supports various input and output formats

Advanced Operations

  • Regex Replace: Pattern-based find and replace
  • Replace Rules: Multiple find/replace pairs
  • Price Adjustment: Increase/decrease by percentage or fixed amount

Prefix and Suffix

Add fixed text before or after field values:

  • Prefix: Text added before the value (e.g., "SKU-" → "SKU-12345")
  • Suffix: Text added after the value (e.g., "-USD" → "99-USD")

Default Values

Set a fallback value if the source field is empty:

  • Useful for required fields that might be missing in source data
  • Example: Default stock status to "instock" if not provided

Separators

For multi-value fields (like images or categories), specify how values are separated:

  • Common separators: comma (,), semicolon (;), pipe (|)
  • Example: "image1.jpg,image2.jpg,image3.jpg" → splits into 3 images

Mapping Sections

Title & Content

Basic product information:

  • Post Title (product name)
  • Post Content (full description)
  • Post Excerpt (short description)
  • Slug (URL-friendly name)
  • Status (published, draft, etc.)

Product Data

Organized into tabs:

  • General: Product Type, Regular Price, Sale Price, Tax Status, Tax Class, Featured, Menu Order
  • Inventory: SKU, Stock Quantity, Stock Status, Manage Stock, Backorders, Low Stock Threshold
  • Shipping: Weight, Length, Width, Height, Shipping Class
  • Attributes: Product attributes (Color, Size, etc.) with option to create variations
  • Downloads: Downloadable products settings
  • Variation Overrides: Override parent data for variations
  • Linked Products: Upsells, Cross-sells, Grouped products

Images

Product images:

  • Featured Image (main product image)
  • Gallery Images (multiple images supported)
  • Add multiple gallery slots for different source fields
  • Supports URLs or file paths

Taxonomies

Product categories and tags:

  • Product Categories
  • Product Tags
  • Product Brands (if installed)
  • Custom taxonomies

Custom Fields

Add custom meta fields:

  • Map to any custom field key
  • Supports multiple custom fields
  • Useful for ACF (Advanced Custom Fields) or other plugins

Advanced Mapping Features

Conditional Mapping

Apply mappings only when certain conditions are met:

  • Set conditions based on other field values
  • Example: Only map sale price if regular price > 100
  • Useful for complex data transformations

Templates

Save and load mapping configurations:

  • Save your mapping as a template for reuse
  • Load saved templates to quickly apply mappings
  • Templates are organized by entity type

Live Preview

See how your mapped data will look:

  • Preview shows sample values after transformations
  • Helps verify mappings are correct
  • Updates in real-time as you change mappings

Best Practices

  • Start with required fields: Map title, price, and SKU first
  • Use transformations wisely: Clean data during import, not after
  • Test with sample data: Use Dry Run to verify mappings
  • Save templates: Reuse mappings for similar imports
  • Document complex mappings: Add notes about special configurations
  • Validate data: Check preview to ensure transformations work correctly

Next Steps

🔍 Filters & XPath

Learn how to filter data before mapping

Learn More →
💾 Templates

Save and reuse your mapping configurations

Learn More →
🧪 Dry Run

Test your mappings before running the actual import

Learn More →