Skip to main content

How to deal with out of sync External IDs on Revenue Cloud (CPQ & RCA) records using the Gearset template

Sometimes your External IDs can get out of sync if changes are made directly in your environments, learn how to align them to avoid any deployment errors.

Claudia McPhail avatar
Written by Claudia McPhail
Updated today

💡 A note on terminology: In this article, Revenue Cloud refers to both Salesforce CPQ and Agentforce Revenue Management (formerly RCA).

Why do I need External IDs?

To deploy Revenue Cloud configuration data (like Prices, Products, and Rules) just as easily as you deploy metadata, Gearset needs a way to track those records across different environments.

In Salesforce, a record’s "Salesforce ID" changes whenever it moves to a new org. Without a consistent ID Gearset wouldn't know that "Product A" in your Sandbox is the same as "Product A" in Production.

The unique External ID that Gearset adds to all of your Revenue Cloud data (and keeps unique, using de-duplication flows) let's us recognise the same record as it moves between your orgs, and the Salesforce Record ID changes.


In the example below you can see a comparison where Gearset has mapped the relationship between Product records, and the custom object changes that affect them. All of these changes will be deployed together, and Gearset will sequence the deployment to ensure success.


Utilizing Gearset External IDs provides several critical advantages:

  • Dependency Mapping: Gearset automatically identifies and maps relationships between records and the metadata they rely on. By understanding these relationships, Gearset can combine data and metadata into a single deployment package, ensuring the target org remains functionally consistent.

  • Precise Deployments: Gearset allows the user to select specific combinations of configuration, such as specific Products and their related Price Book Entries.

  • Deployment Sequencing: Gearset automatically determines the correct order of operations, preventing deployment failures caused by missing parent records or related metadata.

The Gearset External ID acts as a unique identifier. Much like a unique API name allows Gearset to track a metadata component across environments, the External ID allows Gearset to recognize the same record as it moves through your orgs, even though the underlying Salesforce Record ID changes upon insertion into a new org.

Do I need to rerun the wizard every time I create a new record?

No, Gearset automatically assigns IDs to new records during the deployment process.

When should I rerun the wizard?

Only if you’ve added new objects (like a new custom object or a new Revenue Cloud module) that need an External ID field created. Rerunning it is safe and won't change your existing IDs.

Why can External IDs fall out of sync?

External IDs falling out of sync isn't unheard of, it can happen for a few reasons although most common is the same record being created in more than one environment, or being moved using a non Gearset tool.

Gearset derives the External ID from the Salesforce Record ID, the same record created in two different orgs (by hand or by a non-Gearset deployment) will have a different Salesforce Record ID, and therefore different Gearset IDs.

How can I sync my External IDs?

If your comparison looks like this, you may have out of sync External IDs.

This is straightforward to fix (and indeed Gearset is developing a wizard to re-sync external IDs automatically) using Gearset.

Before you begin, start by deciding which of your orgs is the "source of truth" for your IDs. Syncing the IDs requires one orgs IDs to be overwritten by the other, so choose one of your orgs as the source. This would typically be the org in which you create your Revenue Cloud configuration.

Navigate to the data deployment page in Gearset, and select one of our pre-made templates. Select your chosen source, and the org that you need to sync with it.

The template will load, allowing you to deactivate any flows that may be affected by your External ID updates. It will then bring you to a screen where Gearset will show you the deployment steps it is about to take (updating the External IDs in the target based on the values from the source).

Clicking 'deploy data' will kick off the deployment process, and you can watch the steps complete on screen.

When you re-run your comparison between the same source and target you should see your records that exist in both source and target as 'no-difference' or 'changed'.

Call for feedback

We want to hear your experience with Revenue Cloud deployments and External IDs, so please get in touch over the in-app chat with any feedback or questions!

Did this answer your question?