Q/A: Auto-Mapping: Twin Fields

by Community Manager on ‎10-08-2015 11:00 AM - edited on ‎08-18-2017 11:35 AM by Community Manager


Salesforce CPQ will automatically populate field values between certain objects when their API names match.


Fields and data that will auto-map when API names match:  

  • Contract- -> Opportunity
  • Contract --> Renewal Opportunity
  • Service Contract --> Opportunity
  • Service Contract --> Renewal Opportunity
  • Opportunity Products --> Quote Line (only applies to standalone products and only when Opportunity Products exist before the first primary quote is created)
  • Product --> Quote Line
  • Product Option (Configuration Attribute) <--> Quote Line
  • Product Option  (Editable Custom Fields) <--> Quote Line
  • Quote --> Order
  • Quote Line --> Order Product
  • Quote Line --> Favorite Product --> Newly-added Favorite Quote Line
  • Quote Line --> Opportunity Product
  • Quote Line --> Subscription
  • Quote Line --> Assets
  • Quote Line --> Contract Line Item
  • Subscriptions --> Renewal Opportunity Products/Quote Line and Amended Opportunity Products
  • Contract Line Item --> Renewal Opportunity Products/Quote Line and Amended Opportunity Products

Checking the Configuration Attribute checkbox field on an attribute record will map that attribute value to quote lines that are product options of the related bundle.


Managed Package Fields (ex: SBQQ__NetPrice__c) cannot be twinned with the auto-mapping feature. However, one can create a formula field to return currency with the formula of "SBQQ__NetPrice__c" and subsequently create a currency field on the opportunity product with the same name and API. This will auto-map because the formula data return type is identical to the field data type of the destination field. 


Note: Custom fields with the same names and types are mapped. A pair of lookup fields both must reference the same object to be mapped.

by wsupinski
on ‎06-22-2016 12:08 PM

Any plans to add

  • Quote Line --> Asset


by ttrevisan
on ‎06-22-2016 01:50 PM

@wsupinski There should be a Quote Line field on Asset that is added on asset creation for contracted opportunities that you can reference using formulas, etc. (SBQQ__QuoteLine__c)

by wsupinski
on ‎06-22-2016 05:02 PM

Indeed there is a Quote Line lookup field. Just gotta add it to the page layout.



by rfreeland
on ‎07-06-2016 06:36 AM

This question had two parts, but the second question is not answered.  Are all field types supported?


How is data pushed from one object to another, assuming the API names and data type match? I.E., Product to Quote Line, etc. Furthermore, what field types are supported?

by rfreeland
on ‎07-08-2016 01:04 PM

SteelBrick CPQ for Service Cloud use the Service Contract and the Contract Line Item objects in place of Contract and Subscription.  Can this Twin logic be expanded to include those objects?

by GMlynarczyk
on ‎07-14-2016 02:57 PM

 @rfreeland I am currently using Quote Line --> Service Contract Line Item, so there does appear to be parity with the sales contract side of things.

by rfreeland
on ‎07-14-2016 06:13 PM

Good news.  Thanks for the update Greg.

by aleramesh
‎08-22-2016 11:27 PM - edited ‎08-22-2016 11:28 PM

 Could someone provide more details on how to use this auto mapping feature? We are not using Product Options. I am creating a configuration attribute on the product but I am now confused on what values to enter. All I am trying to solve is push Net Price from Quote Line to Opportunity Product. Appreciate any help on this..Thanks so much.

by MLeary
on ‎09-07-2016 02:47 PM

Does this not work for picklist fields?

by FedeMiguez
on ‎09-11-2016 11:28 AM

Is there a way to auto map Opportunity fields to Quote fields?

by wsupinski
on ‎09-12-2016 10:37 AM

Hi @FedeMiguez,

  There exists an opportunity lookup field on the Quote. By default, it isnt required that you have an opportuntiy when you create a quote but it is very common. As long as you have an opportunity for each quote created you can create a formula field on the Quote object that points to any field on the related opportunity. This will in-effect give access to the Opportunity fields on the Quote.


I hope that helps!



by FedeMiguez
on ‎09-12-2016 04:51 PM

@wsupinski Unfortunately that's not exactly what we want since there might be more than one Quote against the same Oportunity and some fields may vary between Quote and Quote.

I was directed to this article in the post I made


which solved part of the problem, but still need to make it work with customs Fields.



by aleramesh
on ‎09-13-2016 01:01 PM

@FedeMiguez, I think I understand what you are asking. Did you try with URL hacking technique?

by FedeMiguez
on ‎09-13-2016 01:47 PM

@aleramesh I'm trying to avoid URL hacking because it's havier on the maintenance side. And even then, there's a SBQ VisualForce page for the New button, which looks like it handles permissions and Lightning, so it's not a guarantee it will work or if I would need to recreate the page to not lose functionality.

by joalouleo
on ‎10-05-2016 12:40 PM

"Note: Custom fields with the same names and types are mapped. A pair of lookup fields both must reference the same object to be mapped.  All fields must exist on the Quote Line." 


I have a custom lookup field for our partners on the opportunity.   I would like to have that same field on the quote and the fields map to each other on the primary quote.  The reason why this is important is because I have a lookup table looking at the custom partner lookup field to populate pricing on the quote lines.  It would be great if the sales rep could change the partner on the quote instead of the opportunity.   Any idea on how to do this?  I am trying to get away from the rep having to change the partner on the opportunity and to change the partner on the quote instead, but have the partner map back to the opportunity (primary quote only).

on ‎10-17-2016 09:38 PM

