Recently I’ve been presented a number of scenarios where the built in CRM Opportunity and Quoting modules are very close to what is needed for a given customer requirement. However the process does not need or really want to use pricelist, Unit or quantity for a product on the Opportunity or Quote..
So the challenge…
My scenario calls for using the product’s with Opportunities and Quotes to support the forecasting and quota modules, however I don’t have any complexity in my product catalog. Its is a flat list of products with flexible pricing and quantity support. I do not need more then one pricelist, nor do I need multiple Unit specifications.
to support this, lets say we have defined a product called PROD001, PROD001 is on the Default Price List, with a Price List Cost of $10. It is also associated to the Primary Unit, with a default quantity of 1.
Remember that Default Unit “owns” the Primary Unit…
Now I want to create a Opportunity…. Using the default functionality; I go to Sales, Opportunities, and click “New”, I populate the Topic and Customer and click save…
Now I navigate to the Line items area..
On the Ribbon, I click “Add New Opportunity Product”…
Ok, So I need to:
- Click the search box next to Price List ( or type it in if I know the name ).
- Choose the Default price List in the Lookup.
- Click Save.
- THEN save the form
That’s a lot of work for a field I didn’t care about…
I click the search button on the existing product and Select PROD001
Ok, so I can see by the Red * that I need a Unit and a Quantity to proceed.
So again.. I need to Click the Search button and Populate the unit, then key the quantity I’m interested in.. THEN hit save.
Looking back at the overall flow here, Iv got perhaps 3 save’s and 9+ clicks I need to do to enter information that is repeated every time and my user doesn’t really care about anyway… Not a good situation…
Solving for Required, but Ignored fields.
The obvious answer is to remove them from the form, however that not going to work as they are required for the “normal” function of CRM.
After giving this a bit of though I came up with a solution that prepopulates most of this “Extra” information from defaults, which allows you to hide the fields in question and still leverage the core features of CRM’s product / Opportunity and Quoting modules.
So the plan was to be able to create a relationship such as :
- PROD001 (Product)
- Primary Unit ( Unit Relationship )
- Quantity: 1
- PROD002 (Product)
- Batch (Unit Relationship )
- Quantity: 10
- Default ( PriceList)
- PriceList Item for PROD001
- Product : PROD001
- Amount: $10
- PriceList Item for PROD002
- Product : PROD002
- Amount: $15
and so on.. This way the user can set the default quantity behavior for any given product by adjusting the default Unit on the product.
Note: the relationship from the PRODUCT to the UNIT is the determining relationship in this process, not the relationship on the pricelist,
On Create Opportunity and Quote:
If the Price List is not populated already, Use a hint key to populate the Price List from the system.. by default its going to look for a pricelist that starts with “Default”
On Add Product to Opportunity Product or Quote Line Item
Use the default association between Product, Unit, and Unit quantity to populate the appropriate fields on the form.
this allows the user to configure the default unit and quantity numbers on a per product bases. IE: Each / Batch / etc..
I did consider using a plugin to associate the default pricelist with an Opportunity or Quote, but decided to keep it all in the front end for now.
This functionally drops 9 or so Clicks and 3 save actions along the way… which balances things out a bit.
There are 2 web resources in the solution,
They are both the same file, one is minimized, one is not.
Additionally I have provided the opportunity, quote, opportunity product, and quote line item form event updates as part of the solution.
When in doubt, use the managed solution.
Note: If you import the Managed solution and maintain the existing customizations ( Don’t step on the forms there if they are customized ), you will need to add in these events by hand.
If you don’t know if your opportunity / quote forms are customized… use the managed solution …
To change that, open the web resource and locate the line :
Then change the world Default to whatever you want the default price list to be..
Where mattb_ProductViewSettings has been added to the forms library collection and the Onload event has been wired to the MattB.ProductViewSettings.OppQuoteDefaultPriceList method of the mattb_ProductViewSettings.
For the Line item forms.,
So in text:
mattb_ProductViewSettings has been added to the forms library collection of the Quote Line Item and Opportunity Line Item, Then I viewed properties on the Existing Product field, selected events, and added MattB.ProductViewSettings.ProductDefaultUom to the OnChange event
with that done,
Unit and quantity auto populate…
It populates the updated quantity based on the unit associated.
There we go… a bit of prepopulating to help get things moving a bit faster and save some mouse clicks and key strokes.