Salesforce and AutoGuru Interfaces

Salesforce and AutoGuru Interfaces

Technical documentation covering Salesforce and AutoGuru CRM integrations for Catch-e fleet management system, including setup procedures, API endpoints, global controls, and export business rules.


Salesforce Integration Overview

Catch-e enables integration with Salesforce.com/au using web services. For new Salesforce integrations, Catch-e recommends and prefers Apex method over legacy SOAP.

Integration processes and functionality can be applied to other CRM packages as required. Prospective CRM providers can be provided with Salesforce Guide covering available integration services.

CRM Interface Functionality Examples

  • Transfer quote and product information

  • Transfer changes or updates to quotes

  • Call for and use Catch-e documents in CRM system


Salesforce Key Fields

Following fields in Catch-e created for Salesforce interface use:

Location

Field Name

Fleet / Administration / Quotes / Header

Opportunity No

Fleet / Administration / Quotes / Contract

Opportunity ID

Fleet / Administration / Quotes / Contract

Opportunity Number

Fleet / Administration / Suppliers / Detail

External Code


WSDL File Setup

Create WSDL File Type

New file type record and directory created by Catch-e staff.

Directory path: /clients/{client}/core/fleet/lib/interfaces/wsdls

Add WSDL File

To add or update WSDL file:

  1. Navigate to Setup / Import/Export Files menu

  2. Choose file type: 'Salesforce WSDLs'

  3. Choose WSDL file applicable to environment:

    • salesforce-test.wsdl

    • salesforce-staging.wsdl

    • salesforce-live.wsdl

  4. Upload file


Salesforce Apex Integration

For new Salesforce integrations, Apex method preferred over legacy SOAP/web services.

Global Controls Configuration

Configure following Global Controls for Apex Salesforce APIs:

Module

Name

Comment

Value

qt

salesforce_login

Enter required Username and Password

encrypted

qt

salesforceloginapex

Enter required Host, Client Id, Client Secret

encrypted

gb

salesforceapexinterfaceenabledflag

Set to yes to use Salesforce Apex

yes

gb

salesforceinterfaceemailonerror

Email address for Salesforce update errors

blank - not used for REST

gb

salesforceinterfaceenabled_flag

Set to yes if interfacing with Salesforce CRM (set to no in Support environment on refresh)

no - not used for REST

gb

salesforceinterfaceserviceworkerenabled_flag

Set to yes to queue jobs using AWS SQS FIFO

no - not used for REST

Apex API Permissions

Verify required API permissions configured for Salesforce Apex APIs.

Check API Permissions

SELECT * FROM gb_api_permissions WHERE permission = 'InterfaceSalesforceApex:SyncQuote'; SELECT r.name, r.access_type, rap.* FROM gb_role_api_permissions AS rap INNER JOIN gb_roles AS r ON r.role_id = rap.role_id WHERE permission = 'InterfaceSalesforceApex:SyncQuote'; 

Apex API Error Codes

Number

Status

Validation

Validation Message

1

204

No Content

2

No Content - Salesforce Apex Sync Quote failed

3

400

Bad Request

4

403

Forbidden - Salesforce Apex Interface Disabled

5

404

opportunity_number

Opportunity not found

6

422

opportunity_number

Invalid opportunity number specified

7

422

opportunity_number

Value is required and can't be empty

8

500

Internal Server Error

9

500

Salesforce Apex Sync Quote failed - Unable to perform this action! Please try again. If problem persists contact system administrator. Error: Array "Opportunity Number" is 0


Apex REST Endpoints

apexrest/syncquote

Synchronize quote data to Salesforce.

Trigger Events

Called when following functions run in Catch-e:

  • Create

  • Save

  • Apply

  • Accept

Timestamp Tracking

Quotes / Contract "Salesforce By" field shows call timestamp and response.

Suppression Rules

Call suppressed if:

  • API createQuoteWebService used to create quote

  • copyQuote API used to copy quote

