Fleet Operations API: Fm approvals autoPostClaims

API endpoints for fleet management (Fm_*) operations

Fm approvals autoPostClaims

This job will post claims that pass the Funds Check. More that one job can be scheduled.

Go to the Vehicle Scheduler Jobs page for the recommended set of car claim jobs to use for this process.

Job criteria;

  1. Contract Type / Details "Group" is not 'Salary Packaged'
  2. Contract Type / Details "Auto Post on Claims" is checked.
  3. Contracts / Claim "Status" is 'Active'
  4. Contracts / Claim "Sub Status" is 'Pending Funds'
    Job outcomes;
  5. The claim passes the funds check validation and is 'Posted'.
  6. The funds check validation fails and the claim remains at 'Active' status and 'Pending Funds' sub status. It will be checked again the next time the job runs.
  7. The claim fails a different check validation during the job run. The claim is updated to the 'Posting Failed' sub status.
  8. Investigate these claim records by going to the Contracts / Claim tab and running the ** process for the failed claim.
  9. This should provide the validation failure message. An example of this happening is the claim failing a GST Checks.

Parameters

  • Selection — Process to select on which order claims will be selected on each contracts for post process. Available options are: Approval ID (smallest) Total (Smallest) Total (Largest)
  • Allowable Funds Balance — You can enter the value that the "Current Funds Balance (incl GST)" displayed on the Funds Balance pop-up can be once the claim has been processed. E.g. if you enter -100.00. the "Current Funds Balance (incl GST)" can fall to -100.00.

Process Flow Chart

Fm autoguru importApprovals

This job automates the import of AutoGuru approvals from the AutoGuru SFTP server.

Go to the AutoGuru page for details about all of the jobs, the process and for set-up steps.

Contact your Account Manager for help to set up this job.

Parameters

These are the parameter settings that are used in this job method.

  • Supplier Code — Choose or lookup the supplier code that the AutoGuru approvals should be created for.
  • Path — Add the SFTP path the files should be picked up from. The job seeks out the required files matching pattern specified in Filename pattern. Expected path is : outbox Filename pattern A pattern is only required here if your Catch-e database name contains multiple words, otherwise it can be left blank. If your name is a single word, E.g. 'Fleetcompany', then the system will seek files in the standard AutoGuru pattern. I.e. 'catchefleetcompanyYYYYMMDD'. If your name has multiple woreds, E.g. 'Fleet Company', the different pattern needs to be recorded so that the files to seek are found. I.e. 'catchefleet-companyYYYYMMDD'. Enter a pattern like this: /^catche{CLIENT}\d{6,8}.csv$/i. This pattern uses a PERL regular expression pattern. Replace {CLIENT} with the required Catch-e client name used in AutoGuru's files. AutoGuru will advise on this also. E.g. /^catchefleet-company\d{6,8}.csv$/i

How this job processes files on AutoGuru SFTP server

  1. If there are multiple files to import, it will import all files dated after the last imported file date up to today's date.
  2. Files are processed in date order, from oldest to newest.
  3. Once the import process is complete for a file, it is deleted from the nominated Path folder. A copy of the file is kept in active/Path folder by AutoGuru.

Validations and Alerts

AlertComments
New or Edit
Supplier code cannot be blank!Enter the "Supplier Code"
Remote file path cannot be blank!Enter the "Path".

Scheduler Messages

The messages below are shown on Scheduler / Schedule as "Last Message" and also on Scheduler / Queue as "Message".

Completed

  • # records imported. — Shows the number of records imported. This will match the total record count in the imported booking data file.
  • Nothing imported! — Shows if no file was found and no records were imported.

Failed

  • Import has failed. Validation error(s): AutoGuru connection details not configured — The scheduler job method fm / autoguru / importApprovals will return this message if SFTP connection details for Autoguru has not been set up. Follow this up with your AutoGuru Account Manager.
  • Error invoking /gb/interface/autoguru/import-approvals API service — A locking issue was found when the job was run. Try scheduling the job to run again. Validation error(s): 1. Data - Expense-approval posting class map missing for posting class code M Product Codes S, M and T must be checked for 'Autoguru Import'.
  • File 'catchecompanyname yyyymmdd.csv' does not exist. — This message is shown if there is no data file matching the '{filename}_yyyymmdd.csv' pattern available in the AutoGuru SFTP folder. Follow this up with your AutoGuru Account Manager.
  • invalidContractId: The booking data contains an invalid Contract Id xxx on row x — The Contract ID does not exist in Catch-e.
  • An existing import (xxx) already exists with the same import checksum — Duplicate booking data file. Same file has already been imported. Advise your AutoGuru Account Manager to delete this file from the SFTP outbox.
  • invalidProductCode: The booking data contains an invalid/unimplemented product code G — Product Code must be S, M or T
  • invalidTransactionDate: The booking data contains an invalid Transaction Date xxx on row x. Reason(s): The parsed date was invalid — Date must be in ISO 8601 format YYYY-MM-DDTHH:MM:SS.sssZ e.g. 2024-07-04T00:27:14.126Z

