Resources Calculation

The Service Management API has been designed around the principle that provisioning actions depend on the resources of the 3rd party system. The amount of these resources that needs to be set for provisioning is calculated based on the characteristics of subscriptions and addons.

The amount of resources has to be controlled by the 3rd party system, so that it’s always synchronized with the interworks.cloud platform, and all quantity changes are taken into account. 

All these characteristics are provided to all related Service Manager API calls (Subscription Create, Subscription Update, Addon Create, Addon Update, Addon Cancel), every time a provisioning action is triggered by the interworks.cloud platform.

The way these characteristics should be used is up to the Service Manager API implementation that tries to translate the characteristics from subscription and addons to measured resources for the 3rd party system.

Enable/Disable Characteristics

A boolean characteristic allows us to enable a feature. This characteristic could be enabled upon the purchase of a subscription or later, through the purchase of an add-on.

The Service Manager API implementation must check the AttributeList on both subscription and addons to determine whether a feature is enabled or disabled for the 3rd party system.

For example, the following details should enable the Extra Feature resource in the 3rd party system, because the Addons-collection contains an Add-on that has an Extra Feature attribute with value of 1.

Subscription Details

{
    "AttributeList": {
        "extra_feature": {
            "ID": "extra_feature",
            "Name": "Extra Feature",
            "Value": "0",
            "Code": ""
        }
    }
}

Subscription Addon Details

"Addons": [
        {
            "AttributeList": {
                "extra_feature": {
                    "ID": "extra_feature",
                    "Name": "Extra Feature",
                    "Value": "1",
                    "Code": ""
                }
        },
       {
            "AttributeList": {
                "extra_feature": {
                    "ID": "extra_feature",
                    "Name": "Extra Feature",
                    "Value": "0",
                    "Code": ""
                }
        }
}]

Numeric Characteristics


Numeric characteristics allow us to determine the amount of a resource. These characteristics determine the resource amount which is the sum of resources delivered by the subscription and all the related add-ons.

To decide the total amount of a resource to be provisioned, the Service Manager API implementation must check the AttributeList on both subscription and addons and add up the amount of resources provided by each one.

Quantity Linked characteristics (“QuantityLinked=true”) should be multiplied by the subscriptions/addon quantity prior to being added to the total resources of a subscription.

For example, let us assume that the input for Addon Create endpoint has the following details:

Subscription Details

{
    "Quantity": 5,
    "AttributeList": {
        "users": {
            "ID": "users",
            "Name": "Users",
            "Value": "1",
            "Code": "",
            "QuantityLinked": true
        },
        "storage": {
            "ID": "storage",
            "Name": "Storage (GB)",
            "Value": "100",
            "Code": "",
            "QuantityLinked": false
        }
    }
}

The resources for the subscription only, are summed as:

  • Users: 5 x 1 = 5 Users (Quantity Linked attribute)
  • Storage: 100 GB (Non-Quantity Linked attribute)

Subscription Addon Details

"Addons": [
        {
            "Quantity": 10,
            "AttributeList": {
                "users": {
                    "ID": "users",
                    "Name": "Users",
                    "Value": "1",
                    "Code": "",
                    "QuantityLinked": true
                }
        },
       {
            "Quantity": 1,
            "AttributeList": {
                "storage": {
                    "ID": "storage",
                    "Name": "storage",
                    "Value": "50",
                    "Code": "",
                    "QuantityLinked": false
                }
        }
}]

The resources for the subscription addons are summed as follows:

  • Users: 10 x 1 = 10 Users (Quantity Linked attribute)
  • Storage50 GB (Non-Quantity Linked attribute)

So, the total resources to be provisioned for the subscription are:

  • Users:
    • 5 Users (Subscription)
    • 10 Users (Addons)
    • Total: 15 Users
  • Storage:
    • 100 GB (Subscription)
    • 50 GB (Addons)
    • Total: 150 GB