When suppressed, Quotes / Contract "Salesforce By" field blank.

apexrest/synccontract

Synchronize contract data to Salesforce.

Trigger Events

Called when following functions run in Catch-e:

  • Accept Quote

  • Copy Contract

  • Edit Contract

  • Create, Edit or Delete Contract Event (where Event triggers update to Contract data, e.g. Driver Change)

Non-Trigger Events

NOT called when following functions run:

  • Contracts / Finance Apply button clicked

  • Contracts / Finance Get Application Status button clicked

  • Contracts / Finance Get Documents button clicked

  • Scheduler / Job executeScript updates

Suppression Rules

Call suppressed if contract edited by running API "Insert or update a record with auditing".


Salesforce Legacy Web Services (SOAP)

For existing Salesforce integrations using legacy web services method.

Note: For new integrations, use Apex method. Legacy SOAP method not recommended for new implementations.

Global Controls Configuration

Configure following Global Controls for legacy web services:

Module

Name

Comment

Value

qt

salesforce_login

Used if interfacing with Salesforce CRM

encrypted

gb

salesforceinterfaceemailonerror

Email address for Salesforce update errors

gb

salesforceinterfaceenabled_flag

Set to yes if interfacing with Salesforce CRM (set to no in Support on refresh)

yes

gb

salesforceinterfaceserviceworkerenabled_flag

Set to yes to queue jobs using AWS SQS FIFO

yes

qt

salesforceloginapex

Host, Client Id, Client Secret details

blank - not used for SOAP

gb

salesforceapexinterfaceenabledflag

Set to yes to use Salesforce Apex

no - not used for SOAP

Queue Processing (Standard Method)

When Quote or Contract saved, transaction record inserted into queue with queued timestamp.

Queue processed one transaction at a time from oldest to newest:

  1. Log in to Salesforce to get session token (if current session token not cached)

    • Session Tokens timeout after 8 hours

    • Current tokens re-used avoiding login

  2. Sleep 1 second

  3. Perform Update Opportunity in Salesforce

  4. Perform Update History for Opportunity in Salesforce

  5. Repeat for next transaction in queue

Queue Processing using SQS FIFO

When Quote or Contract saved, transaction record inserted into SQS FIFO queue.

MessageGroupId Formats

Queued Salesforce operations contain MessageGroupId:

  • qt:salesforce?opportunityid=OPPORTUNITYID

  • qt:salesforce?contractid=CONTRACTID

  • qt:salesforce?quoteid=QUOTEID

Messages with same MessageGroupId processed in FIFO order. Messages in same group always processed one by one, in strict order.

MessageDeduplicationId Formats

Queued Salesforce operations contain MessageDeduplicationId:

  • qt:salesforce:updateOpportunityFromContract/{serialized-parameters}

  • qt:salesforce:updateQuotationHistoryVehicleOptions/{serialized-parameters}

  • qt:salesforce:updateOpportunityFromQuote/{serialized-parameters}

If message with particular deduplication ID sent successfully, messages with same ID accepted but not delivered during 1-minute deduplication interval. Prevents frequent updates for same opportunity/contract impacting queue worker.


Sync Quote with Salesforce Legacy Interface API

Legacy API for Salesforce integration with Catch-e.

Note: For new integrations, Catch-e recommends and prefers Apex method.

Permissions

Nominated 'web-services' role needs permission to run this API.

If not actively using API, leave permission off for better security.

Check permission: Roles / Apis > InterfaceSalesforceLegacy:SyncQuote

HTTP Method

Use HTTP Method: POST

Input Fields

Header

Header should contain 'accept' Key with Value:

  • application/problem+json or

  • application/vnd.catch-e-api.v1+json

Body

JSON

Field Format

Notes

Mandatory

quote_id

Int

Quote ID

Yes

URL Examples

https://api.catch-e.com/gb/interface/salesforce-legacy/sync-quote 

Response Details

204 No Content