invalidBookingUrl: The booking data contains an invalid booking url for Booking Id xxx on row x

  • vmrsCodeNotMapped: VMRS code is missing for tyrecount quantity of xx on row x — Create a VMRS code on Fleet/Controls/Maintenance/VMRS codes screen where VMRS Code = T{quantity}, Action Code = tyrecount and Quantity = {quantity}
  • invalidRecharge: OnChargeIncTax amount does not match BookingPaymentToAGIncTax amount on row x — This will happen for non Novated contracts when the Posting Class is not checked for recharge on Contract Types/Expenses-Approvals screen and OnChargeIncTax amount does not match BookingPaymentToAGIncTax in AutoGuru booking data file

Run Now Alerts

The alerts below are shown when the job is run using the Run Now button.

Job failed

  • CATCHEAPIERROR Data - An existing import (######) already exists with the same import checksum. Duplicate filename: {filename}yyyymmdd.csv — Duplicate booking data file. Same file has already been imported. Advise your AutoGuru Account Manager to delete this file from the SFTP outbox.
  • CATCHEAPI_ERROR Data - The booking data contains an invalid Contract Id ###### on row # — The Contract ID does not exist in Catch-e.
  • CATCHEAPIERROR Data - File {filename}yyyymmdd.csv does not exist. — This message is shown if there is no data file matching the '{filename}_yyyymmdd.csv' pattern available in the AutoGuru SFTP folder. Follow this up with your AutoGuru Account Manager.

Set-up

Setup / Reference Data → gb_controls)
Module
fm
Host
Port
Username
Key

Fm billings

Use scheduler jobs to automate the billing process so that you don't have to run the billings manually from the Billing screens.
You can set-up billing jobs to run for all clients, or restrict the selection to a particular channel, client group or client.

Methods

MethodDescriptionType
CombinedThis job runs scheduled Combined billings.fm / billings / combined
PeriodicThis job runs scheduled Periodic billings.fm / billings / periodic
RechargeThis job runs scheduled Recharge billings.fm / billings / recharges
Recharge FuelThis job runs scheduled Recharge Fuel billings.fm / billings / rechargesFuel

Scheduler Mail fields

By default the Mail fields (Send Mail checkbox, Subject, Body, Sender, Recipients etc) are not editable.
When Billing jobs are run, and the "Delivery" parameter is set to 'Email', the respective Client's "A/C Payable" and "CC" will be used as the recipients. The Sender will be the

If you want to receive a notification email that the job has run, the should be set to 'yes' and should be set to 'no'. Contact your Account Manager if you would like to do set this up.

Troubleshooting

Tip: Visit the main Troubleshooting page for a list of all the available problem-solving tips.

Useful SQL

SELECT * FROM gb_scheduler_types WHERE class = 'billings';

Fm billings combined

Use this billing method to schedule combined billing.
This is very similar to the system menu item Fleet / Billing → Combined.
All of your client billing preferences are applied in the same way regardless of how the billing is created except for the differences listed below.

Differences

| Item | fm / billings / combined | Fleet / Billing → Combined |
| --- | --- | --- | | Emailing | If the "Delivery" field is set to 'Email', emails are created and sent. You can find them in the Mail Queue at 'Sent' status. In either case, if the email cannot be sent, they are stored in the Mail Queue with a 'Failed' status. Go to the Mail Queue to review and then send the corrected emails. | If the "Delivery" field is set to 'Email', billing emails are created and placed in the Mail Queue in 'Pending' status. To complete the process, you need to go to the Mail Queue and send these invoices manually. |
| Billing Type | Only records for clients with a "Billing Type" of 'Combined' will be selected. | Records for clients with a "Billing Type" of either 'Any' or 'Combined' will be selected. |
| Exclude Fuel | The check box "Exclude Fuel" is not available for this job. If you want to use the combined method and exclude fuel from these invoices, set up a rechargesFuel billing job to run before the combined billing job | Billing can exclude fuel by using the check box "Exclude Fuel". |

Data Set-up

Set the Clients / Contract Defaults "Billing Type" as 'Combined' for any client whose invoices should be created by this job.

Job Type

  • Module (Drop List) — Choose 'fm'.
  • Class (Drop List) — Choose 'billings'.
  • Method (Drop List) — Choose from combined, periodic,recharges and rechargesFuel.
  • Description (Text) — A generic description will populate once a "Method" has been chosen. You can change this to something meaningful to you. This shows as the description on the Scheduler / Schedule tab.

