Copado Data Deploy for CPQ

Updated 2 months ago by Copado Solutions

Overview 

As part of the Copado Data Deploy feature, Copado has configured pre-built data templates to help you deploy data for several widely-used tools such as Salesforce CPQ:

If you are not yet familiar with data templates, a data template is a configuration file that defines a data structure you want to migrate between Salesforce orgs. For example, in the case of CPQ, you can have a data template for price book, another one for price rule, etc.

These pre-built data templates have been designed to speed up your data deployment process and to save you the hassle of having to deploy different data templates in several steps or deployments, since you can select parent and child records within the main object template to deploy them in one go.

Please note that although you can deploy related records by deploying the main template, you will need to create a data template for each of the records you want to deploy and select them within the main template.

When you download a pre-built data template, the template is exported in a JSON file that you can then import to any of your Salesforce orgs. This JSON file includes the template of the main object as well as those for each of the related objects selected.

Once the templates have been imported, open each imported template record to select the external Id field since this is not included by default. This field prevents you from inserting duplicate records when deploying templates between orgs.

Since every CPQ configuration is different, you may need to make some adjustments to the data templates to ensure they match your requirements.

Important Considerations Before Deploying

When working with data deployments, there are some things you should bear in mind to guarantee a successful deployment, even more so when deploying CPQ data given its complex structure. Here is a list of the most important things to consider:

  • You need to disable CPQ triggers in the destination environment prior to deploying. In order to do so, follow the steps below:
  1. Navigate to Setup > Installed Packages > Salesforce CPQ > Configure.
  2. Open the Additional Settings tab and flag the Triggers Disabled checkbox:

  • Make sure you have the same version of Salesforce CPQ installed in the source and destination environments.
  • If you are deploying to or from a production organization, make sure there is a user with a CPQ license in that production organization.
  • Make sure Salesforce CPQ global picklist values match in the source and destination environments.
  • The user you use to create the org credentials for the destination orgs needs to have write access in all the objects included in the data templates.
  • Assign the Salesforce CPQ Admin permission set to the org credential user.
  • If you are using multi-currency in your source organization, make sure this is also enabled in the destination organization and  currency ISO codes match in your source and destination organizations. 
  • In your Salesforce destination organization, ensure the Standard Price Book is active.
  • Create external Id fields in all your CPQ objects. 
  • Import the desired data templates into Copado.

For more information about best practices to keep your data clean and ready to be deployed, check out the article Copado Data Deploy Best Practices.

Deployment 

Salesforce CPQ consists of objects which contain reference data, such as products or price books;  objects including transaction data, such as opportunities, and objects for internal use. For this reason, CPQ data should be migrated following a specific order. Here are some guidelines about the order in which CPQ data should be deployed:

  • When migrating all CPQ records to an org, deploy the Price Book template first, followed by the Products, Price Rules, Product Rules, Quote Terms and Quote Templates.
  • If you only need to deploy one type of CPQ records (e.g. only Price Rules), simply deploy this single template.
  • When deploying price records (PricebookEntry), do not check the Product Code and Product Name fields in the PricebookEntry template since these are not updatable.
  • If the CPQ Triggers are not disabled, you may experience errors with Custom Conditions linked to the Price Rules template given that these records need to be upserted following a custom logic. To avoid this issue uncheck the Conditions Met field in the Price Condition template the first time you execute the deployment to avoid condition validations, redeploy it again with this field selected.

Post-Deployment Steps

Once the deployment has been successfully completed, it is important to re-enable the triggers you deactivated prior to deploying.

In order to re-enable CPQ triggers in the destination, follow the steps below:

  1. Navigate to Setup > Installed Packages > Salesforce CPQ > Configure
  2. Open the Additional Settings tab.
  3. Deselect theTriggers Disabled checkbox.
  4. Click on Save.
  5. Once you have re-enabled the trigger, don’t forget to run Salesforce CPQ post install scripts to detect and fix any potential issues with the deployed records. 


How did we do?