Other Integrations: Technical Information 1Link Interface

AutoGuru, BMW, Eric, 1Link, and other system integrations

Technical Information 1Link Interface

  1. Table fmonelinkapprovals is populated from X3 transaction lines.
  2. Table fmonelinkmaintenance is populated using the following logic
  3. Create maintenance lines for each all non-Recharge line items (X6)
  4. If Variable Price line item (X6.linetype = 'A3') Labour Cost = X8.pretaxlabourcost - X8.pretaxdiscount_amount
  5. Else Labour Cost = 0
  6. Create maintenance line for Recharges (X6.rechargeamount > 0) with description = X6.rechargesummary + X6.rechargedetails and amount = X6.rechargeamount
  7. For Full Recharge (X6.rechargeamount > 0 AND X6.rechargepercentage = 100), Labour Cost = X8.pretaxlabourcost - X8.pretaxdiscountamount
  8. For Partial Recharge (X6.rechargeamount > 0 AND X6.rechargepercentage < 100), Labour Cost = X6.recharge_amount
  9. Create maintenance line for non-rechargeable part of Partial Recharges (X6.rechargeamount > 0 and X6.rechargepercentage < 100) with description = X6.rechargesummary + X6.rechargedetails and amount = X8.totalpretaxlinecost - X6.recharge_amount
  10. If system recharge is set to 'Y' for this posting class, then recharge the full amount ie set recharge flag for this to 'Y' else retain 1link recharge info ie 'N'
  11. Create one line per Part record (X7)
  12. Set parts cost and total cost to 0 for partial recharges (X6.rechargeamount > 0 AND X6.rechargepercentage < 100)
  13. If the fminterfacevmrsmappings has been set up for the given X7 partscode then use that to set productcode, postingclassid, vmrscode_id.
  14. Otherwise default productcode and postingclassid to the values from the 'parent' X6 records and set vmrscode_id to '0'
  15. All new rows are set to ‘pending’ status. The status is updated to either ‘invalid’ ‘valid’, ‘exception’ or ‘processed’ during processing.
  16. Balance Adjustments.To ensure suppliers are paid the correct amount, following $ adjustments are made.
  17. Adjust the labour cost and gst cost field to match the total pre tax line cost and gst cost in total line cost record (X8). The gst cost is not supplied at line total level by 1Link but is calculated based on gst code. This adjustment is necessary to balance fixed price lines, Line Type = ‘A2’ in line item detail record (X6), that do not have any parts record.
  18. Adjust totalcost and gstcost in the first maintenance line to match the transaction totals in total transaction cost record (X9).
    These adjustments are necessary as GST is calculated and the values might differ by the odd cent here and there. This will also fix any discrepancies in the totals big or small in case of 'structural' problems.

Validation Process

The following validations are performed on data in fmonelinkapprovals and fmonelinkmaintenance. The validation routine processes all records that have ‘pending’ or ‘invalid’ status. During the different stages of the import process a record progresses through 'invalid', 'valid', 'exception','processed','failed-posting','deleted' status.

  1. If the total gross transaction cost in transaction totals lines (X9) doesn’t match the total in fmonelinkmaintenance table, a fatal error is raised and the export process is aborted.

  2. Odometer Validation. Set odometervalidflag in fmonelinkapprovals to 'invalid' if odometer = 0 or above the acceptable tolerance.

  3. TO BE IMPLEMENTED IN PHASE 2: Split tyre fmonelinkmaintenance records into a recharge and non-recharge record if tyre budget exceeded

  4. Validate records in fmonelinkapprovals
    An approval is invalid if

  • Doesn't have a valid contract id

If a record fails validation, it is set to ‘invalid’ status. An invalid approval IS NOT copied to fmapprovals table for further processing. Invalid records remain in fmonelink_approvals so that they can be fixed manually. Invalid records are reported in an exception report. Subsequent import process will process ‘invalid’ records.

Records that pass validation are set to ‘valid’ status and copied to fmapprovals and fmmaintenance tables for further processing.

Setting Exceptions

