Commission Calculation with Table-Valued Functions

Dealer, sales or any other kind of commissions can be calculated quite easily with the table functions of the .net library finaquant® calcs, as the following example will demonstrate.

In this article we explain:

  1. Basic transaction-based (sales data) commission scenario
  2. How commissions can be calculated with the table functions
  3. How input data can be fetched from external databases
  4. How periodic commission calculations can be automated

Commission Scenario

  • Dealers receive sales commissions proportional to their sales totals for each product group in a quarter.
  • Product groups (or pools) can be defined by category or individual products for each dealer.
  • The commission scale with tiered rates (class or level scale logic) for each product group (or pool) determines the amount of commissions to be paid.

Data Flow & Calculation

Data Flow & Commission Calculation

All input tables are fetched from an external database using the event functions of Calculation Nodes that are triggered before any input table is read from the Generic Database. Continue reading

Digiprove sealCopyright secured by Digiprove © 2013 Tunc Ali Kütükcüoglu
Posted in Fee and commission calculations | Tagged , | Leave a comment

Anatomy of Table Addition

With the following examples we want to demonstrate the practicality and versatility of table functions related with various addition operations.

These examples may also provide our readers with a general idea about the logic of table functions included in our .net libraries finaquant® protos (non-commercial) and finaquant® calcs (commercial).

Let’s begin with the simplest case.

How to add a scalar number to all key figures of a table

using FinaquantCalcs;
...
ResultTable = CostTable + 500;
MatrixTable.View_MatrixTable(ResultTable, "CostTable + 500");

Adding a scalar number to all key figures of a table

What if you want to add a scalar not to all key figures, but only to a selected one? Continue reading

Digiprove sealCopyright secured by Digiprove © 2013 Tunc Ali Kütükcüoglu
Posted in Calculation engine | Tagged | Leave a comment

Application Scope of Calculation Engine finaquant® calcs

The upcoming .NET Library finaquant® calcs can be used to transform raw historical data into useful information for both operational and analytical purposes.

Application Scope of finaquant® calcs

Example for operations:
Calculation of Dealer or Sales Commissions, Performance Fees etc. to ultimately produce some invoices through reporting.

Example for decision support:
Simulations for prediction models or optimizations, like estimated sales or expected commission amounts. Note that the final data visualization is the job of reporting.

Remember that DotNet Calculation Engine finaquant® calcs has two primary features:

  1. Table functions (i.e. functions with tables as input & output parameters)
  2. Calculation Nodes & Networks

finaquant® calcs will presumably be available until the end of July 2013.

Digiprove sealCopyright secured by Digiprove © 2013 Tunc Ali Kütükcüoglu
Posted in Calculation engine | Tagged , , | Leave a comment

Calculation Nodes and Networks

The .NET Calculation Engine library finaquant® calcs (available until August 2013) will comprise Calculation Nodes and Networks in addition to the table functions of the non-commercial finaquant® protos.

The term table function should be clear by now: Functions with in-memory data tables as input and output parameters.

These table functions can be compared to an extensive library of general-purpose Stored Procedures of a database like Oracle or MySQL, or to FOX formulas of some SAP business applications.

But what are these Calculation Nodes and Networks?

Calculation Node

A Calculation Node is a single unit (Worker Ant) of a Calculation Network (i.e. network of nodes) that carries a single table function. In compliance with its table function, a node can have multiple input and output tables.

A Calculation Network with two Nodes

Briefly, a Calculation Node can accomplish the following tasks:

  1. Reads all its input tables from various data stores, or from the output of a another node.
  2. Checks if all input tables are valid.
  3. Executes the assigned table function to generate output tables.
  4. Checks if all output tables are valid.
  5. Writes output tables to the configured data stores. The most typical data store is the generic database as explained in article: http://software.tuncalik.com/persistent-table-array/3330

Continue reading

Digiprove sealCopyright secured by Digiprove © 2013 Tunc Ali Kütükcüoglu
Posted in Calculation engine | Tagged , , , | Leave a comment