Skip to main content
Solving mismatches in Gearset external IDs with the data seeding tool

Solving mismatches to allow Gearset to compare CPQ configurations

Antonio Sale avatar
Written by Antonio Sale
Updated over 7 months ago

In order to deploy CPQ changes between your chosen source and target, the first step is to have the Gearset external ID field present in your orgs. Even after this first configuration, before you're able to start comparing and deploying your CPQ configuration between environments, it's critical that you first get your Gearset External ID aligned in your environments. The cleanest way to make sure your full copy sandbox and production org CPQ configuration are perfectly in sync and have the Gearset external ID, is via a full copy sandbox refresh, after having run the external ID setup on your production org first.

Unfortunately this is not always possible, as you might have work in progress in your sandbox, and refresh is not possible. There are different scenarios:

  1. Records that were in Prod during the last refresh. These are not going to be a problem because they will have the same Salesforce ID, and therefore the same Gearset External ID

  2. Records that are only in Prod, or only in the sandbox (UAT for example). These will not be a problem either, because the setup will assign the External ID if the org where they were created. When deployed, they will bring the Gearset External ID value to the target

  3. Records that were created in PROD, then deployed to UAT before Gearset CPQ was adopted (ex: with Data Loader). Or the same record that was manually created both in PROD and in UAT. The problem with these records is that they have different Salesforce ID in source and target, so the same record will have different Gearset External ID in source and target after the CPQ setup. These records are identifiable in a comparison because they appear both as New and as Deleted

The Data Seeding tool can be used to solve mismatches in Gearset external IDs. The only condition for the use of this method is that you have an alternative External ID field to match existing files, other than the Gearset External ID field. Please take into consideration that there is no roll back mechanism for data deployments, so we recommend trying this process with a small number of records first.

Let’s assume that I have the same Product Rule in UAT and PROD, and I want to align the Gearset External ID, keeping the one from PROD.

  • Open PROD and pick the Salesforce ID of the Product Rule (ex: No warranty extension for new customers, in the screenshot above)

  • In Gearset, navigate to the Data Deployment section of the menu on the left, and select Configure and Deploy

  • Select PROD as source (left) and UAT as target (right)

  • At the first step of the configuration, select Product Rule on the left side, and filter by Salesforce Id on the right side (it can be any other field)

  • At the second step of the configuration, it is very important that you select the option Update existing records, because you don’t want to create new records if a match is not found. It is then necessary to select the fields to use for the match: it has to be an External ID field (or a combination of more), populated with unique values that can actually match the records in source and target. It cannot be the Gearset External ID, and absolutely not the Salesforce ID, as we already know it does not match in source and target. On the right side you can find a list of related objects: you can deselect all of them and keep only the CPQ ones that you actually need to update (if any).

  • Before going to the next step, make sure you click on the small arrow to the right of the Next button, and select Exclude fields

  • For each object selected, exclude ALL fields except the GearsetExternalId__c, which is the only one we want to touch

  • At the next step clean the selection for masking, which is not needed in this case

  • Next comes the View and disable rules step, which can be skipped too, because there should not be any Validation Rules, Triggers or Flows affecting this deployment.

  • Review the deployment summary and click on deploy data. After the deployment, the Product Rule will appear only once in the comparison, as No Difference. And the GearsetExternalId will match in source and target:

Now this configuration focused on fixing a single record, but you can select the entire object at the first step, without any filter. The next steps will be the same, and it is equally important to select the Update option, to pick a valid External ID for matching, and exclude all fields from the deployment except the GearsetExternalId.

You might have noticed a template available in Gearset out of the box, that is dedicated to syncing external IDs in CPQ. This is going to help you with the selection of CPQ object, but only keep selected for the objects with mismatches, ideally just filter the mismatched records. We also strongly recommend double checking all the next steps of the configuration, based on the steps described in this article, as the same template might have different results on different orgs (for example if your orgs have Custom Objects, they might appear as selected for deployment in the related list at the configuration step 2).

Did this answer your question?