Request successful. No response required.

401 Unauthorized

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } 

Not authenticated or token_timeout passed. Re-authenticate.

403 Forbidden

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } 

No permissions for request. Go to System > Roles, enter 'web_services', navigate to Roles / APIs tab, verify permission checked.

422 Unprocessable Entity

{ "validation_messages": { "message": "message for this task" }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } 

Validation failure explanation included.

423 Locked

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Locked", "status": 423, "detail": "Locked" } 

One of records in JSON Body already being edited. Entire batch fails.

500 Unexpected Error

{ "status": 500, "title": "Unexpected error", "describedBy": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "detail": "JSON encoding error occurred: Malformed UTF-8 characters, possibly incorrectly encoded" } 

Query has encrypted fields not decrypted using AES_DECRYPT in JSON response. Decrypt fields in query before adding to table.

patchQuote API Note

Warning: patchQuote request will NOT trigger data pushed to Salesforce. If data from patchQuote needs updating in Salesforce, use API 'salesforceLegacySyncQuote' instead.


AutoGuru Vehicle Export

For complete information about AutoGuru integration jobs, process, and setup steps, refer to AutoGuru documentation page.

Export Business Rules

Records exported via scheduled AutoGuru jobs.

Vehicle Selection Criteria

Contract vehicle data exported if following criteria met:

  • Contract Types / Details "Autoguru Export" checked

  • Contracts / Contract "Reg Number" is not 'ORDER'

  • Contracts / Contract "Contract Start" is today or earlier

  • Contracts / Contract "Suspend Date" is blank or after today

  • Contracts / Vehicle "Autoguru Export" checked

  • Contracts / Vehicle "Build Date" in suitable report format

  • Contracts / Vehicle "VIN": if populated, 17 characters long and not duplicated on another selected contract. Can be blank.

  • Contracts / Vehicle "Manufacturer Name" does not contain commas

  • Contracts / Vehicle "Model Name" does not contain commas

Odometer, Expenses, Budgets Selection

Odometer, Expenses and Budgets data selected based on:

  • Odometer: Valid Odometer record with status = 'posted' or 'history-only'

  • Expenses: Expense record with status = 'posted' or 'history-only' AND linked = 'yes'

  • Budgets: Budget record with status = 'posted' AND on or before end of current month AND linked = 'yes'

AutoGuru Field Mappings

AutoGuru Field

Data Extraction Rule

ContractID

Contracts "Contract ID"

FleetCompanyIdentifier

If contract VIN blank, populated instead. Unique marker for contract in AutoGuru system. Note: booking history will not carry forward if asset re-financed in new contract. Only use if VIN blank because asset has no VIN or cannot be provided.

Vehicle Registration Number

Contracts / Contract "Reg Number"

Year

Contracts / Vehicle "Build Date" - last 4 digits shown as year. Build Date normally Month and Year. Any style holding Year at end acceptable, or field blank. E.g. 8/2024, 08/2024, 8-2024, 8 2024, or 2024.

Make

Contracts / Vehicle "Manufacturer Name". Cannot contain commas.

Model

Contracts / Vehicle "Model Name". Cannot contain commas.

State/Province

Contracts / Vehicle "Rego State"

Odometer Last Read Value

Latest valid Contracts / Maintenance "Odo", or if none, Contracts / Vehicle "Start Odometer"

Service Allowed

T (True). Hard-coded value. Can be set to F (False).

Repair Allowed

T (True). Hard-coded value. Can be set to F (False).

Tyre Allowed

T (True). Hard-coded value. Can be set to F (False).

Lease Type

If Group not 'Lease' or 'Novated', show 0. If 'Lease', show 1. If 'Novated', show 2.

DriverBalanceIncGST

If Group not 'Lease' or 'Novated', set to 0.00. Calculation: Total of invoiced budgets minus Total of maintenance costs. Only budgets and costs where Posting Classes "Autoguru Export" checked selected (by design, only 'M', 'MAINT', 'S', 'T' classes set to yes). Invoiced budgets dated on or before today in 'Posted' status. Maintenance costs not recharged, in 'Posted' or 'History Only' status.

