Document Field Mapping specifies how Xilnex fields appear in AutoCount document fields. This includes header-level data (like Document Number and Customer) and detail-level data (like Item Description and Tax Code).
What Is Document Field Mapping?
Document Field Mapping controls:
- Header-level fields – Information at the document level
(e.g., Document No., Customer Code, Terms, Description)
- Detail-level fields – Information at the line item level
(e.g., Item Description, Quantity, Tax Code, Project Code, Department)
- Custom formulas – Combine fixed text and variables to create dynamic numbers and descriptions.
Step-by-Step: Setting Up Document Field Mapping
Step 1: Navigate to Document Fields
- Go to Integration > AutoCount > Document Fields
- Select the module (e.g., Sales)
- Select the document type (e.g., Cash sales (Retail))
Step 2: Generate Default Mapping
- For first-time setup, the system can auto-generate a default template:
- Click "More" → "Add default values"
- The system creates a mapping template based on the AutoCount document type
- A list of default field mappings appears
Example for Cash Sales:
- Voucher number → "CS-" (fixed prefix)
- Project code → (from Xilnex project)
- Document date → (from sales date)
Step 3: Review and Customize the Mapping
- In the list, you'll see:
- Xilnex document field (left) – e.g., "Voucher number"
- AutoCount document fields P1, P2, P3, etc. (right)
- Double-click to modify it
- The details panel opens
Step 4: Customize Individual Field Mappings
Example:
Customizing the Voucher Number
Default: CS- (fixed) + Project Code + Document Date
Result: CS-PG-20251001
If you want to change it:
- Double-click the "Voucher number" line
- The details panel shows:
- Field: Voucher number
- Document field P1: CS- (fixed value)
- Document field P2: Project code (variable)
- Document field P3: Document date (variable)
- To modify, you can:
- Change P1 to R- (change prefix from CS to R)
- Add new fields using "+ Add field"
- Remove fields using "Remove"
- Click "Save"
Available Mapping Variables
When mapping a field, you can use these types of values:
Type | Example | |
Fixed value | CS-, INV, # | Static text to prepend or append |
Xilnex variable | Project code, Document date, Outlet code, Store name | |
Combination | CS-PG-20251001 | Fixed + Variable + Variable |
Examples
1. Creating a Custom Cash Sales Voucher Number
Goal: Generate voucher numbers as CS-PG-20251001 where:
- CS- = fixed prefix (Cash Sales)
- PG = project code of the store
- 20251001 = sales date in YYYYMMDD format
Steps:
- Go to Integration > AutoCount > Document Fields
- Select module: Sales, document: Cash sales (Retail)
- Click "More" → "Add default values" (if not already done)
- Double-click the "Voucher number" line
- In the details panel:
- P1: Change to fixed value CS-
- P2: Select variable Project code
- P3: Select variable Document date
- Click "Save"
Result:
All cash sales vouchers will be numbered like CS-PG-20251001, automatically formatted by store and date.
2. Customizing Description Fields
Goal: Purchase invoice descriptions should say "Xilnex Purchase" instead of the default
Steps:
- Go to Integration > AutoCount > Document Fields
- Select module: Purchase, document: Purchase invoice (Receive)
- Click "More" → "Add default values" (if not already done)
- Double-click the "Description" line (in the Detail section)
- In the details panel:
- P1: Change to fixed value Xilnex Purchase
- Remove any other P fields (P2, P3) if present
- Click "Save"
Result:
All purchase invoices will show "Xilnex Purchase" in the description field in AutoCount.
These fields typically map at the document header level:
- Document No. – Voucher number, invoice number
- Customer/Supplier Code – Customer or vendor ID
- Description – Transaction description
- Terms – Payment terms (e.g., "C.O.D.", "Net 30")
- Project Code – Store or department project code
- Currency – Currency code (MYR, USD, etc.)
- Date – Document date
Common Detail-Level Fields
These fields typically map at the line item level:
- Item Description – Product description
- Quantity – Item quantity
- Unit Price – Price per item
- Tax Code – Tax treatment (VAT, GST, etc.)
- Project Code – Project assignment per line
- Department Number – Cost center or department
Tips for Field Mapping
- Start with defaults – Auto-generate defaults first, then customize
- Test before full rollout – Map one document type, run a test post, verify in AutoCount, then move to others
- Use consistent naming – Align descriptions and prefixes with your company standards
- Dynamic numbering – Use variables to create unique, traceable document numbers automatically