Subscription management#
All spaces are owned by an organization, which serves as the entity with legal authority for all content. By default, every organization is granted 5 Gigabyte of storage, covering all its spaces. An organization can purchase a service subscription in order to extend the storage limit.
Purchasing subscriptions is handled by Skalio ID.
Products#
Spaces manages the mapping between subscribed product and storage limits in the products
table. When registering products, it is vital to match the domain
and productId
as set in Skalio ID and its subscription management.
Note: Spaces will ignore subscription updates relating to products that are not registered.
Use the command product create
to register new products:
spaces-backend> product create
Create a new entry in the products table
Product domain > spaces
Product Id > business
Allocated Storage [GB] > 50
Creating ProductDAO{spaces/business} in the database ...
Confirm (y/N)? y
Success
Use the command product list
to see all registered products:
spaces-backend> product list
List of all products
Product Domain | Product ID | Storage Limit [GB]
------------------------------------------------------------------
spaces | business | 50
spaces | premium | 1000
spaces | enterprise | 50000
Processing changes#
When Skalio ID detects a change in the subscriptions of an organization, it informs other Skalio services of this event by publishing an ISubscriptionUpdate
on the message broker.
Payload:
orgUid
(string, required): The unique ID of the organization.updatedAt
(string, required): The timestamp when the update became effective.expiresAt
(string, optional): The timestamp when the subscription is being cancelled;null
otherwise.domain
(string, required): The product domain. Values:spaces
: Novospaceskp
: TeamBeam
productId
(string, required): The ID of the product.status
(string, required): The subscription status. Values:active
trialing
canceled
unpaid
past_due
incomplete
incomplete_expired
Example:
{
"orgUid" : "pep6umv2hzzhhj64",
"updatedAt" : "2022-07-13T11:50:52.085287Z",
"expiresAt" : null,
"domain" : "spaces",
"productId" : "business",
"status" : "active"
}
Spaces will match the orgUid
to an existing organiation. If none is found, it will create the organization automatically. Afterwards the storage limits as per the subscribed product is applied.
Changes to the capacity of an organization are published via the event feed to all collaborators of the organization's spaces.
Subscription cancellation or downgrade#
Skalio ID informs the registered services, when a customer's subscription has run out. Spaces will in this case reduce the allocated storage limit to the default non-subscribed value of 5GB. This may result in limited service for the spaces if they now exceed the reduced storage limit.
The same applies for downgrades from a higher tier to a lower tier.