{"id":392,"date":"2019-09-24T20:19:55","date_gmt":"2019-09-24T20:19:55","guid":{"rendered":"http:\/\/morecpq.com\/?p=392"},"modified":"2020-04-28T13:09:25","modified_gmt":"2020-04-28T13:09:25","slug":"price-rules-configurator","status":"publish","type":"post","link":"https:\/\/morecpq.com\/index.php\/2019\/09\/24\/price-rules-configurator\/","title":{"rendered":"Price Rules &#8211; Configurator!"},"content":{"rendered":"\n<p>Guess what!  Price Rules can operate inside of the configurator!  Most times, folks configure them to run in one of the four calculation events in the line editor.  But you can also configure them to run within the configurator too!  I am going to use an example Price Rule to illustrate some things about configurator rules.  Lookie here.  <\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"940\" height=\"514\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2019\/09\/5796BCC3-5DEE-4CB6-ADA5-AA7E7B45C701-1024x560.jpeg?resize=940%2C514\" alt=\"\" data-id=\"400\" data-link=\"http:\/\/morecpq.com\/?attachment_id=400\" class=\"wp-image-400\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2019\/09\/5796BCC3-5DEE-4CB6-ADA5-AA7E7B45C701.jpeg?resize=1024%2C560&amp;ssl=1 1024w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2019\/09\/5796BCC3-5DEE-4CB6-ADA5-AA7E7B45C701.jpeg?resize=300%2C164&amp;ssl=1 300w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2019\/09\/5796BCC3-5DEE-4CB6-ADA5-AA7E7B45C701.jpeg?resize=768%2C420&amp;ssl=1 768w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2019\/09\/5796BCC3-5DEE-4CB6-ADA5-AA7E7B45C701.jpeg?w=1880&amp;ssl=1 1880w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>There are fields!  That configure the Price Rule for configurator action.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Price Rule<ul><li>Evaluation Scope: Configurator<\/li><li>Configurator Evaluation Event<ul><li>Save: This will fire the rule when you click the Save button in the configurator.<\/li><li>Edit: This will fire the rule when you change something that has Apply Immediately set to TRUE (Product Options or Configuration Attributes).  It also fires them when you click the Save button just like above.<\/li><\/ul><\/li><\/ul><\/li><li>Price Condition<ul><li>Object: Product Option<br>The Field must exist on the Product Option object for this to work.<\/li><\/ul><\/li><li>Lookup Query<ul><li>Tested Object: Product Option<br>The Tested Field must exist on the Product Option object for this to work.<\/li><\/ul><\/li><li>Price Action<ul><li>Target Object: Product Option<br>The Target Field must exist on the Product Option object for this to work.<\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong>Caveats!<br><\/strong>There is one issue with the above rule.  For this to work properly, the tested fields must be in the OptionConfiguration field set (ie. they must be columns in the table of options).  You have to be able to edit these for the rule to look up a value in the lookup table.<\/p>\n\n\n\n<p><strong>Configuration Attributes<br><\/strong>You might think, well maybe I can create some Configuration Attributes for these fields and have them set as Apply to Product Options = TRUE so that I don\u2019t have to have them as columns!  Hey.  Great idea, ma\u2019am.  Or sir.  Whatever you go by.  But NO.  This will not work.  As of this article\u2019s publish date, the application of values to Product Options does not *actually* happen until AFTER the save button is clicked and AFTER Price Rules are run.  So the values never get to the options and your action to inject a lookup value never fires.  In this case, move your rule to the line editor.  Pretty huge gap in an otherwise wonderful feature.<\/p>\n\n\n\n<p><strong>More Caveats!<\/strong><br>In Price Condition, you can not use field API values other than Quantity and Product Code in the \u201cField\u201d field.  It will not work.<\/p>\n\n\n\n<p>In Price Action, you can not use the Formula field or Source Field field in configurator Price Rules.<\/p>\n\n\n\n<p><strong>Search Terms<br><\/strong>I am putting search terms here so that when people have this problem, they find this article.  No sense in scouring the internet of dead ends and not getting your questions answered.<br><br>Search Terms: Salesforce CPQ Configuration Attributes &#8220;Apply to Product Options&#8221; field lookup Price Rule<\/p>\n\n\n\n<p><strong>SFDC Success Articles<br><\/strong>&#8211; <a href=\"https:\/\/success.salesforce.com\/answers?id=9063A000000ZvosQAC\">https:\/\/success.salesforce.com\/answers?id=9063A000000ZvosQAC<\/a><br>&#8211; <a href=\"https:\/\/success.salesforce.com\/answers?id=9063A000000ibxGQAQ\">https:\/\/success.salesforce.com\/answers?id=9063A000000ibxGQAQ<\/a><br>&#8211; <a href=\"https:\/\/success.salesforce.com\/answers?id=9063A000000pQzMQAU\">https:\/\/success.salesforce.com\/answers?id=9063A000000pQzMQAU<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Guess what! Price Rules can operate inside of the configurator! Most times, folks configure them to run in one of the four calculation events in the line editor. But you can also configure them to run within the configurator too! I am going to use an example Price Rule to illustrate some things about configurator &hellip;<br \/><a href=\"https:\/\/morecpq.com\/index.php\/2019\/09\/24\/price-rules-configurator\/\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Price Rules &#8211; Configurator!<\/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-392","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\/392","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=392"}],"version-history":[{"count":11,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/392\/revisions"}],"predecessor-version":[{"id":603,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/392\/revisions\/603"}],"wp:attachment":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/media?parent=392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/categories?post=392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/tags?post=392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}