Master CPQ Twin Fields in Salesforce through practical examples and unlock greater flexibility and efficiency in your data management process.
In this article, we’ll introduce you to a powerful but often overlooked feature of Salesforce CPQ: Twin Fields. Through practical examples, we'll explore how Twin Fields and Special Fields in Salesforce CPQ can provide greater flexibility and efficiency in data management, replicating values between different objects and unlocking advanced package features.
Here are our 5 key takeaways:
Twin Fields in Salesforce CPQ allow the transfer of custom field values between paired objects upon the creation of the second object, which surpasses the capabilities of Quote Sync. These features are particularly useful in large data organizations, allow for data mapping across supported objects and reducing the need for customizations. Twin Fields have certain limitations, including the inability to map Standard Fields and the necessity for exact API names and matching field types. Special Fields, another feature of Salesforce CPQ, can be created to unlock advanced package features, allowing for more customization. Twin Fields and Special Fields are valuable tools for data mapping, but require understanding and careful implementation to fully leverage their capabilities. Twin Fields vs. Quote Sync Today we are going to talk about one of the most underrated features CPQ has that people should know more about: Twin Fields. We’re also going to mention their cousin: Special Fields.
When we first heard about this feature it reminded us of Quote Sync on Sales Cloud. In fact, Twin Fields and Special Fields bring much more features to what Quote Sync supports. Normally, Quote syncing copies values and products from the Opportunity record it was created from in terms of standard fields and line items.
Understanding the Limitations of Quote Sync However since you can have more than one Quote linked to an Opportunity record, you can only sync one Quote at a time and you cannot sync custom line item fields as of yet. (By the way, you can vote for this feature here ).
You also cannot sync products that have an inactive list price or Pricebook or Product. You would need to edit them as active or delete them if they’re selected as archived. One common error is having an inactive currency left in a multi-currency org and sync a record with that currency. If you have any approval processes currently pending on a quote, you cannot sync another one until the process interview finishes executing.
The Mechanism of Salesforce CPQ Twin Fields In CPQ, certain pairs of CPQ objects pass custom field values from the first object to the second object when the second object is created. The values pass if the custom fields are editable, have matching field types, and have matching API names. We call these field pairs “twin fields.” You can one way map these values between supported objects, including custom fields. You would need to have a Read access on the source field and Edit access on the target field. Standard fields can’t be mapped between objects.
The Functionality of Twin Fields with Different Objects Objects in Column 1 of this table pass field values to custom fields with matching types and API names from the objects in column 2.
table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%;}td, th { border: 1px solid #dddddd; text-align: left; padding: 8px;}tr:nth-child(even) { background-color: #dddddd;}
Column 1 Column 2 Contract Opportunities made from amending or renewing the contract Service Contract Opportunities made from amending or renewing the service contract Opportunity Products Quote Line Salesforce CPQ maps from opportunity products to quote lines only forstandalone products and only when opportunity products have been created before a sales repcreates the opportunity’s first primary quote. Product Quote Line Product Option Quote Line If a product and product option both have the same field as a relatedquote line, the quote line field inherits the value of the product optionfield. Quote Order The quote’s Payment Terms field is an editable picklist field, while theorder’s Payment Term field is restricted to a global picklist value set. If an admin adds acustom picklist value to the quote’s Payment Term field, and then a sales rep order thequote, Salesforce CPQ encounters an error. Quote Line Order Product Quote Line Opportunity Product Salesforce CPQ maps twin field values from the quote line to theopportunity product when the quote line is created and any time that the quote line recordis updated. Quote Line Subscription Quote Line Assets Quote Line Contract Line Item Subscriptions Quote Line On amendment quotes, quote lines inherit twin field values from the firstsubscription record, not any amended subscriptions made from that record. Contract Line Item Quote Line Order Product Invoice Line Asset Quote Line Salesforce CPQ maps from the asset back to the quote line only duringamendment and renewal processes when quote lines are generated from assets.
.ap3w-embeddable-form-64ba95bcfaca41790475dc98{box-sizing:content-box;width:100%;font-size:16px;max-width:850px;max-height:100%;overflow:auto;background-color:#f4f6fb;border:2px solid transparent;box-shadow:0 0 10px 3px rgba(0,0,0,0);z-index:unset}.ap3w-embeddable-form-64ba95bcfaca41790475dc98:before{content:' ';display:block;position:absolute;pointer-events:none;left:0;top:0;width:100%;height:100%;opacity:0%;background-image:url();background-position:center center;background-size:cover;background-repeat:no-repeat}.ap3w-embeddable-form-content{margin:auto;padding:32px}.ap3w-embeddable-form-64ba95bcfaca41790475dc98-rounded{border-radius:12px}.ap3w-embeddable-form-64ba95bcfaca41790475dc98 .ap3w-text{margin-bottom:16px}.ap3w-embeddable-form-64ba95bcfaca41790475dc98 .ap3w-text *{padding-bottom:5px}.ap3w-text-64ba95bcfaca41790475dc98{position:relative;margin:0;margin-bottom:16px;word-wrap:break-word}.ap3w-text-64ba95bcfaca41790475dc98 *{margin:0;padding-bottom:8px}.ap3w-text-64ba95bcfaca41790475dc98 p{text-transform:unset;text-decoration:unset;text-indent:unset}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h1"]{font-family:Hind,Helvetica;font-size:30px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h2"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h3"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h4"]{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h5"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h6"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="large"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="small"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98{position:relative;margin:0;margin-bottom:16px;word-wrap:break-word}.ap3w-text-64ba95bcfaca41790475dc98 *{margin:0;padding-bottom:8px}.ap3w-text-64ba95bcfaca41790475dc98 p{text-transform:unset;text-decoration:unset;text-indent:unset}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h1"]{font-family:Hind,Helvetica;font-size:30px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h2"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h3"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h4"]{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h5"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="h6"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#433efe;font-weight:700;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p{font-family:Hind,Helvetica;font-size:16px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="large"]{font-family:Hind,Helvetica;font-size:20px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-text-64ba95bcfaca41790475dc98 p[data-size="small"]{font-family:Hind,Helvetica;font-size:14px;line-height:1.2;color:#333333;font-weight:400;font-style:normal}.ap3w-form-input-64ba95bcfaca41790475dc98{position:relative;margin-bottom:20px}.ap3w-form-input-64ba95bcfaca41790475dc98 input{margin-top:8px;box-sizing:border-box;width:100%;background-color:#FFFFFF;border:1px solid #000000;color:#000000;outline:none;font-family:Hind,Helvetica;font-weight:400;font-style:normal;font-size:16px;line-height:1.2;padding:10px 16px;resize:none;border-radius:4px}.ap3w-form-input-64ba95bcfaca41790475dc98 .ap3w-form-input-label{font-weight:bold;color:#000000;font-family:Hind,Helvetica;font-size:16px;line-height:1.2}.ap3w-form-button-64ba95bcfaca41790475dc98 button{position:relative;cursor:pointer;padding:10px;font-weight:bold;outline:none;border:2px solid transparent;color:#ffffff;background-color:#01b272;font-family:Hind,Helvetica;font-size:16px;line-height:1.2;border-radius:4px;flex:1}
Utilizing Twin Fields in Data Management In terms of where you would need to use Twin Fields depends on if you regularly update the same values from an object via automation or with Apex in Salesforce. Instead of building these customizations you can use Twin Fields to map data across supported objects and yourself platform resources. This feature can especially be a lifesaver in a large volume data org. A great example of using a Twin field is when you have a field value copied from a Product copied across all Quote Line Items it’s generated from. This feature also does not require you to activate it on setup. You can simply use it by following the conditions listed above.
Understanding the Limitations of Twin Fields The potential drawbacks for this mapping is that you need to work with standard objects since Custom Objects are not supported and check the objects you will be using are supported. You need to also have the exact API name, not the labels. One common mistake is to have different field types since this is also not supported.
Salesforce CPQ Twin Fields and Bundle Configuration When a bundle is configured, objects in Column 1 transfer their values to the emerging new quote lines. When you access the configurator to reconfigure the bundle, Salesforce CPQ sets product options and configuration attribute values based on matching field values from their related quote lines.
Note: If you mark a bundle a Favorite and then add that favorite bundle to the quote line editor, it won't seize any twin field values.
Twin Fields Troubleshooting Tip: If your twin fields are not mapping from one object to another, go to Setup>Quick Find>Installed Packages and click the Configure link next to the Salesforce CPQ package. Then, go to the Additional Settings tab and try taking the "Post Install Steps" by clicking Execute Scripts and retesting your twin fields. Source : (Also shoutout to John Garvens!)
Another key point is that twin fields are populated only upon record creation, so editing the source will not copy the value to it’s target.
The below diagram shows the mapping direction between Twin Fields on various objects that happen in Salesforce CPQ and Salesforce Billing at certain automation.
Special Fields in Salesforce CPQ We also need to talk about Special Fields here which are fields you can create to unlock advanced features of the CPQ package. Here’s a list of CPQ Special Fields you can use to aid your CPQ implementation.
Configuring Special Fields for Quote Customization For example you want to customize Quote fields in the Quote Line Editor for different users: Can the 'Line Editor' field set on Quote be customized for different users? This is for Quote, not Quote Lines. The desired outcome is one group of users see a certain set of Quote fields, whereas another group see different Quote fields when configuring a Quote.
The answer is yes: With the Salesforce CPQ Special Field , HeaderFieldSetName, you can create a field on the quote object to dynamically display a specific quote field in the quote line editor. You can choose to control the quote field set that is displayed by using a formula field or you can allow users to make their own selection by using a picklist field.
Here are the necessary steps:
Navigate to the Quote Object. Create new Field Sets as necessary. Create a New Picklist Field on the Quote Object. Set a Field Label. Set Field Name to HeaderFieldSetName. Input picklist values, these must be the API names of the Field Sets you created on the Quote Object (Remember: Field Set API Names do not contain "__c"). Return to the Quote Object. Edit the Line Editor Field Set and include the new field. Include the HeaderFieldSetName field on all field sets in the picklist. Click Quick Save. Notice the Field Set has changed. NOTE:
"Quick Save" must be clicked in order for the user to see the change of the quote line Quote fields. In addition, setting the picklist value back to "--None--" and clicking "Quick Save" will return the UI to the "Line Editor" Field Set. If the HeaderFieldSetName field is not selected in the field sets or displayed in the quote line editor, the value can be edited from the quote record. Invalid field values used in the HeaderFieldSetName will result in zero fields displayed in the quote line editor. Understanding Each Special Field table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%;}td, th { border: 1px solid #dddddd; text-align: left; padding: 8px;}tr:nth-child(even) { background-color: #dddddd;}
Field Object/Location Data Type Description AdditionalDiscountUnit Quote Line Picklist The value entered for this picklist field will change the unit of an additional discount entered on the Quote Line. Default recommended picklist values are Percent, Currency, Unit, and Total. AdditionalInstructions Product Feature Text Create a text field with this name and populate it on a given Product Feature record, and it will display the instructions/help text to the user when configuring the bundle. ApplyAdditionalDiscountLast Quote Formula as number Apply the 'Additional Discount' last in the price waterfall (Internal Pricing Logic). ApplyPartnerDiscountFirst Quote Formula as number ApplyPartnerDiscountFirst calculates the partner discount off List Price, then any automatic discounts, and manual additional discounts last. ApprovalsArchived Quote Formula as number This field can be set to a value of 1 to prevent approval records from being deleted from the approvals Related List when using advanced approvals. ChannelDiscountsOffList Quote Formula as number ChannelDiscountsOffList calculates all discounts off List Price without calculating them sequentially. ChannelDiscountsOffList Quote Formula as text Allows you to populate with a Salesforce ID from an account that contains a Contracted Price you would like to use (generally using a Workflow Rule). For example: if you want to set up logic that says "no matter if this Quote is direct or channel, use the direct Contracted Price", this is how you accomplish that. ContractGroup Contracts Text This field can be used to combine active contracts on an account to renew and co-terminate onto a single renewal opportunity. CustomActiveContract Contracts Checkbox Indicates which contracts to use as active in a renewal process. CustomName Quote or Quote Document Formula as text The value returned from the formula can be used to modify the name on the Quote Document. DefaultSalesRepID Quote Formula as text Automatically populates the Sales Rep field on quotes when it is blank. DocumentCurrencySymbol Quote Formula as text Create a text formula that returns a currency symbol based on the Currency ISO code to display the desired symbol instead of the ISO code in the document output. For example: CASE(CurrencyIsoCode, "EUR","€", "GBP","£", "$"). EditLinesFieldSetName Quote Formula as text or Picklist Dynamically displays different columns for fields in the Edit Lines page based on type of user or quote. See Dynamic Edit Lines Page for instructions. If you want different users to see different fields or columns on the Edit Lines page based on the type of user or type of quote, set up the EditLinesFieldSetName field to apply different field sets in different scenarios. ForceDeferred Contract Formula as number Change the process triggered from setting Renewal Forecast to True from synchronous to asynchronous. HeaderFieldSetName Quote Formula as Text or Picklist Dynamically displays quote fields on the quote line editor based on the type of user or quote. See Dynamic Display Salesforce CPQ Quote Fields in the Quote line Editor for instructions. To show different quote fields based on the type of user or type of quote, set up the HeaderFieldSetName field to apply different field sets in different scenarios.NOTE: Dynamic display of Quote fields using HeaderFieldSetName must have the field type as picklist or formula. The feature doesn't work with field type set as Rich Text Area. IncludePriorQuantity Quote and Subscription Formula as Checkbox Include prior quantity of a Subscription product for use in calculating Discount Schedules with Cross Orders enabled. LineSortField Quote Formula as Number or Text Automatically sort Quote Lines in the Line Editor in the same order as the products appear on the configuration page. Markupunit Quote Line Picklist Custom picklist allowing for markups to be either by percent or amount. OverageRate Block Price Currency Allows you to enter an overage rate for block prices, which is added on top of the block price selected and calculated by taking the difference between the minimum quantity for the block and the quantity entered for that line item. ProrateAmountDiscounts Quote Line Formula as Number Allows you to configure quotes to have the total quote amount represent discount per unit of quantity and discount per unit of term. For example, you may want to apply an annual discount to a subscribed product that has 6 months remaining on the term. QuotePrimaryContact Opportunity Formula as text Override default Primary Contact Mapping from Oppty to Quote.
table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%;}td, th { border: 1px solid #dddddd; text-align: left; padding: 8px;}tr:nth-child(even) { background-color: #dddddd;}
QuotePrimaryPartner Opportunity Formula as text Salesforce CPQ designates the Quote-level Primary Partner record by looking at the Partner record marked Primary in the partner Opportunity's Partner Roles related list. If QuotePrimaryPartner contains a Partner record ID, Salesforce CPQ will use that value instead for copying to the Quote's Primary Partner field. UnitPriceForceOverride OrderItem Currency Provides the ability to override the Unit Price of an Order Item.NOTE: This special field is not supported for Salesforce Billing.
Maximizing Efficiency with Salesforce CPQ Twin Fields As you've seen across this article, Salesforce CPQ Twin Fields and Special Fields offer significant data mapping capabilities and customization options that can be game-changers in data management. However, their effective utilization necessitates careful understanding of their constraints.
As you become more and more familiar with the extent of CPQ capabilities, we also recommend you look into tooling that can help you deploy and synch CPQ data across your various Salesforce organizations. At Blue Canvas we offer a dedicated Salesforce CPQ Deployer that helps you compare and synch CPQ across sandboxes in minutes! For further assistance with implementation or to learn more about these features, don't hesitate to reach out to our team at Blue Canvas today.
-------
FAQs What are Twin Fields in Salesforce CPQ?
Twin Fields in Salesforce CPQ facilitate the transfer of custom field values between paired objects upon the creation of the second object. This feature surpasses the capabilities of Quote Sync, as it allows for data mapping across supported objects, reducing the need for customizations. In what scenarios are Twin Fields beneficial?
Twin Fields are particularly useful in large data organizations. For example, if you regularly update the same values from an object via automation or with Apex in Salesforce, Twin Fields can help map data across supported objects, saving platform resources. A common use case is copying a field value from a Product across all Quote Line Items it’s generated from. What are the limitations of Twin Fields in Salesforce CPQ?
Twin Fields can't map Standard Fields. They also require exact API names and matching field types for successful mapping. Custom Objects are not supported, and it's important to ensure the objects you will be using are supported by Twin Fields. What are Special Fields in Salesforce CPQ?
Special Fields are fields you create in Salesforce CPQ to unlock advanced package features. They can aid your CPQ implementation by allowing more customization. For instance, using the Special Field 'HeaderFieldSetName', you can dynamically display a specific quote field in the quote line editor based on the user. Can the 'Line Editor' field set on Quote be customized for different users?
Yes, with the Salesforce CPQ Special Field, 'HeaderFieldSetName', you can create a field on the quote object to dynamically display a specific quote field in the quote line editor. This can be controlled by using a formula field or you can allow users to make their own selection by using a picklist field. What precautions should I take when implementing Twin Fields and Special Fields?
Twin Fields and Special Fields require careful implementation to fully leverage their capabilities. Make sure the API names are exact and the field types match. Also, remember that Twin Fields are populated only upon record creation, so editing the source will not copy the value to its target. Similarly, ensure that Special Fields are implemented correctly to unlock advanced features as desired.