{"id":593,"date":"2020-04-21T14:07:56","date_gmt":"2020-04-21T14:07:56","guid":{"rendered":"http:\/\/morecpq.com\/?p=593"},"modified":"2020-04-23T13:03:38","modified_gmt":"2020-04-23T13:03:38","slug":"cpq-line-editor-component-option-quantities-are-calculated-between-before-calculate-and-on-calculate","status":"publish","type":"post","link":"https:\/\/morecpq.com\/index.php\/2020\/04\/21\/cpq-line-editor-component-option-quantities-are-calculated-between-before-calculate-and-on-calculate\/","title":{"rendered":"CPQ &#8211; Line Editor &#8211; Component Option Quantities are Calculated Between Before Calculate and On Calculate"},"content":{"rendered":"\n<p>You have a <strong>Price Rule on before calculate <\/strong>that updates SBQQ__ListPrice__c using a formula which is something like: SBQQ__OriginalPrice__c * (SBQQ__Quantity__c *0.01).  A formula that changes the list price based on quantity.  You add a bundle product containing an option that is of type &#8220;Component&#8221; and save the configuration.  The bundle product has a zero price.  <strong>Component type options have their quantity calculated based on the parent&#8217;s quantity.<\/strong>  It brings you out to the Line Editor.  Things look good.  You change the quantity to 50,000.  Things don&#8217;t look good.  Why didn&#8217;t the Price Rule update SBQQ__ListPrice__c of the child to the new price??  <\/p>\n\n\n\n<p><strong>Component Option quantities get calculated between before calculate and on calculate.  Your price rule doesn&#8217;t know about the new option quantity until on calculate.<\/strong><\/p>\n\n\n\n<p>Similarly, the Original Quantity (SBQQ__BundledQuantity__c) also gets calculated between before calculate and on calculate.<\/p>\n\n\n\n<p>The optimal solution here would be to move the rule from before calculate to on calculate and done!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You have a Price Rule on before calculate that updates SBQQ__ListPrice__c using a formula which is something like: SBQQ__OriginalPrice__c * (SBQQ__Quantity__c *0.01). A formula that changes the list price based on quantity. You add a bundle product containing an option that is of type &#8220;Component&#8221; and save the configuration. The bundle product has a zero &hellip;<br \/><a href=\"https:\/\/morecpq.com\/index.php\/2020\/04\/21\/cpq-line-editor-component-option-quantities-are-calculated-between-before-calculate-and-on-calculate\/\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">CPQ &#8211; Line Editor &#8211; Component Option Quantities are Calculated Between Before Calculate and On Calculate<\/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":[52,53],"class_list":["post-593","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-calculator","tag-line-editor"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/593","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=593"}],"version-history":[{"count":3,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/593\/revisions"}],"predecessor-version":[{"id":596,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/593\/revisions\/596"}],"wp:attachment":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/media?parent=593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/categories?post=593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/tags?post=593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}