# Page 3

Error: Invalid ID - Supplied value is not a valid number due to missing classRef in QBO

1\. Summary / Introduction

The error “Invalid ID – id should be a valid number. Supplied value: \[ClassRef]” occurs during sync when a classRef value defined in the mapping does not exist in the client’s QuickBooks Online (QBO) account. This article explains how to identify and resolve the issue by verifying classRef values in QBO and updating the mapping accordingly in DBSync.

2\. Problem / Issue

When syncing records from Salesforce (or any source system) to QuickBooks Online via DBSync, the sync fails with the following error message:

Error: Invalid ID. ID should be a valid number. Supplied value: SS USA

This typically indicates that the classRef value being passed is not recognized by QBO, often because the corresponding class does not exist in the client’s QBO account.

3\. Environment / Applies To

Product/Service: DBSync Cloud Workflow

Versions: All versions supporting Salesforce-QBO integration

Operating Systems: Platform-independent (Cloud-based)

Databases / Connectors: Salesforce, QuickBooks Online

Applicable To: ClassRef Mapping during Invoice or Transaction Sync

4\. Solution / Steps

Prerequisites:

Admin access to DBSync

Access to the client’s QBO to verify existing ClassRef values

Mapping access for the integration project

Steps:

Step 1:

Log in to DBSync and open the Integration Project used for syncing data to QBO.

Step 2:

Go to the Field Mapping section where ClassRef is mapped.

Step 3:

Check the logic used for mapping the business unit to the QBO class. You’ll likely find something like:

Old Mapping:

String val = PARENTVALUE("new\_businessunit");

String ret ="";

if(val.equals("100000000"))

&#x20; ret ="SS CAN";

else if(val.equals("100000001"))

&#x20; ret ="SS USA";

else if(val.equals("100000002"))

&#x20; ret ="RingHX";

else if(val.equals("100000003"))

&#x20; ret ="Ontario Control Cables";

return ret;

Step 4:

Log in to the client’s QBO account → Navigate to Settings > All Lists > Classes and verify the available class names.

Step 5:

Update the mapping by removing the non-existent classes:

New Mapping:

String val = PARENTVALUE("new\_businessunit");

String ret ="";

if(val.equals("100000000"))

&#x20; ret ="SS CAN";

else if(val.equals("100000002"))

&#x20; ret ="RingHX";

return ret;

Step 6:

Save the mapping and re-run the sync.

Verify that the previously erroneous records are now syncing successfully.

5\. Workaround (If Applicable)

If immediate access to QBO is not available:

Temporarily hardcode a valid class that exists in QBO (e.g., SS CAN) for testing.

Inform the client to confirm valid classes from their QBO account.

Caution: This workaround may misclassify records. Not recommended for production use.

6\. Root Cause

The sync logic was referencing class values (“SS USA” and “Ontario Control Cables”) that no longer exist or were never created in the client’s QuickBooks Online account. When QBO received these invalid references, it returned an Invalid ID error, halting the sync.

![](https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FNUhBOq7VArd6iZtTqQ5j%2Funknown.png?alt=media\&token=46741137-789f-4ddf-a7fc-da88f296dcf0)

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydbsync.com/cloud-workflow/troubleshooting/page-2/page-3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
