Configurable Part - Quote Pricing

We generally work off of sales orders, and have rarely ever used quotes. I’m trying to get the Quote/Opportunity module set up for our configurable parts, and I keep running into an issue where the Price doesn’t populate correctly (see below):

The configured PartNum (not in partmaster), SellingExpectedQty, and several other fields updated correctly. The QuoteLine Comment is also correct, and it includes the itemized pricing of the configured item. So why is the Price not updating?

It turns out, it’s the order of my Document Rules.

I noticed that if I reconfigure the order and hit save immediately, making no changes, the price will populate correctly. So I figured the only thing that was different when the DocRule was triggered is exactly what is in the DocRule itself. With some trial and error, I figured it out:

You must set Pricing.QuotePrice and any discounts (QuoteDtl.DocDiscount and/or QuoteDtl.DiscountPercent) in your document rules BEFORE setting QuoteDtl.SellingExpectedQty.

If you set the price after setting the SellingExpectedQty, it works every time.

Hopefully this saves someone else the same frustration I had for 2 hours yesterday.

TLDR:

To set Quote Unit Price in Product Configurator DocRules, set your fields in this order:

QuoteDtl.SellingExpectedQty = yourQuantity;

QuoteDtl.DocDiscount = yourDiscount; 

Pricing.QuotePrice = yourUnitPrice;