locked
quote profit and margins RRS feed

  • Question

  • I want to be able to generate total $ profit and margin on a quote. Can CRM do this? I'd like to add fields Profit and Margin, but I'm not sure how to get them to calculate.
    Friday, February 15, 2013 7:04 PM

Answers

  • Actually I accomplished this by creating a report that prints the quote and has the calculations for profit and margin. Works perfectly.

    • Marked as answer by DHpub Thursday, February 21, 2013 4:30 PM
    Thursday, February 21, 2013 4:30 PM

All replies

  • A good reference to read about the costs and prices is:

    http://blogs.msdn.com/b/crm/archive/2006/09/25/770666.aspx

    When you define a product, you could define standard or current cost for that. But, I don't see anywhere in CRM which uses the cost on quote. However, you could customize it. You could build a mapping or workflow to put the current cost of each product on price list item. This is done when you are defining the price list and price list items. Then build another mapping or workflow to put the current cost on quote product. Then using a javascript on change of the price per unit or quantity you could derive the profit of the quote product. The javascript could be as:

    function profit() {


    var price =  Xrm.Page.getAttribute("priceperunit").getValue();

    var cost =  Xrm.Page.getAttribute("new_cost").getValue();

    var profit = price - cost;

    Xrm.Page.getAttribute("new_profit").setValue(profit);

    }

    Also, you have to update the profit on the quote. To do this you could use a workflow or plugin. The workflow should work on create of the quote product. But you may have some problems with updating it. To write a plugin refer to this link.



    If the answer helped you, remember to mark it as answer.

    Friday, February 15, 2013 7:42 PM
    Moderator
  • Calculating the total profit and margin for a quote isn't a standard feature, but it's certainly achievable.

    The product entity has two cost fields: Standard Cost and Current Cost. So you would use one of these fields as your cost price.

    The quote product entity has the Extended Amount field. So all you need to do is to perform the calculation. This could be done using JavaScript on the quote product form, or using a plugin, or usinga report, depending on your requirements. You'd also need to rollup the profit of each quote product to the quote.

    You'll also need to take into account that the Extended Amount field includes the value of the quote product's Tax field, which you probably don't want to include in your profit calculation.


    Neil Benson, CRM Addict and MVP at Slalom Consulting. Find me on Twitter. Join over 20,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.

    Friday, February 15, 2013 7:43 PM
    Moderator
  • Hi,

    You can do this but you will need to write a plugin for the most robust solution that calculates each time you add/delete/or amend the quote lines.

    Also when building your plugin be mindful of the quote revision process because if you have a quote with a hundred lines, the revision effectively copies the quote and all its lines.

    Rob


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd Microsoft Community Contributor Award 2011

    Friday, February 15, 2013 7:43 PM
    Answerer
  • Actually I accomplished this by creating a report that prints the quote and has the calculations for profit and margin. Works perfectly.

    • Marked as answer by DHpub Thursday, February 21, 2013 4:30 PM
    Thursday, February 21, 2013 4:30 PM