{"id":1493,"date":"2022-05-10T14:20:59","date_gmt":"2022-05-10T14:20:59","guid":{"rendered":"https:\/\/morecpq.com\/?p=1493"},"modified":"2022-05-10T17:55:54","modified_gmt":"2022-05-10T17:55:54","slug":"custom-settings-field-metadata","status":"publish","type":"post","link":"https:\/\/morecpq.com\/index.php\/2022\/05\/10\/custom-settings-field-metadata\/","title":{"rendered":"Custom Settings &#8211; Field Metadata"},"content":{"rendered":"\n<p>What. in tarNATION.  is THAT?!  Hey I found a custom setting that is in CPQ but I have no idea what it does or how it fits into the CPQ system.  Here&#8217;s an answer!  Honestly not sure if this is 100% accurate but this is what I&#8217;ve learned so far.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"940\" height=\"353\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2022\/05\/Snip-Custom-Settings-Salesforce.png?resize=940%2C353&#038;ssl=1\" alt=\"\" class=\"wp-image-1494\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2022\/05\/Snip-Custom-Settings-Salesforce.png?resize=1024%2C384&amp;ssl=1 1024w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2022\/05\/Snip-Custom-Settings-Salesforce.png?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2022\/05\/Snip-Custom-Settings-Salesforce.png?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2022\/05\/Snip-Custom-Settings-Salesforce.png?w=1308&amp;ssl=1 1308w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/figure>\n\n\n\n<p>There\u2019s no docs that I\u2019ve ever seen but it has to do with the fields used in price rules.  This is one of the tables that get set up when you run execute scripts.  It\u2019s what the error means when\u00a0 you add a field (that doesn\u2019t exist) to a Price Rule: &#8220;No Metadata found for field &lt;fieldname>.&#8221;  It\u2019s basically a list of fields (and their objects) that are referenced in price rules.  You don&#8217;t have access to the data for this.  So opening up and managing the data in this Custom Setting doesn&#8217;t show you anything.  This data is internally managed by CPQ.<\/p>\n\n\n\n<p>Also!  <a href=\"https:\/\/www.linkedin.com\/in\/chrishickman\/\" target=\"_blank\" rel=\"noreferrer noopener\">Chris Hickman<\/a> notes: <\/p>\n\n\n\n<p>&#8220;Back in the pre-Lightning UX days, which were predominantly when &#8220;Salesforce CPQ&#8221; was still &#8220;SteelBrick&#8221; (or even &#8220;Quote Quickly&#8221; before that), the &#8220;New Quote&#8221; button on Opportunity &#8220;did&#8221; a lot more than the Lightning UX-equivalent does, in terms of pre-populating fields, even during new record creation prior to save. You could take this even further by adding records to the Field Metadata custom setting. There was extensive documentation for this in the old SteelBrick community which unfortunately did not survive the Salesforce acquisition.&#8221;<\/p>\n\n\n\n<p>Below is a complete set of documentation lifted from <a rel=\"noreferrer noopener\" href=\"https:\/\/learningsalesforcecpq.com\/2018\/09\/19\/auto-populate-fields-on-quote-creation\/\" target=\"_blank\">this article<\/a>.  Keep in mind, this old feature of CPQ used &#8220;URL hacking&#8221; which only works in classic.  It&#8217;s also not a best practice to use this type of &#8220;URL hacking&#8221; in general.<\/p>\n\n\n\n<p>A specific set of fields on Quote can be&nbsp;<strong><u>auto-populated<\/u><\/strong>&nbsp;from the associated&nbsp;<strong>Opportunity<\/strong>&nbsp;and&nbsp;<strong>Account<\/strong>&nbsp;at the time of creating a new Quote.<\/p>\n\n\n\n<p>If you do not do the necessary setup, sales reps would spend time re-entering Quote fields which were already filled in at the time of creating Opportunity and Account.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"attachment_318\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/quote-without-account-and-address-information-details.png?resize=800%2C336&amp;ssl=1\" alt=\"New Quote Creation Page WITHOUT auto-populated fields\" class=\"wp-image-318\"\/><figcaption>New Quote Creation Page WITHOUT auto-populated fields<\/figcaption><\/figure>\n\n\n\n<p>Salesforce CPQ provides a&nbsp;<strong>Field Metadata<\/strong>&nbsp;custom setting where we can set up the fields that we want to be pre-filled with the corresponding values on Quote creation.<\/p>\n\n\n\n<figure class=\"wp-block-image\" id=\"attachment_317\"><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/quote-with-account-and-address-information-details.png?resize=800%2C337&amp;ssl=1\" alt=\"AUTO-POPULATE Fields on New Quote Creation\" class=\"wp-image-317\"\/><figcaption>New Quote Creation Page WITH auto-populated fields<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Use Case<\/h2>\n\n\n\n<p>John Cook works as a CPQ Administrator at Universal Containers (UC). Usually, Sales reps at UC go through&nbsp;<strong>Account -&gt; Opportunity -&gt; Quote<\/strong>&nbsp;flow to create new Opportunities and Quotes.<\/p>\n\n\n\n<p>While creating a new Opportunity from an Account, lookup to that Account gets set on the Opportunity. While creating a new Quote from an Opportunity, lookup to that Opportunity gets set but,<strong>&nbsp;lookup to the Opportunity\u2019s Account DOESN\u2019T get set&nbsp;<\/strong>on the Quote. Reps have to explicitly select the corresponding Account in Account field on the Quote.<\/p>\n\n\n\n<p>Sales Reps expect that the system should be smart enough to automatically pre-populate the Account lookup on Quote with its Opportunity\u2019s Account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Setup?<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Navigate to&nbsp;<strong>Setup | Develop | Custom Settings | Field Metadata<\/strong>. Click&nbsp;<strong>Manage<\/strong><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/1.-manage.png?resize=800%2C305&amp;ssl=1\" alt=\"Field Metadata\" width=\"800\" height=\"305\">Field Metadata<\/li><li>Click&nbsp;<strong>New<\/strong>&nbsp;on the Field Metadata page.<\/li><li>Enter the&nbsp;<strong>Name<\/strong>,&nbsp;Field Name and&nbsp;<strong>Object Name<\/strong>&nbsp;of the Field you want to auto-populate where<ul><li><strong>Name<\/strong>: SFDC ID of Account Field (SFDC ID of the Quote Field)<\/li><li><strong>Field Name<\/strong>: SBQQ__Account__c (Quote Field API Name)<\/li><li><strong>Object Name<\/strong>: SBQQ__Quote__c (API Name of the Object)<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/2.new-Field-Metadata.jpg?resize=666%2C147&amp;ssl=1\" alt=\"New Field Metadata Custom Setting Record\" width=\"666\" height=\"147\">New Field Metadata Custom Setting RecordNew Field Metadata Record<\/li><\/ul><\/li><li>To get the Account Field SFDC ID, navigate to&nbsp;<strong>Setup | Build | Create | Objects | Quote | Account Field.&nbsp;<\/strong>Copy the SFDC ID from the address URL of this page.<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/2.1-account-field-details.png?resize=800%2C428&amp;ssl=1\" alt=\"Account Field on Quote\" width=\"800\" height=\"428\">Account Field on Quote<\/li><li>Click&nbsp;<strong>Save<\/strong>.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Check if it works as expected<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Navigate to the&nbsp;<strong>Opportunity&nbsp;<\/strong>on which you want to create a new Quote, go-to<strong>&nbsp;Quotes Related List&nbsp;<\/strong>and click<strong>&nbsp;New&nbsp;<\/strong>button.<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/opportunity-page-account.png?resize=800%2C224&amp;ssl=1\" alt=\"Opportunity Page- Account Details\" width=\"800\" height=\"224\">Opportunity Page- Account Details<\/li><li>Once done, you can see that the Account field on Quote gets pre-filled with the associated&nbsp;<strong>Opportunity\u2019s Account<\/strong>&nbsp;i.e.&nbsp;<strong>Genepoint<\/strong>.<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/quote-with-account.png?resize=800%2C153&amp;ssl=1\" alt=\"Account Field pre-populated with Opportunity's Account on Quote\" width=\"800\" height=\"153\">Account Field pre-populated with Opportunity\u2019s Account on Quote<\/li><li>Repeat for the other Fields that you want to be auto-populated.<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/3.-all.jpg?resize=800%2C299&amp;ssl=1\" alt=\"All records in Field Metadata Custom Setting\" width=\"800\" height=\"299\">All records in Field Metadata Custom SettingAll records in Field Metadata<\/li><li>When you click&nbsp;<strong>New Quote<\/strong>&nbsp;button in Quotes related list on Opportunity, you can see that the&nbsp;<strong>Account<\/strong>,&nbsp;<strong>Sales Rep<\/strong>&nbsp;and&nbsp;<strong>Billing &amp; Shipping Address<\/strong>&nbsp;fields on Quote are auto-populated with the information from associated Opportunity and Account.<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/quote-with-account-and-address-information-details.png?resize=800%2C337&amp;ssl=1\" alt=\"AUTO-POPULATE Fields on New Quote Creation\" width=\"800\" height=\"337\">Quote Creation Page WITH auto-populated fields<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Considerations<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Supported Fields \u2013&nbsp;<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>You can configure the following fields to auto-populate on a quote:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>FIELD LABEL<\/th><th>FIELD API&nbsp;NAME<\/th><\/tr><tr><td>Account<\/td><td>SBQQ__Account__c<\/td><\/tr><tr><td>Billing City<\/td><td>SBQQ__BillingCity__c<\/td><\/tr><tr><td>Billing Country<\/td><td>SBQQ__BillingCountry__c<\/td><\/tr><tr><td>Billing Name<\/td><td>SBQQ__BillingName__c<\/td><\/tr><tr><td>Billing Postal Code<\/td><td>SBQQ__BillingPostalCode__c<\/td><\/tr><tr><td>Billing State<\/td><td>SBQQ__BillingState__c<\/td><\/tr><tr><td>Billing Street<\/td><td>SBQQ__BillingStreet__c<\/td><\/tr><tr><td>Distributor<\/td><td>SBQQ__Distributor__c<\/td><\/tr><tr><td>Partner<\/td><td>SBQQ__Partner__c<\/td><\/tr><tr><td>Primary Contact<\/td><td>SBQQ__PrimaryContact__c<\/td><\/tr><tr><td>Sales Rep<\/td><td>SBQQ__SalesRep__c<\/td><\/tr><tr><td>Shipping City<\/td><td>SBQQ__ShippingCity__c<\/td><\/tr><tr><td>Shipping Country<\/td><td>SBQQ__ShippingCountry__c<\/td><\/tr><tr><td>Shipping Name<\/td><td>SBQQ__ShippingName__c<\/td><\/tr><tr><td>Shipping Postal Code<\/td><td>SBQQ__ShippingPostalCode__c<\/td><\/tr><tr><td>Shipping State<\/td><td>SBQQ__ShippingState__c<\/td><\/tr><tr><td>Shipping Street<\/td><td>SBQQ__ShippingStreet__c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Billing Address Fields<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>When billing address fields are set to auto-populate, bill-to information is pulled from either the distributor, partner or direct account&nbsp;<strong>present on the Opportunity<\/strong>:<ul><li><strong>By default<\/strong>, bill-to information is pulled from the distributor account.<\/li><li>If there is no distributor account present on the opportunity, billing information is pulled from the partner account.<\/li><\/ul>If there is no partner account present on the opportunity, billing information is pulled from the direct account i.e. Opportunity\u2019s Account.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Shipping Address Fields<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>When shipping fields are set to auto-populate, ship-to information is pulled from the direct account&nbsp;<strong>present on the Opportunity<\/strong>. If ship-to information within the direct account is empty, the auto-populating fields will instead pull the values from bill-to information.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Special Fields on Opportunity<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>You need to create special fields on Opportunity to auto-populate below fields on the Quote.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>QUOTE FIELDS<\/th><th>SPECIAL FIELDS TO BE CREATED ON OPPORTUNITY<\/th><\/tr><tr><td>Primary Contact<\/td><td>QuotePrimaryContact__c<\/td><\/tr><tr><td>Partner<\/td><td>QuotePrimaryPartner__c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Sales Rep Field on Quote<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>If \u201cSBQQ__SalesRep__c\u201d field is added in the&nbsp;<strong>Field Metadata<\/strong>&nbsp;custom setting, Quote\u2019s&nbsp;<strong>Sales Rep<\/strong>&nbsp;field is pre-filled with the value from&nbsp;<strong>Opportunity\u2019s Owner&nbsp;<\/strong>field.<\/li><li>Navigate to the&nbsp;<strong>Opportunity&nbsp;<\/strong>on which you want to create a new Quote, go-to<strong>&nbsp;Quotes Related List&nbsp;<\/strong>and click<strong>&nbsp;New&nbsp;<\/strong>button.<br><img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/opportunity-page-owner.png?resize=800%2C190&amp;ssl=1\" alt=\"Opportunity Page- Owner Details\" width=\"800\" height=\"190\"><ul><\/ul><\/li><li>You can see that the Sales Rep field on Quote gets pre-filled with the associated&nbsp;<strong>Opportunity\u2019s Owner<\/strong>&nbsp;i.e.&nbsp;<strong>JASON LIVESTON<\/strong>.<img decoding=\"async\" src=\"https:\/\/i0.wp.com\/learningsalesforcecpq.com\/wp-content\/uploads\/2018\/09\/quote-with-sales-rep.png?resize=800%2C154&amp;ssl=1\" alt=\"Sales Rep Field pre-populated with Opportunity's Owner on Quote\" width=\"800\" height=\"154\">Sales Rep Field pre-populated with Opportunity\u2019s Owner on Quote<\/li><\/ul>\n\n\n\n<p><strong>Note<\/strong><\/p>\n\n\n\n<p>Salesforce CPQ uses\u00a0<strong>URL Hacking<\/strong>\u00a0to implement this feature. This is the reason why it works in Salesforce Classic ONLY and\u00a0<strong>NOT in Lightning Experience<\/strong>. As a\u00a0<strong>workaround<\/strong>, you can think about leveraging\u00a0<strong>Publisher Actions\/Quick Actions<\/strong>\u00a0to pre-populate the Quote fields.<\/p>\n\n\n\n<p><strong>Lightning UX<\/strong><\/p>\n\n\n\n<p>This does not work in Lightning UX AFAIK. However, in 2022, you have 2 no-code options that replace this:<\/p>\n\n\n\n<p>1. Create a Quick Action on Opportunity and predefine field values on your resultant Quote record<\/p>\n\n\n\n<p>2. Create a screen flow, which allows you to add in all of the other stuff Flows can do. One example application of this Chris Hickman wrote about is <a href=\"https:\/\/www.linkedin.com\/pulse\/salesforce-cpq-pre-fill-guided-selling-input-values-hickman-\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What. in tarNATION. is THAT?! Hey I found a custom setting that is in CPQ but I have no idea what it does or how it fits into the CPQ system. Here&#8217;s an answer! Honestly not sure if this is 100% accurate but this is what I&#8217;ve learned so far. There\u2019s no docs that I\u2019ve &hellip;<br \/><a href=\"https:\/\/morecpq.com\/index.php\/2022\/05\/10\/custom-settings-field-metadata\/\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Custom Settings &#8211; Field Metadata<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1493","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/1493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/comments?post=1493"}],"version-history":[{"count":7,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/1493\/revisions"}],"predecessor-version":[{"id":1506,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/1493\/revisions\/1506"}],"wp:attachment":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/media?parent=1493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/categories?post=1493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/tags?post=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}