Column Mapping

Map your Excel columns to LHDN invoice fields to ensure proper data transformation and compliance.

Understanding Column Mapping

Column mapping tells InvoisX which Excel column corresponds to which invoice field. This is the foundation of the template system and determines how your Excel data becomes LHDN-compliant invoices.

The Mapping Interface

Sheet Configuration

Each sheet in your Excel file can be configured with a specific type:

Sheet Types

  • Header Data: Contains invoice-level information (dates, totals, customer details)
  • Line Items: Contains individual product/service line details
  • Mixed Data: Contains both header and line information in each row

Column Mapping Grid

For each sheet, you'll see a grid showing:

  • Excel Column: The original column name from your Excel file
  • System Field: The LHDN invoice field it maps to
  • Required: Whether this mapping is mandatory for valid invoices

System Fields Reference

InvoisX organizes available fields into categories for easy mapping:

Header Fields

Basic Invoice Information

  • Invoice ID
  • Issue Date
  • Due Date
  • Currency Code
  • Exchange Rate

Customer Information

  • Buyer Name
  • Buyer TIN
  • Buyer Address
  • Buyer Contact Details

Financial Totals

  • Total Net Amount
  • Total Tax Amount
  • Total Discounts
  • Payable Amount
  • Tax Exclusive Amount
  • Tax Inclusive Amount

Line Fields

Product/Service Details

  • Item Description
  • Quantity
  • Unit Code
  • Unit Price
  • Discount Amount
  • Tax Category
  • Tax Rate
  • Tax Amount

Calculations

  • Line Net Amount
  • Line Tax Amount
  • Line Total Amount

Mapping Process

Step 1: Review Detected Columns

InvoisX automatically detects all columns in your Excel file. Review the list to ensure all expected columns are present.

Step 2: Map Required Fields

Start with required fields (marked with red "Required" badges):

  1. Click the System Field dropdown for each required column
  2. Search or browse for the appropriate LHDN field
  3. Select the field that best matches your Excel data

Step 3: Map Optional Fields

Map additional fields to enhance data quality:

  • Customer contact information
  • Additional tax details
  • Reference numbers
  • Notes and descriptions

Step 4: Validate Mappings

Use the Validate Template action to check for:

  • Missing required field mappings
  • Incompatible data type mappings
  • Business rule violations

Field Categories

Customer Fields

Map customer information consistently:

  • Buyer Name → Customer name or company
  • Buyer TIN → Tax identification number
  • Buyer Address → Complete address fields

Financial Fields

Ensure accurate financial mapping:

  • Tax Exclusive Amount → Amount before tax
  • Tax Inclusive Amount → Amount including tax
  • Total Discounts → Sum of all discounts applied

Product Fields (for line items)

Map product details accurately:

  • Item Description → Product or service name
  • Unit Code → Measurement unit (piece, kg, hour, etc.)
  • Quantity → Number of units

Advanced Mapping Features

Multi-Sheet Mapping

For Standard mode templates with multiple sheets:

  1. Header Sheet Mapping

    • Map invoice-level fields
    • Include customer information
    • Map financial totals
  2. Lines Sheet Mapping

    • Map product/service details
    • Include line-level calculations
    • Map tax information per line
  3. Sheet Linking

    • Ensure both sheets have an Invoice ID field
    • This links header data with corresponding line items

Data Type Considerations

Different Excel column types map better to specific fields:

Text Columns → Description fields, codes, names Number Columns → Amounts, quantities, rates Date Columns → Issue dates, due dates Formula Columns → Calculated totals (verify formulas are correct)

Mapping Status Indicators

Color-Coded Cards

  • Green Cards: Successfully mapped columns
  • Gray Cards: Unmapped columns
  • Progress Indicators: Show mapping completion percentage

Mapping Information Display

Each mapped column shows:

  • Field Path: The exact LHDN field location
  • Category: The field category (header, line, customer, etc.)
  • Data Type: Expected data format

Best Practices

Required Field Priority

  1. Map all required fields first
  2. Validate template after required mappings
  3. Add optional fields for enhanced data quality

Consistent Naming

  • Use consistent Excel column names across files
  • Match column names to their intended purpose
  • Avoid special characters in column headers

Data Quality

  • Ensure Excel data types match field expectations
  • Clean data before upload (remove empty rows/columns)
  • Verify calculated fields are accurate

Testing Approach

  1. Map a few key fields initially
  2. Test with a small sample file
  3. Gradually add more mappings
  4. Re-test after each significant change

Common Mapping Scenarios

Accounting System Export

Excel Column          → LHDN Field
"Invoice Number"      → Invoice ID
"Customer Name"       → Buyer Name
"Invoice Date"        → Issue Date
"Total Amount"        → Tax Inclusive Amount
"Tax Amount"          → Total Tax Amount

Sales Report Import

Excel Column          → LHDN Field
"Order ID"            → Invoice ID
"Client"              → Buyer Name
"Sale Date"           → Issue Date
"Product"             → Item Description
"Qty"                 → Quantity
"Price"               → Unit Price

Service Invoice Template

Excel Column          → LHDN Field
"Service Date"        → Issue Date
"Client Company"      → Buyer Name
"Service Description" → Item Description
"Hours"               → Quantity
"Rate"                → Unit Price
"Total"               → Line Total Amount

Troubleshooting Mapping Issues

Column Not Detected

  • Check Excel file format (ensure .xlsx)
  • Verify column headers are in the first row
  • Remove merged cells in header row

Field Not Available

  • Check if you're looking in the right category
  • Use the search function in field dropdowns
  • Verify the field is supported for your sheet type

Validation Errors

  • Ensure all required fields are mapped
  • Check data type compatibility
  • Verify business rule compliance (e.g., tax calculations)

Next Steps

After completing column mapping:

  1. Set up code mappings for value transformation
  2. Configure default values for automation
  3. Test your template with sample data