Status flag in the semi-permanent table set to 'exception' for records that do not have enough information for posting into . These records are reported in an exception report requiring further attention.

  1. A maintenance line item is set to 'exception' if
  2. fminterfacevmrsmappings.exceptionflag = 'yes' for this posting class + vmrs code
  3. System Recharge flag is set to 'N' for this posting class and 1link sets the line as Recharge
  4. An approval record is set 'exception' if any of its maintenance lines is set to 'exception'

Note : Distinction between an ‘invalid’ and ‘exception’ records : ‘invalid’ records are not copied into and whereas ‘exception’ records are copied but not posted into

Labour Rows

Just prior to the posting process, any maintenance rows containing a labour component will be modified and copied so that labour costs can be identified separately. The steps are as follows;

  1. If labour_cost is greater than '0', copy this row.
  2. Update the copied row to add "Labour - " as a prefix to the original description. Change the VMRS Code to be 'LAB'. Copy the value of labourcost into the totalcost field. Update the fields unitcost, partscost, feecost and retailprice to be '0'.
  3. Update the original row fields labourcost and gstcost to be '0'. Reduce totalcost by the value of labourcost.

E.g.

DescriptionVMRSquantitylabour_costgst_costtotal_cost
Before update
Replace HeadlampREP1.5100.0020.00200.00
After update
Replace HeadlampREP1.50.000.00100.00
Labour - Replace HeadlampLAB1.5100.0020.00100.00

Notes Only Lines

If a maintenance line has a 0 value is has been created to records notes, the setting is set to = 8888.

Posting into

All ‘valid’ maintenance lines that have a non-zero $ value of are posted into . At the end of posting process records have following status.

GL Posting Status

TablePosting OKPosting Failure
fm_approvalspostedactive
fm_maintenanceposted/rechargepending
fmonelinkapprovalsprocessedfailed-posting
fmonelinkmaintenanceprocessedfailed-posting

All ‘posted/recharge’ fm_maintenance records are assigned with a batch no.
At the end of a successful import status flag in is set to ‘processed’ and the nightly input file is moved to ‘archive’ folder on 1link FTP server.

Table References

Invoice Import
Read
fm_contracts
fminterfacevmrs_mappings
fm_interfaces
fmsupplierfranchise_vehicles
fm_suppliers
fmvmrscodes
gb_controls
gbuniqueids
glpostingclass_maps
glpostingclasses

Business Rules for exporting records to 1link from Catch-e

Records are exported via scheduled Onelink jobs.

The following files are exported to 1Link.

  1. . Vehicle: Complete export

  2. . Customer: Complete export

  3. . Maintenance History: Incremental. Each maintenance line id exported is stored in fmmaintenanceonelink table.

Note: The Approval Note was added to the fields exported in Dec 2018.

The following contracts (and associated clients & maintenance history) are excluded from export

  1. . Suspend date within 60 days from CURRENT_DATE.

  2. . Contracts with no contractstart or contractend date.

  3. . Contracts on order (rego_no = 'ORDER')

  4. . If fmcontracts.1linkexport_flag = 'no'

  5. . If fmcontracts.1linkexportflag = 'yes' AND glpostingmaps.1linkexport_flag = 'no'

  6. . Contracts without Make & Models ie no matching Redbook Code or Make & Model empty in fm_contracts

Table References

Vehicle ExportCustomer ExportMaintenance History Export
ReadReadRead
fm1linkschemesfm_clientsfm_approvals
fm_clientsfm_contractsfm_contracts
fm_contractsglpostingmapsfm_maintenance
fm_driversfmmaintenance1link
fm_maintenancefm_suppliers
fmmaintenance1linkfmvmrscodes
glpostingclassesglpostingclasses
glpostingmapsglpostingmaps
qt_makesgl_transactions
qt_models
qt_variants

Business Rules for exporting Vehicle Data from Catch-e

  1. Field # 39 Tyres Fitted To Date : Count all non-recharged tyres including ones from 1link. This should match value on Contract / Maintenance screen.