If the amount of the resource is specified as an integer (field Value type has the value "Integer"), there is always a scale of values for such resource.

The scale of values can be depicted as follows:

Value scale for Integer value type


Where:

Scale step — the minimum value by which you can change the amount of resource. It is specified in the resource settings, section Tariff limitsStep field.

Scale value area — all options that the client can choose on the scale. The range of values is defined by two parameters — the minimum and maximum values. These are specified in the resource settings, section Tariff limitsMinimum value and Maximum value fields. When ordering an addon, the client cannot go beyond these values.

When the scale is not configured, the cost of the additional resource is calculated as the number of steps to the desired value multiplied by the price of one step. Adjustment of the value scale allows you to create a dependence of the price of one step on the amount of purchased resource.

How to configure the value scale


Configuring the value scale means adding special prices for the resource. They affect the calculation of the cost of the additional resource ordered by the client.

In the diagram, special prices are marked with bold strokes — these are the special price points:

Value scale with special prices


Based on the diagram, the special price is applied when the user specifies the amount of the resource at a special price point, or greater.

In this way, the value scale is divided into several segments. In each of them, the price for one step is unique. For the purposes of this article, this section will be called a price sector:

Value scale with price sectors


For each scale you can set its type — Value scale type field in the resource settings. There are four types to choose from. Each type has its own logic of handling special price points:

  • Type: "By the nearest value" — points form price sectors. Step price is taken into account only in the current sector.
  • Type: "Per each scale step" — points form price sectors. Step price is taken into account in each sector.
  • Type: "Value packages" — depending on the location of points, value packages of different "volumes" are formed.
  • Type: "Possible values" — points form the value options available for order.

Scale type: "By the nearest value"


When By the nearest value is selected in the Value scale type field of the resource parameters, the selection of the resource quantity is represented by a scale with a slider on the service ordering page:

The value selected by the slider shows how much resource the client will receive for use. After the order, the amount of resource can be changed in any direction — both increased and decreased. The cost of moving to another value depends on the number of steps by which the amount of the resource has been changed. In this case, the funds can be returned to the customer, or they can be deducted.

The cost of the addon is defined as the number of steps multiplied by the price of one step in the current price sector. The price of a step in the previous sector does not affect the total cost of the additional resource.

For example, there is the following scale of the "RAM" resource values:

Value scale of the "RAM" resource


The client orders 3072 MiB of RAM and enters the second price sector of the value scale (1 step — 20 cents). There are five 512 MIB steps from the minimum value (512 MiB) to the specified value (3072 MiB). The cost of additional resource is: 20 * 5 = 100 cents.

Note:

It is not recommended to use refund to clients with this type of scale of values.

Scale type: "Per each scale step"


When Per each scale step is selected in the Value scale type field of the resource parameters, the selection of the resource quantity is represented by a scale with a slider on the service ordering page:

The value selected on the scale shows how much resource the client will receive for use. After the order, the amount of resource can be changed in any direction — both increased and decreased. The cost of moving to another value depends on the number of steps by which the amount of the resource has been changed. In this case, the funds can be returned to the customer, or they can be deducted.

The price of each step depends on the price sector in which it is located. The sum of prices of all steps generates the final cost of the additional resource.

For example, there is the following scale of the "RAM" resource values:

The client orders 3072 MiB of RAM and enters the second price sector of the value scale (1 step — 20 cents). There are 5 steps to the value specified: 3 of them are in the first price sector (1 step — 25 cents), and 2 are in the second price sector (1 step — 20 cents). The cost of additional resource is: (3 * 25) + (2 * 20) = 115 cents.

Scale type: "Value packages"


When Value packages is selected in the Value scale type field of the resource parameters, the selection of the resource quantity is represented by a list on the service ordering page:

This type of scale differs from those mentioned earlier. Its peculiarity is that only some values are available for selection – special price points. You cannot order an intermediate value.

All available list items are called value packages. The resource is ordered by packages — the ordered quantity is summed up with the one that the user already has. This type of scale is suitable for consumable resources (for example, traffic packages, technical support requests).

When ordering an additional value package, the client will be charged its full cost. It is impossible to reject the use of the ordered package and get the refund for it.

The cost of each value package is set by the hosting provider. It is always fixed and independent of other parameters.

For example, the cost of the tariff plan includes 512 MiB of traffic and has the following scale of the "Bandwidth" resource values:

Value scale for "Value packages" type


The provider has set up two special price points. When ordering an additional resource, the client will be able to select only from the two options: additional 2048 MiB or 4096 MiB. The client will not be able to order 3072 MiB of traffic.

The client selected the first value package — 2048 MiB. The cost of the service will be increased by 25 cents for the additional resource. As the tariff includes 512 MiB of traffic, the client will get 2560 MiB as a result. If then the customer orders a package of 4096 MiB, he will receive 6656 MiB of traffic.

Scale type: "Possible values"


When Possible values is selected in the Value scale type field of the resource parameters, the selection of the resource quantity is represented by a dropdown list on the service ordering page:

This type of scale has the same feature as the previous one: only some values are available for selection — special price points. You cannot order an intermediate value.

Each item in the list is a specific amount of the resource, which is composed of the special price point and the value included in the cost of the tariff. All available list items are called possible values. The first element in the list (512 MiB for 0 USD in the screenshot) always indicates the amount of the resource included in the price of the tariff.

This type of scale supports switching between options in both directions: both increase and decrease. In this case, the money can be returned to the customer, or they can be deducted.

The cost of the additional resource is calculated using the same algorithm as on the scale with the "By the nearest value" type. Special price points divide the scale into price sectors. The price for the additional resource is formed of the number of steps to the selected option multiplied by the price of a step in the current price sector.

For example, the cost of the tariff plan includes 512 MiB of RAM and has the following scale of the "RAM” resource values:

Value scale for type "Possible values"


The client orders additional 2048 MiB of RAM and enters the first price sector of the value scale (1 step — 10 USD). There are four 512 MiB steps each from the start of the scale to the selected option (2048 MiB). The cost of additional resource is: 10 * 4 = 40 USD. Since the price of the tariff includes 512 MiB of RAM, as a result the client will get 2560 MB of RAM.