Are there any plans to add auto mapping between the contract/service contract and renweal opportunity?




Dan Hansen

on ‎11-16-2016 11:19 AM

Additionally, note that Auto Mapping works between the Order Product object and Quote Line object.

on ‎11-21-2016 08:55 AM

Can someone please update this posting to also reflect Contract/Service Contract -> Quote and Quote Line -> Order Product





by Community Manager
on ‎11-21-2016 12:05 PM

@DanHansen I've updated the article accordingly. Thanks for the heads-up!

‎11-28-2016 12:00 AM - edited ‎11-28-2016 12:01 AM

Is there any plan to have automapping functionality for Contract Line Item -> Entitlement or Subscription ->Subscribed Assets?

by nathanspiwak
on ‎02-28-2017 10:09 AM

Hey all, we would like a custom field value to populate from the Quote to the Contract to the Renewal Quote. Is that possible? If it is, how do we do it? Thanks! 

by rm192606
on ‎03-07-2017 10:43 AM

Hi @lvoelz2


We are using a lookup field on the quote line that looks to a custom object. This lookup field on the quote line is being populated with a price rule. We have the exact same lookup field on the order product and would expect to see the value twin over to the order product but instead, we are getting an error when creating the order that states the following: "SObject row was retrieved via SOQL without querying the requested field", and it then references the quote line lookup field to the custom object. 


Is this expected behavior or a bug? 





by Community Manager
on ‎04-13-2017 10:00 AM

Hi @rm192606.


This was a bug that was patched in 27.0.29 and should be in 28.0.4.



by nmontchery
on ‎04-20-2017 03:05 PM



can someone answer the question of @nathanspiwak ?


'Hey all, we would like a custom field value to populate from the Quote to the Contract to the Renewal Quote. Is that possible? If it is, how do we do it? Thanks! '


So far when we renew a contract the information from the configuration attributes are lost in the renewal quote so the user must re-configure the products. Since we're using price rule on top of it the system behave silly for both amending or renewing process. We defined the custom fields for the configuration attributes in both quote lines & product options. Should we add them to Assets? Opp products? or elsewhere? 



on ‎05-09-2017 09:26 AM



Seems strange to me that Quote->Contract is not listed as supported. This is similar in concept to Quote Line->Subscription. Is this actually supported and just not listed? 


by jacobbler
on ‎05-18-2017 01:29 PM

There isn't a twin field mapping from Contract > Quote or Quote > Contract that I'm aware of, but this is something that clients almost always need and end up creating Process Builders/Flows to get around. 

In some use cases, not even that will work. For example, have a client that wants Quote Record Types to match on original Quote > Renewal Quote. If twin mapping was availalbe, we could make this work. Any ideas for this, or is there something I'm missing? 

by andresschulz
on ‎05-21-2017 09:00 PM

I am trying to map auto-number field from quote to quote template. Created both identical auto number fields and getting Unknown field: Quote_N__c on template.


Alternatively, all i want is the quote number (Name) to be something other thant "Q-xxxx"


i used 



by rfreeland
on ‎05-21-2017 10:14 PM

You can not twin an auto-number field because twining won't be able to override the salesforce auto-number logic.


Twining doesn't work from Quote to Quote Template.  Not listed as a supported twin relationship and now sure how it would work functionally since lots of quotes would reference the same template.  You should just have the template refer to the quote name field, no need for twinning functionality.


We strongly encourage our clients to use the out of the box quote name/number - cleanest way to reference a unique quote record.

by vay
on ‎06-05-2017 11:34 PM

Hello Community, 


Can anyone please confirm if this works for picklist fields too. 




by Adelgado88
on ‎06-15-2017 06:05 PM



Is Order > Contract, Order Product > Subscription and/or Order Product > Asset not yet supported, given the new capabilities of contracting from the Order?




by wpessoa
on ‎06-16-2017 04:17 PM

What about Solutions Group >>> Quote Line Group


Tried, but did not work. How do we add extra defaults??

by soniaflamm
on ‎07-31-2017 10:52 AM

I'm unable to get twin field funtionality to work for lookup field type. It states in this article that it should work but I'm unable to get a twin field created on the quote line to pull in the correct values populated from the product2 record. Can someone please advise if this has ever worked? I've heard there were bugs around this funtionality in previous versions of CPQ. We are currently on v208.3.

by nmontchery
on ‎10-11-2017 03:09 PM

"SBQQ.ContractAfter: execution of AfterUpdate caused by: System.SObjectException: SObject row was retrieved via SOQL without querying the requested field" after patch 210.7 when checking the renewal forecast checkbox in the Contract. 


Anyone else has that?


by KevinW
on ‎11-01-2017 09:37 PM

I keep seeing reference to the " Configuration Attribute checkbox field on an attribute record" but there is no such thing as an "Attribute" record.

by KevinW
on ‎11-01-2017 09:39 PM

I keep seeing reference to the " Configuration Attribute checkbox field on an attribute record" but there is no such thing as an "Attribute" record.

by Elissa
on ‎01-22-2018 01:06 PM

Is there any reason why this would stop working?  Should I re-run install scripts?  I have a field called Quantity_Type__c that should be mapped from the Product to Quote Line.  I did add a picklist value to the Quote Line field that I did not immediately add to the Product, but I've fixed this now.  

by Yogesh
3 weeks ago - last edited 3 weeks ago

I think Configuration Attribute field in "Checking the Configuration Attribute checkbox field on an attribute record will map that attribute value to quote lines that are product options of the related bundle." statement refers to "Apply to Product Options" checkbox on Configuration Attribute object.

by Community Manager
a week ago