If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Creating a Commission Base Formula

The Commission Base Formulas service provides an organization with a powerful method to define how it calculates commission bases. The Commission Base Formulas service contains the recipe or formula for calculating a commission base for each commissionable product sold. The Commission Base Formula record identifies the source transactions, the trigger date field used to filter specific source transactions, and the formula that identifies the fields from the source transactions that are used to derive the commission base. A commission base is calculated as specified in the formula and totaled for the commission period. The commission base, once calculated, is evaluated against a commission rate scale and totaled to derive the commission payment.

Follow these steps to create a Commission Base Formula record:

  1. Open a new Commission Base Formula record from the Commission Base Formulas service.
  2. In the Name field, enter a name to identify the base formula.
  3. Enter a description.
  4. From the Formula tab, specify the Commission Source.
    • Only commission sources defined in the Commission Sources service are available.

  5. Select a Source Trigger Date from the list in the Source Trigger Date field.
    • Only trigger date fields available in the commission source view previously selected can be used to identify which business transaction records are used to calculate the commission. The SQL View field name alias must begin with a # in the code to be viewable in the Source Trigger Date field. See the code in Sample Commissions SQL Views Code to identify the source trigger date field name aliases.

      Possible date fields in the Commission Sources record pre-installed in the commission's module include:

      Field

      Source

      GUI

      Order Date

      Orders

      Customer tab

      Deposit Date

      Orders

      Hidden field for all payment types except PO and Credit Memo

      Promise Date

      Orders

      Shipping tab

      Ship Date

      Orders

      Shipping tab

      Arrival Date

      Orders

      Shipping tab

      Due Date

      Orders

      Payment tab for PO payment types

  6. Select the Aggregate Function to apply to the group of commission source records that are totaled over a defined commission period. Function options include:
    • Sum: Adds the commission bases of all the records for a specific date range.
    • Count: Returns the number of commission bases that can be calculated for a specific date range.
    • Average: Returns an average commission base for the specific date range.
    • Minimum: Returns the minimum commission base for a specific date range.
    • Maximum: Returns the maximum commission base for a specific date range.

  7. The Available Formula Fields section of the Formula tab displays the commission source and a list of available fields from that source. The SQL View field name alias must begin with a $ in the code so that the field names display in the Available Formula Fields. See the code in Sample Commissions SQL Views Code to identify the available formula field name aliases.
    • Expand the commission source view to view the available fields to use in the commission base formula.
    • Find the desired field to include in the formula and double-click on the field icon to move it down to the Commission Base Formula section.
    • The formula created cannot be directly edited in the Commission Base Formula section. Instead, use the toolbar functions to add formula fields, insert operators into the formula, erase the entire formula, remove the last entry from the formula, or insert numbers into the formula. The formula's syntax can also be tested from the toolbar before it is saved, by clicking on the text syntax button.

  8. Add the desired operators to the formula by selecting them from the toolbar located above the Commission Base Formula section.
  9. To add a static number to the formula, enter the desired number in the text box located to the right of the operator toolbar and click on the Insert Number button.
  10. Click Save to finish creating the Commission Base Formula record. Upon each save of the record, the formula's syntax is tested. The record will not save unless the syntax is correct.

    Reusing Stored Base Formulas

     Any base formulas already saved can be used in another Commission Base Formula that lists the same commission source. To reuse a formula, select a Stored Base Formula from the Available Formula Fields section and add the additional operators and additional fields to create the new Commission Base Formula. All Commission Base Formulas with the same commission source are listed in a Stored Base Formula object and can be used or modified in a new Commission Base Formula record with the same commission source.

Commission Base Formula Record

Copyright © 2014-2019 Aptify - Confidential and Proprietary