TyreBalance

If Group 'Novated', show 99. Otherwise return "Tyre Allowance" less "Tyres Used". Contract Header "Tyres?" shows these numbers. Contracts / Contract "Tyre Allowance" holds count.


AutoGuru Daily Booking File Structure

Booking File Data Structure and Mapping

Description

Example

fm_maintenance Field

fm_approvals Field

Comments

BookingID

14811111

ignored

externalordernumber

BookingTicketID

16212345

ignored

ignored

TransactionDate

2024-03-03T22:22:57.261Z

invoicedate / odometerdate

invoicedate / odometerdate

ContractId

115667

contract_id

contract_id

PlateNumber

ABC123

ignore

ignore

PlateStateShortName

VIC

ignored

ignored

FMOMerchantAccountId

ignored

ignored

AGAccountId

15238

ignored

ignored

AGAccountName

Paul's Mechanical

ignored

franchise_notes

AGMerchantStoreId

17899

ignored

ignored

AGMerchantName

Paul's Mechanical

description

franchise_notes

InvoiceNumber

L123456

invoice_no

invoice_no

Odometer

156256

odometer

odometer

BookingDetails

Logbook Service 160,000km

description

ignored

BookingValueIncTax

1100

ignored

ignored

BookingValueExTax

1000

ignored

ignored

BookingValueTax

100

ignored

ignored

Payer

AutoGuru

ignored

ignored

BookingPaymentToAGIncTax

1100

If OnChargeIncTax > 0, BookingPaymentToAGIncTax must be same amount

BookingPaymentToAGExTax

1000

partscost / totalcost

ignored

BookingPaymentToAGTax

100

gst_cost

ignored

PaymentDue

03/05/2024 00:00:00+10:00

ignored

ignored

RctiUrl

https://preprod.autoguru.com.au/booking/1207794/rcti/3780581?token=4d325c26-0382-4f5f-915a-e308619ad6bf

ignored

attachment_id

CatcheProductCode

T

postingclassid

ignored

S, M or T only

Quantity

3.0000

quantity

VMRS Code

vmrscodeid

When CatcheProductCode is T, matching Tyre VMRS Code added e.g. T1 (1), T2 (2), etc.

OnChargeIncTax

1100.0000

rechargeflag / statusflag

OnChargeIncTax Recharge Logic

Scenario Value rechargeflag statusflag

Novated

N

Posted

Lease or Fleet Managed when BookingPaymentToAGIncTax = 0

Y

Y

Posted

Lease or Fleet Managed when BookingPaymentToAGIncTax > 0

Y

Y

Recharge

Lease or Fleet Managed when OnChargeIncTax = 0

N

N

Posted

Lease or Fleet Managed when OnChargeIncTax > 0 (matches BookingPaymentToAGIncTax)

N

Y

Recharge


Notes

  • Salesforce integration supports both Apex (recommended for new integrations) and legacy SOAP methods

  • WSDL files environment-specific; verify correct file for deployment environment

  • Global Controls must be encrypted for sensitive credentials

  • API permissions require explicit role assignment; disable if not actively used

  • Queue processing supports both standard and AWS SQS FIFO methods

  • patchQuote API requires explicit legacy sync call if Salesforce update needed

  • AutoGuru export excludes suspended, incomplete, and on-order contracts

  • Tyre balance calculation specific to contract group type (Lease, Novated, Fleet)

  • Build date year extraction flexible; accepts multiple date formats

  • VIN validation critical for booking history continuity; duplicates excluded

  • Product codes limited to S (Service), M (Maintenance), T (Tyre) for AutoGuru export

  • OnChargeIncTax drives recharge flag and status for maintenance records

  • MessageDeduplicationId prevents queue worker overload from frequent same-opportunity updates