1Link Interface
AutoGuru, BMW, Eric, 1Link, and other system integrations
1Link Interface
Technical information covering 1Link interface data import, export, validation, and GL posting procedures for Catch-e fleet management system.
Invoice Import Process
Rules for creating and processing records in tables fmonelinkapprovals and fmonelinkmaintenance.
Creating fmonelinkapprovals Records
Table fmonelinkapprovals populated from X3 transaction lines. One approval record created per X3 transaction.
Creating fmonelinkmaintenance Records
Maintenance Lines for Non-Recharge Items
Create maintenance line for each non-Recharge line item (X6).
If Variable Price line item (X6.linetype = 'A3'):
Labour Cost = X8.pretaxlabourcost - X8.pretaxdiscount_amount
Else:
Labour Cost = 0
Maintenance Lines for Recharges
Create maintenance line for Recharges (X6.rechargeamount > 0) with:
Description = X6.rechargesummary + X6.rechargedetails
Amount = X6.rechargeamount
Full Recharge
For Full Recharge (X6.rechargeamount > 0 AND X6.rechargepercentage = 100):
Labour Cost = X8.pretaxlabourcost - X8.pretaxdiscountamount
Partial Recharge
For Partial Recharge (X6.rechargeamount > 0 AND X6.rechargepercentage < 100):
Labour Cost = X6.recharge_amount
Create maintenance line for non-rechargeable part of Partial Recharges (X6.rechargeamount > 0 and X6.rechargepercentage < 100):
Description = X6.rechargesummary + X6.rechargedetails
Amount = X8.totalpretaxlinecost - X6.recharge_amount
If system recharge flag set to 'Y' for this posting class, recharge full amount (set recharge flag = 'Y'), else retain 1Link recharge info ('N').
Part Records
Create one line per Part record (X7).
Set parts cost and total cost to 0 for partial recharges (X6.rechargeamount > 0 AND X6.rechargepercentage < 100).
If fminterfacevmrsmappings configured for given X7 partscode:
Use productcode, postingclassid, vmrscode_id from mapping
Otherwise:
Default productcode and postingclassid to values from 'parent' X6 records
Set vmrscode_id to 0
Initial Status
All new rows set to 'pending' status. Status updated to either 'invalid', 'valid', 'exception', or 'processed' during processing.
Balance Adjustments
To ensure suppliers paid correct amount, following adjustments made.
Line-Level Adjustments
Adjust labour cost and GST cost fields to match total pre-tax line cost and GST cost in total line cost record (X8).
GST cost not supplied at line total level by 1Link but calculated based on GST code. This adjustment necessary to balance fixed price lines (Line Type = 'A2' in line item detail record X6) that have no parts records.
Transaction-Level Adjustments
Adjust totalcost and gstcost in first maintenance line to match transaction totals in total transaction cost record (X9).
These adjustments necessary as GST calculated and values might differ by odd cent. Also fixes discrepancies in totals (big or small) in case of structural problems.
Validation Process
Following validations performed on data in fmonelinkapprovals and fmonelinkmaintenance. Validation routine processes records with 'pending' or 'invalid' status.
During import process, record progresses through: 'invalid', 'valid', 'exception', 'processed', 'failed-posting', 'deleted' status.
Total Cost Validation
If total gross transaction cost in transaction totals lines (X9) does not match total in fmonelinkmaintenance table, fatal error raised and export process aborted.
Odometer Validation
Set odometervalidflag in fmonelinkapprovals to 'invalid' if odometer equals 0 or above acceptable tolerance.
Note: Split tyre fmonelinkmaintenance records into recharge and non-recharge record if tyre budget exceeded. TO BE IMPLEMENTED IN PHASE 2.
Approval Record Validation
Validate records in fmonelinkapprovals. Approval invalid if:
Does not have valid contract id
If record fails validation, set to 'invalid' status. Invalid approval NOT copied to fmapprovals table. Invalid records remain in fmonelink_approvals for manual fixing. Invalid records reported in exception report. Subsequent import process processes 'invalid' records.
Records passing validation set to 'valid' status and copied to fmapprovals and fmmaintenance tables for further processing.
Exception Handling
Status flag in semi-permanent table set to 'exception' for records without enough information for posting. These records reported in exception report requiring further attention.
Maintenance Line Exceptions
Maintenance line item set to 'exception' if:
fminterfacevmrsmappings.exceptionflag = 'yes' for this posting class + VMRS code
System Recharge flag set to 'N' for this posting class AND 1Link sets line as Recharge
Approval Record Exceptions
Approval record set to 'exception' if any of its maintenance lines set to 'exception'.
Invalid vs Exception
Distinction between 'invalid' and 'exception' records:
Invalid records: NOT copied to fmapprovals/fmmaintenance tables
Exception records: Copied but NOT posted into GL
Labour Row Processing
Just prior to posting process, any maintenance rows containing labour component modified and copied so labour costs identified separately.
Labour Row Processing Steps
If labour_cost greater than 0, copy row.
Update copied row:
Add "Labour - " prefix to original description
Change VMRS Code to 'LAB'
Copy labour_cost value into totalcost field
Update unitcost, partscost, feecost, retailprice to 0
Update original row:
Set labourcost and gstcost to 0
Reduce totalcost by labour_cost value
Example
Before Update
After Update
Notes-Only Lines
If maintenance line has zero value (created to record notes only), posting class set to 8888.
GL Posting
All 'valid' maintenance lines with non-zero value posted into GL.
At end of posting process, records have following status:
GL Posting Status by Table
All 'posted/recharge' fm_maintenance records assigned batch number.
At end of successful import, status flag in fmonelinkapprovals set to 'processed' and nightly input file moved to 'archive' folder on 1Link FTP server.
Invoice Import Table References
Read Tables
Data Export from Catch-e to 1Link
Records exported via scheduled 1Link jobs.
Export Files
Following files exported to 1Link:
Vehicle: Complete export
Customer: Complete export
Maintenance History: Incremental (each maintenance line id exported stored in fmmaintenance1link table)
Note: Approval Note added to exported fields December 2018.
Export Exclusion Criteria
Following contracts (and associated clients and maintenance history) excluded from export:
Suspend date within 60 days from CURRENT_DATE
Contracts with no contractstart or contractend date
Contracts on order (rego_no = 'ORDER')
If fmcontracts.1linkexport_flag = 'no'
If fmcontracts.1linkexportflag = 'yes' AND glpostingmaps.1linkexport_flag = 'no'
Contracts without Make & Models (no matching Redbook Code or Make & Model empty in fm_contracts)
Vehicle Export Table References
Read Tables for Vehicle Export
Customer Export Table References
Read Tables for Customer Export
Maintenance History Export Table References
Read Tables for Maintenance History Export
Vehicle Data Export Business Rules
Tyres Fitted to Date (Field 39)
Count all non-recharged tyres including ones from 1Link. This value should match value on Contract / Maintenance screen in Catch-e.
Calculation: Non-recharged tyres from all sources (including 1Link imports) sum to provide current tyre count.
Notes
1Link interface handles bidirectional data exchange: invoice import and maintenance history export
Validation process ensures data integrity before GL posting
Balance adjustments compensate for GST calculation differences
Labour costs separated into distinct GL posting rows for visibility
Exception handling distinguishes between invalid (not posted) and exception (posted but not posted to GL) records
Export exclusions prevent posting of incomplete or suspended contracts
Maintenance history export maintains incremental tracking via fmmaintenance1link table
All posting operations assigned batch numbers for reconciliation purposes
Status progression through multiple states allows audit trail of import process
Approval notes exported December 2018 onwards for full transaction documentation
VMRS mappings enable flexible product categorization for different maintenance item types