1.1 Batch Reference
The connector uses the following batch classes. All are findable in Setup → Apex Jobs.
|
Batch Class |
Direction |
Entity |
|---|---|---|
|
|
SF → QBO |
Customer (individual record sync) |
|
|
SF → QBO |
Invoice |
|
|
SF → QBO |
Product / Item |
|
|
SF → QBO |
Vendor |
|
|
QBO → SF |
All Customers (full pull) |
|
|
QBO → SF |
All Invoices (full pull) |
|
|
QBO → SF |
All Accounts (full pull) |
|
|
QBO → SF |
All Payments (full pull) |
|
|
QBO → SF |
All Products (full pull) |
|
|
QBO → SF |
All Vendors (full pull) |
|
|
QBO → SF |
Customer (webhook-triggered) |
|
|
QBO → SF |
Invoice (webhook-triggered) |
|
|
QBO → SF |
Account (webhook-triggered) |
|
|
QBO → SF |
Product (webhook-triggered) |
|
|
QBO → SF |
Payment (webhook-triggered) |
|
|
QBO → SF |
Vendor (webhook-triggered) |
|
|
Internal |
Refresh Token Rotation |
|
|
Internal |
Auto-match QBO customers to SF records |
|
|
QBO → SF |
QBO Classes |
|
|
QBO → SF |
Tax Rates |
1.2 Batch Does Not Start / Stays in "Queued" State
Cause: Each batch class has a duplicate-run guard — if an instance of the same batch is already Processing, a new invocation immediately returns an empty scope and does nothing. This prevents concurrent runs against the QBO API rate limit.
Fix:
-
Go to Setup → Apex Jobs and find any
Processinginstance of the batch. -
If it is genuinely stuck (running for more than 30 minutes with no progress), click Abort on the stuck job.
-
Then re-trigger the batch from the Admin Setup UI or via Anonymous Apex.
1.3 SF → QBO Batch Records Stuck in "Failed"
Symptom: Quickbooks_Customer__c (or other) records have Status__c = 'Failed' and Process_via_Batch__c = false.
Cause: The batch sets Process_via_Batch__c = false after any failure so the record is not retried automatically. The AcceptedStatusFields common setting controls which statuses are eligible for batch pickup — by default this is 'Awaiting Salesforce Sync,Failed'.
Fix:
-
Read
Status_Description__cto identify the root cause. -
Fix the underlying issue (credentials, company, field mapping).
-
Set
Process_via_Batch__c = trueandStatus__c = 'Failed'on the affected records to re-queue them (theAcceptedStatusFieldssetting includesFailedby default, so they will be picked up on the next batch run). -
Alternatively, use the Retry button in the QuickBooks UI if available for the record type.
1.4 QBO → SF Full Pull Batch Pulling Wrong Records
Cause: Each BatchAllQB* class supports a custom WHERE clause stored in CM_QB_Connector_Settings__mdt metadata. For example, BatchAllQBSFCustomerSync_WhereClause filters which QBO customers are pulled. If this is misconfigured, it may exclude records you expect.
Fix:
-
Go to Setup → Custom Metadata Types → CM QB Connector Settings.
-
Find the record named
BatchAllQBSFCustomerSync_WhereClause(or the relevant entity variant). -
Confirm the
Value__cfield contains a valid QBO WHERE clause (e.g.,WHERE Active = true) or is blank to pull all records.
1.5 Last Sync Config Not Updating
Symptom: The Last_Sync_Config__c JSON field on Quickbooks_Company__c does not reflect the latest sync date/status.
Cause: Last_Sync_Config__c is only updated in the finish() method of the full-pull batches (BatchAllQBSFCustomersSync, BatchAllQBSFInvoiceSync, etc.), not the individual SF→QBO sync batches. If the finish() method throws an exception, the config is not written.
Fix: Check the debug log for the finish() execution of the relevant batch in Setup → Apex Jobs → [Job ID] → View Debug Log.