Prices

Product & Bonds price

Context

The prices of the products included in MasStack ’s commercial offer are articulated through the following fees. As explained in the Products guide , there are several products and bonus models that include a list of fees in their model. The following diagram reflects this fact in a simplified form. Thus, calculating the price of a product is different depending on whether it is a stand-alone product or a bundled product.

erDiagram CommercialProduct ||--o{ FreeUnitsPackage : compose BundledCommercialProduct ||--o{ CommercialProduct : implements BundledProduct ||--o{ BundledCommercialProduct : compose BundledCommercialProduct ||--o{ ListOfFees : contains CommercialProduct ||--o{ ListOfFees : contains FreeUnitsPackage ||--o{ ListOfFees : contains

Fee model

Name Description
type
subtype
from
to
values.currency
values.value
values.tax_exempted
values.tax_included
1
2
3
{

}

Retrieve adequate fee

As shown, a list of fees can be found associated with the products but not always a single fee per fee type. Why is this? Because a product can change its price over time. Therefore, knowing how to choose the right fee is essential to know the price of the product.

The first is differentiating the different fee types that are applicable. Then, following logic can be applied for each fee type, so that it can be shown total amount per fee type (i.e. ActivationFee, ServiceFee…):
In case you want to retrieve de adequate fee of a sold product in a subscription, the steps are:

  1. Select the correct one is to identify the available period of the fee. It can be found in fields from - to of the model
  2. Retrieve from MasCustomers the date on which the customer activated the product you are querying. The appropriate fee is the one whose from - to period includes the date of activation or purchase of the product.

However, in the context of selling a new instance, it is necessary applying this logic with the current date instead of the date when the customer activate the product.

Standalone Product Price

Retrieving the price of a standalone product (a commercial product) is really easy. Simply consult the commercial product adequate fee -see the section above- and add, if necessary, the corresponding taxes. You can use fields values.tax_exempted and values.tax_included to determinate if is necessary or not to add the taxes.

Bundled Product Price

Retrieving the price of a bundled product is somewhat more complicated than the previous case. The first step is to calculate the base price of the mandatory products of the bundle. By using the example shown in bundled product example , to calculate the base price of this product you may:

  • Get adequate fee of the broadband bundled commercial product
  • Get adequate fee of the landline bundled commercial product
  • Get adequate fee of the main line mobile bundled commercial product
  • Aggregate the three fees adding, if necessary, the taxes