Skip to main content

Sync Product and Pricing Data

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the advantages of synchronizing product and pricing data between B2B Commerce and Salesforce CPQ.
  • Describe the process of synching products and pricing data.
  • Identify the product and pricing limitations of the connector.
  • Describe considerations for recurring data sync and maintenance.

Single Source of Truth

Although B2B Commerce and Salesforce CPQ live on the same platform, each cloud has its own data model for storing product and pricing details.

Data model diagrams of product and pricing objects for CPQ and B2B Commerce.

Unfortunately that means a lot of similar data is maintained in two places. This creates work for pricing managers who need to keep product and pricing data consistent across channels. And it’s all too easy for the data to get out of sync. Thankfully, the CPQ & B2B Commerce Connector is here to help. The connector is designed to synchronize data from the CPQ product and pricing objects to the respective B2B Commerce objects, in a one-directional push: Product2 to CC Product, Price Book to CC Price List, and Price Book Entry to CC Price List Item.

With this method, the pricing manager maintains products and pricing within CPQ records, then the relevant data is duplicated into B2B Commerce records where the commerce admin enriches it with details about Product Categories for Storefronts, search engine optimization, and so on. The data does not flow backwards into CPQ records, so don’t make pricing changes to B2B Commerce records, to avoid introducing inconsistencies. That also means you don’t have to create fields on the Product2 object to house B2B Commerce specific data.

The connector helps even if you have an Enterprise Resource Planning (ERP) system that acts as the main parts and pricing repository. In that scenario, integrate the ERP with the CPQ objects so that data flows from ERP to CPQ, and then to B2B Commerce through the connector. With this setup, you don’t integrate the ERP directly to the B2B Commerce object.

Mechanics of Product and Pricing Sync

The task of maintaining product and price data for Ursa Major Solar is now much simpler thanks to the CPQ & B2B Commerce Connector. That said, there’s still a process involved and considerations to keep in mind when synchronizing products. Let’s look at the steps necessary to create a basic product with simple pricing, then synchronize its data.

Step 1: Create a Product2 Record for CPQ

Setting up a product is mostly unchanged, with the exception of a few important fields. First, there’s a field added by the connector named B2B Storefront. The connector uses this field to populate the Storefront field on the CC Product record. Your new product only syncs if B2B Storefront has a value. Be aware that the receiving Storefront field is sometimes configured to accept only its picklist values. In that case, it’s vital that the B2B Storefront field is set to a value that exists in the Storefront picklist, otherwise the sync fails.

The Active checkbox on the CPQ Product also determines how a product is synced. Your new product only syncs when Active is checked. It acts as a safeguard so that the connector doesn’t accidentally sync a product that’s not ready. Later in the product’s lifecycle, if the Active checkbox is unchecked, the connector updates the Status field on the CC Product record from “Released” to “Blocked.”

Step 2: Create a Price Book Entry

Technically you can sync a product without a price, but doing so generates errors that eventually have to be reconciled. So we recommend adding price book entries before starting a product sync. If your price book supports multiple currencies, the connector synchronizes only one currency per CC Price List. If you need to synchronize multiple currencies, create CC Price Lists for each one, designating the currency on the price list itself.

Step 3: Flag the Product for Sync

Once the product and pricing data is ready, check the Sync Product to B2B field on the Product2 record. The connector takes it from here, creating CC Product, CC Price List, and CC Price List Item data in B2B Commerce to match the CPQ data. At the same time, it populates lookup fields on the new records that tie back to the source data. For example, the CC Product object has a field named Source_Product__c that looks up to Product2.

It’s at this point the commerce admin at Ursa Major enriches the CC Product records with B2B Commerce-specific information. The connector does not automate B2B Product Entitlements, so you have to associate Account Groups to Price Lists as part of the enrichment process.

Step 4: Refresh Product Index

After each sync, be sure to refresh the product index in B2B Commerce so pricing updates appear in the storefront.

And with that, you’ve finished syncing product and pricing data across clouds. As part of the sync, the connector updates custom fields named CC_LastSyncDate__c, which are found on each source CPQ record as a way of monitoring successful syncs. Similarly, the CPQB2B Log object has a LastSync_Date__c field. Consider building some form of automated notification based on log records in the event a sync fails.

Overall, simple products with simple pricing are easy to synchronize between CPQ and B2B Commerce via the connector.

Supporting Other Product and Pricing Types

Salesforce CPQ and B2B Commerce each have their own specialized product types and pricing methods designed to support more complex business needs. For example, each has a method of handling volume-based pricing. CPQ uses discount schedules, B2B Commerce uses Tier Pricing. In order to keep complex products like these in sync, extend the connector beyond its out-of-the-box capabilities. You can modify the code to build upon the connection it already creates between Product2 and CC Product records.

To support additional product types, extend the data model and connector to synchronize a Product Type field between the Product2 and CC Product records. Use this field to indicate what kind of special treatment the extended connector applies. In the case of volume-based pricing, the pricing manager sets Product Type to “Tier Priced Product.” Then, extend the connector to evaluate the Product Type, and when appropriate, publish the known discount schedule data from the source product in CPQ to the Price Tiers field on the CC Price List Item record in B2B Commerce.

This is just one example of how you can extend the connector to handle a more complex product. You can also synchronize other product types by extending the connector.

CPQ Product / Pricing B2B Commerce Product / Pricing

Discount Schedules

Tiered Pricing Products

Bundles

Kits / Bundles / Dynamic Kits

Percent of Total

Product with Service Layer customization

Subscription

Product with Subscription Product Term

While you can sync bundles with the connector, avoid CPQ bundles that use many options, constraints, or product rules. You can extend the connector to handle complicated bundles, but these require much more customization than other product types. Also, there are some product and pricing methods that are not supported with the connector, such as CPQ’s Block Pricing. In those cases, a sales rep must be involved to create the quote and bring it to an order since there is no self-service version of the product.

Plan your Data Sync Strategy

An important part of your overall solution design is your approach to synching primary data. Synchronization is typically handled in bulk, so be mindful of governor limits. The connector gives you the option to use platform events, scheduled batch classes, or a queueable framework for synchronization. Your approach depends on factors such as volume of data, frequency of changes, integrated systems and other data flows, and performance requirements.

Since B2B Commerce records will likely be created through an automated synchronization process, consider creating a validation rule that prevents the manual creation of CC Product and CC Price List Item records.

Finally, there’s one pricing-related element you should not use the connector to synchronize, and that’s discounting and promotions. Each channel has its own way of handling these adjustments in the transactional data, so there’s no need to account for them in the primary data.

Having consistent product and pricing data across channels is not just important for pricing managers, it’s also a prerequisite for implementing other cross-cloud use cases such as the one you learn about in the next unit: converting a storefront shopping cart into a CPQ quote.

Resources

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities