Custom Commission Calculation

The OCC UI now supports a number of different formulas and steps to build out a custom commission configuration. This functionality must be configured in the web but once configured will work in the mobile app as well, both on and offline.

Implementation

The commission configuration section can be found in the new org admin UI/UX under Estimator > Commission.

Picture 1, Picture

Data Layout 

  • Name: This is the name of the commission configuration. It is a string, should be required and does NOT have any specific requirements.
  • Required: This is an array of items that are required to be present in order to generate a commission value. If the required values are NOT present it will throw an error. The following is a list of properties which are valid for this array:
    • Greenline Percentage: This is the value available in the org.settings.config['estimator']['commission_calculator']['greenline_percentage']
    • Overhead: This is the value that comes from the estimate’s job’s assigned user’s access to the org.
    • Commission Rate: This is the value that comes from the estimate’s job’s assigned user’s access to the org.
  • Test Data: Choose a job and estimate to validate the commission as it’s built. Note that the commission configuration cannot be saved until it has been validated with test data.

  • Steps: This is an array that is built up of “steps” that are utilized to calculate the commission. Each step will include the following properties:
    • Name: This is the “variable” name of the step. It should NEVER include spaces in the name and should be forced to lower case. This name can be utilized in the formula of other steps in the configuration.
    • Formula: The logical formula (utilizing operators, etc.) to calculate the value of this step. Having something in this field is REQUIRED. Below are accepted variables:
      • estimate_total_cost
      • estimate_total_price
      • estimate_discount_amount
      • estimate_financed_amount
      • estimate.payment_terms
      • estimate_subtotal
      • estimate_tax_rate
      • estimate_tax_total
      • estimate_taxable_amount
      • finance_merchant_fee
    • Title: This is “user facing” name of the step that, if present, will be displayed when showing the output.
    • Display: There is a list of available displays that will take the data calculated as a part of the formula and display it in that format. The list of valid options are:
      • Percent: The output of the formula is then multiplied * 100 and displayed rounded to 2 decimal points with a % at the end.
      • Currency: The output value is rounded to 2 decimal points and displayed with $
      • Hidden: Is NOT displayed in the output
      • None: The output value is rounded to 2 decimal points

Examples: 

A screenshot of a computer

AI-generated content may be incorrect., Picture

Picture 1, Picture

 

Sample Configuration: 

  "name": "PAR Pricing", 

  "required": [], 

  "steps": [ 

    { 

      "name": "standard_price", 

      "formula": "estimate_subtotal", 

      "title": "Standard Price", 

      "display_format": "currency" 

    }, 

    { 

      "name": "net_sale_price", 

      "formula": "estimate_total_price", 

      "title": "Net Sale Price", 

      "display_format": "currency" 

    }, 

    { 

      "name": "par_price", 

      "formula": "estimate_subtotal * 0.80", 

      "title": "PAR Price", 

      "display_format": "currency" 

    }, 

    { 

      "name": "sales_price_percent_of_par", 

      "formula": "net_sale_price / par_price", 

      "title": "Net Sale Price % of PAR", 

      "display_format": "percentage" 

    }, 

    { 

      "name": "starting_commission", 

      "formula": "0.092", 

      "title": "Starting Commission Percentage", 

      "display_format": "percentage" 

    }, 

    { 

      "name": "commission_adjustment_percentage", 

      "formula": "IF(sales_price_percent_of_par >= 1, 1, IF(sales_price_percent_of_par >= 0.99, 0.9, IF(sales_price_percent_of_par >= 0.98, 0.8, IF(sales_price_percent_of_par >= 0.97, 0.7, IF(sales_price_percent_of_par >= 0.96, 0.6, IF(sales_price_percent_of_par >= 0.95, 0.5, IF(sales_price_percent_of_par >= 0.94, 0.4, IF(sales_price_percent_of_par >= 0.93, 0.3, IF(sales_price_percent_of_par >= 0.92, 0.2, IF(sales_price_percent_of_par >= 0.91, 0.1, IF(sales_price_percent_of_par >= 0.9, 0.05, 0)))))))))))", 

      "title": "Adjusted Commission Percentage", 

      "display_format": "percentage" 

    }, 

    { 

      "name": "effective_commission_rate", 

      "formula": "commission_adjustment_percentage * starting_commission", 

      "title": "Effective Commission Rate", 

      "display_format": "percentage" 

    }, 

    { 

      "name": "estimated_commission", 

      "formula": "effective_commission_rate * net_sale_price", 

      "title": "Estimated Commission", 

      "display_format": "currency" 

    } 

  ]