Skip to main content

Resolving CPQ deployment error: "InvalidBatch: Field name not found: BasedOn.GearsetExternalId__c"

How to fix the batch deployment error when deploying CPQ Product2 records where GearsetExternalId__c is missing from the BasedOn object in the target org.

Written by Chris Mead

If you see this error when deploying CPQ records:

Batch failed with exception code: 'Unknown'. Salesforce reported 'InvalidBatch: Field name not found: BasedOn.GearsetExternalId__c' while processing 'Product2'

This means GearsetExternalId__c is missing or unpopulated on the BasedOn object in your target org. BasedOn is a junction object used in CPQ (and Revenue Cloud / ARM) configuration. Even if GearsetExternalId__c exists on Product2, it also needs to be set up on every related object - including BasedOn.

Why this happens

The most common cause is a sandbox refresh. When you refresh a sandbox, the External ID values on records are reset. Gearset can't use them to match records between orgs, which causes the deployment to fail.

Other causes include:

  • The External ID wizard was never run on the target org

  • The wizard was run, but not on all relevant orgs (for example, a newly connected sandbox)

How to fix it

Re-run the Gearset External ID setup wizard on both your source and target orgs.

  1. Go to My Connections > Salesforce orgs.

  2. Find your target org and click the dropdown arrow next to it.

  3. Click Rerun external ID setup.

  4. In the next menu, select Rerun setup wizard


    Re-running the Gearset External ID setup wizard won't affect your existing external ID's, and this is safe to do.

  5. Repeat for your source org.

Once the wizard finishes, retry your deployment. You don't need to create a new deployment package, you may instead retry the failed deployment.

Preventing this in the future

Re-run the External ID wizard after every sandbox refresh. It won't affect existing IDs, so it's safe to run at any time.

If you have any other queries on this, please get in touch with us via our in-app chat

Did this answer your question?