Overview
XML Workflow Tasks in MachShip provide powerful mapping capabilities for importing XML-formatted consignment data. This feature allows you to create custom mappings between your XML structure and MachShip's fields, supporting complex hierarchical data and transformations.
Key Features:
- XML node path mapping
- Array handling
- Data transformation
- Validation controls
- Error management
Configuration
Basic Setup
-
Access Workflow Tasks
- Navigate to Admin → Other Options
- Select Workflow Task
-
Create New Task
- Click Create Workflow Task
- Enter required information:
- Name
- Abbreviation
- Company
- Workflow Task Type (Consignment Importer)
- Mapping Type (XML File Mapper)
-
Enable Configuration
- Set "Is Enabled" to Yes
- Configure inheritance if needed
- Set up email notifications
Property Mapping
Define XML to MachShip field mappings:
- Click Add Property Map Option
- Configure each mapping:
- Select Location type
- Choose Mapping Target
- Specify XML node path
- Set additional options
XML Node References
Node Path Syntax
- Basic Path:
Consignment.Sender.Company
- Array Access:
Consignment.Sender.AddressLine[0]
- Multiple Nodes: Use index for repeated elements
Common Patterns
-
Single Value
<Consignment> <Reference>12345</Reference> </Consignment>
Path:
Consignment.Reference
-
Nested Value
<Consignment> <Sender> <Company>ACME</Company> </Sender> </Consignment>
Path:
Consignment.Sender.Company
-
Array Elements
<Consignment> <Sender> <AddressLine>Line 1</AddressLine> <AddressLine>Line 2</AddressLine> </Sender> </Consignment>
Paths:
- Line 1:
Consignment.Sender.AddressLine[0]
- Line 2:
Consignment.Sender.AddressLine[1]
- Line 1:
Required Fields
Essential fields for consignment creation:
-
Location Information (one set required):
- From/To Location Name
- OR Complete address details
-
Item Details (one set required):
- Item SKU for saved items
- OR Complete item specifications
-
Optional but Recommended:
- Carrier information
- Reference numbers
- Contact details
Advanced Features
-
Date Formatting
<DespatchDate>30/12/2023</DespatchDate>
- Specify format (dd/MM/yyyy or MM/dd/yyyy)
- Handle multiple date formats
- Default to current date
-
Constant Values
- Set default carrier
- Define standard service levels
- Apply company-wide references
-
Pattern Replacement
- Transform carrier names
- Standardize references
- Clean data during import
Examples
Basic Consignment XML
<?xml version="1.0" encoding="utf-8"?>
<Consignment>
<Sender>
<Company>ACME</Company>
<AddressLine>Main office</AddressLine>
<AddressLine>123 Business St</AddressLine>
<Suburb>Melbourne</Suburb>
<Postcode>3000</Postcode>
<Contact>John Smith</Contact>
<Phone>0412345678</Phone>
<Email>john@acme.com</Email>
</Sender>
<DespatchDate>30/12/2023</DespatchDate>
<Reference>123456789</Reference>
<Package>
<Reference>SKU1234</Reference>
<Length>100</Length>
<Width>60</Width>
<Height>10</Height>
<Weight>10</Weight>
<Quantity>1</Quantity>
</Package>
</Consignment>
Property Mapping Examples
-
Company Mapping
Target: From Company Location: Body Map From: Consignment.Sender.Company
-
Address Mapping
Target: From Address Line 1 Location: Body Map From: Consignment.Sender.AddressLine[0]
-
Package Mapping
Target: Item Length Location: Body Map From: Consignment.Package.Length
Best Practices
-
XML Structure
- Use consistent node naming
- Maintain clear hierarchy
- Include all required fields
-
Node References
- Use correct array indexing
- Verify node paths
- Handle optional nodes
-
Data Validation
- Validate XML schema
- Check required fields
- Verify data formats
-
Error Handling
- Monitor import logs
- Review error notifications
- Maintain error documentation
-
Performance
- Optimize XML structure
- Minimize nested levels
- Use appropriate data types