Let the platform do the work

Adding Custom Sales Stages and Probabilities to Opportunities

Overview

The Opportunities and Revenue Line Items modules (not available in Sugar Serve) contain two fields that function unlike any other fields in Sugar®. When the Sales Stage dropdown field is updated, the Probability (%) field automatically updates with a corresponding value. In order to preserve this unique functionality, any changes to the options available in one dropdown list must be accompanied by changes to the other. Both dropdown lists, "sales_stage_dom" and "sales_probability_dom", must be updated when a change in either is desired so that the relationship between the two fields remains intact.

The Dropdown Editor contains both the "sales_stage_dom" and "sales_probability_dom" lists. The "sales_stage_dom" list is associated with the Sales Stage field and displays the various sales stages (e.g., Prospecting, Qualification, Closed Won, etc.). The "sales_probability_dom" list is associated with the Probability (%) field and displays the corresponding probability value (e.g., 10, 20, 100, etc.) for each sales stage. 

Both dropdown lists have the same item name for all values. Matching item names are what enables the probability to update automatically based on the sales stage selection. When adding or changing options in either list, you must ensure that there is an item in the other list with an identical item name.

For more information on modifying dropdown lists, please refer to the Developer Tools documentation.

Use Case

In this example, we will add a new sales stage called "Review Stage", which will have a corresponding probability value of 60%. The sales stage will be inserted between the Perception Analysis and Proposal/Price Quote stage.

Steps to Complete

  1. Navigate to Admin > Dropdown Editor.
  2. Locate and select "sales_stage_dom".   

    rest/v11/doc_PagesFiles/f3ce39cb-f471-426f-cfc6-55027f153608/file/uploadfile?force_download=0&platform=base  

  3. Enter "Review_Stage" into the Item Name field and "Review Stage" into the Display Label field. Click "Add".
    Sales Stage Dom AddReviewStage

  4. Drag and drop the "Review_Stage [Review Stage]" item between "Perception Analysis" and "Proposal/Price Quote". Click "Save".
    Note: For Sugar versions 12.0.x and higher, you can classify the stock/custom sales stages as "Open", "Closed Won", or "Closed Lost" by editing the sales stage and selecting the desired classification. 
    Sales Stage Dom AddReviewStage Save

  5. Next, locate and select "sales_probability_dom" in the Dropdown Editor.
    rest/v11/doc_PagesFiles/bb640d3c-5dfa-b6e9-f4cf-55027f86d89d/file/uploadfile?force_download=0&platform=base
  6. Enter "Review_Stage" into the Item Name field and "60" into the Display Label field. Click "Add".
    Note: The item name must match between the two dropdown lists.
    rest/v11/doc_PagesFiles/936d3685-89a1-6f78-2d32-55027fa75f14/file/uploadfile?force_download=0&platform=base
  7. Drag and drop the "Review_Stage [60]" item between "Perception Analysis" and "Proposal/Price Quote".
    rest/v11/doc_PagesFiles/1c1181e1-416a-562f-7a09-55027f6b6f84/file/uploadfile?force_download=0&platform=base
  8. Click "Save" to preserve your changes.
  9. Finally, navigate to Admin > Repair and perform a Quick Repair and Rebuild to propagate the changes throughout Sugar.

Application

Now that the custom sales stage and probability options have been added to the dropdown lists with identical item names, selecting the new sales stage, "Review Stage", will cause the Probability field to automatically update to "60".
sales

rest/v11/doc_PagesFiles/10e806ef-175c-4bb1-e6eb-55022f9bcfc8/file/uploadfile?force_download=0&platform=base