Parameters

  • Channel Code (Lookup) — Enter or look up the Channel Code you want to run the job for. This will then select and invoice only the clients of this channel. If populated, you cannot also choose a “Group Code” or “Client Code”. Choosing another filter will remove the "Channel Code" value.
  • Group Code (Lookup) — Enter or look up the "Group Code" you want to run the job for. This will then select and invoice only the clients of this group. If populated, you cannot also choose a “Channel Code” or “Client Code”. Choosing another filter will remove the "Group Code" value.
  • Client Code (Lookup) — Enter or look up the "Client Code" you want to run the job for. This will then select and invoice only the contracts that belong to this client. If populated, you cannot also choose a “Channel Code” or “Group Code”. Choosing another filter will remove the "Client Code" value.
  • Delivery (Drop List) — Choose 'Email' to select and email invoices to clients who have "Invoicing Preference" set to 'Email. The emails will be sent and available for review in the Mail Queue. They will be set to ‘Sent’ status. The recipients of these emails will be based on the “Use Group Email” flag set up under the Client Contract Defaults. If this is checked on , then the Group Email will be used, if checked off, then the A/C Payable email will be used. If there is no stored recipient email, the scheduler job will still run, with the emails will be in the Mail Queue in the ‘Failed’ status. Post will be selected when the scheduler is required to run to process the invoices.
  • Pay Cycle (Drop List) — Choose a pay cycle if you want to run this job only for a particular pay cycle. This works in the same way as the Billings / Periodic “Pay Cycle” field. You might use this feature to invoice contracts with a weekly or fortnightly pay cycle throughout the month without accidentally including monthly pay cycles, that may be invoiced at a nominated time in the month.

| Invoice To | Drop List | Use this feature if you want to create billing records before or in the future of their invoice date being reached. Leave this field blank if you want to use the system’s run date as the Fleet / Billing “Invoice Date” when the billing selection and posting is run. E.g. if the job runs on the 10th, it will work like going to Fleet / Billing on 10/02/2021 and using the “Invoice Date” of '10/02/2021'. Choose 'Common Day Past' or 'Common Day Future' to nominate a specific day as the Fleet / Billing “Invoice Date” E.g. if the job runs on the 10th with Common Day Future, and the DAY is '1st' it will work like going to Fleet / Billing on 10/02/2021 and entering the “Invoice Date” as '10/02/2021' and "Invoice To" as '01/03/2021'.
E.g. if the job runs on the 10th with Common Day Past, and the DAY is '1st' it will work like going to Fleet / Billing on 10/02/2021 and entering the “Invoice Date” as '10/02/2021' and "Invoice To" as '01/02/2021'. Choose 'Run Date Plus' to add a fixed number of days to the job's run date to create the "Invoice Date".
E.g. the job is scheduled to run on the 10th and this day is the 3, it works in the same way as going to Fleet / Billing on 10/02/2021 an entering 13/02/2021 as the “Invoice Date” for your billing run.
If you have entered a "Client Code", then 'Payroll Cut Off' also becomes an available choice. This adds the client's "Payroll Cut Off" days to the job's run date.
E.g. the job is scheduled to run on the 10th, and the client's "Payroll Cut Off" is 5, it works in the same way as going to Fleet / Billing on 10/02/2021 an entering 15/02/2021 as the “Invoice Date” for your billing run. | |
| Invoice To DAY | | The list you see here depends on what has been selected in the "Invoice To" field. If the “Invoice To” selection is Blank - , the day list box is disabled as no selection is required. ‘Common Day Past’ - then the available day list is “1st, 2nd, 3rd, 4th, … EOM” ‘Common Day Future’ - then the available day list is “1st, 2nd, 3rd, 4th, … EOM” ‘Run Date Plus’ - the available day list is “1, 2, 3, 4, …31”. No EOM will be available ‘Payroll Cut Off Days’ - the day list box is disabled as no selection is required. | |
| Invoice To Date | Cal | This is a calculated display field that shows what the next “Invoice To” date will be with the current selections applied. This will calculate if “Invoice To” and Invoice To “Day” are entered. If no entry is made in “Invoice To” field, it will be displayed as blank also on ‘Save’, engaging existing behaviour.
| Invoice Date | List Box | List box options are ‘Invoice To’ and ‘Run Date’ Choose ‘Invoice To’ to use the calculated “Invoice To Date” as the Fleet / Billing “Invoice Date” when the billing selection and posting is run. Choose 'Run Date' to use the system’s run date as the Fleet / Billing “Invoice Date” when the billing selection and posting is run. If the field is blank, the system will default to using 'Run Date'. | |
| Run Times | | | |
| The billing process requires a range of tables to be locked down while it runs. For this reason, we recommend you set billing jobs to run outside of business hours. | | | |

Fm billings field descriptions bottom

Run Times
The billing process requires a range of tables to be locked down while it runs. For this reason, we recommend you set billing jobs to run outside of business hours.