How to show a list of services that customers need to delete to downgrade a package.
Overview
Customers can downgrade a package to a smaller package with fewer services. It is possible to configure Atomia Billing Customer Panel to show a message that asks customers to remove unsupported services in the new package before the downgrade.
Configuration
Billing customer panel finds unsupported services primarily by comparing global limitation between the current package and the downgrade package. If the current package contains a service that does not exist in the new package, or the number of services in the current package is greater than the limit in the downgrade package, a message in the Atomia Billing Customer Panel with the list of unsupported services will be shown:
The example above shows that CsSiteBuilder and CsLetsEncryptCertificate services should be removed to downgrade the package. In order to define custom messages for these two services that should be removed, one line could be added for every service in the file BillingCustomerPanel\bin\Atomia.Web.Plugin.BillingCustomerPanel.MySubscriptions.dll.config
, for example:
<provisioningServiceItem provisioningDescriptionName="CsSiteBuilder" resourceKey="SiteBuilder" linkToService="{HostingControlPanelRawURL}/{accountId}/Website/SimpleSettings/SiteBuilder/Index" showToCustomer="true" />; <provisioningServiceItem provisioningDescriptionName="CsLetsEncryptCertificate" resourceKey="LetsEncryptCertificate" linkToService="{HostingControlPanelRawURL}/{accountId}/SSL/LetsEncrypt" showToCustomer="true" />;
Attributes description:
- provisioningDescriptionName – The unsupported service name from the provisioning description.
- resourceKey – The resource name with the custom message for users. It is fetched from the resource file Atomia\BillingCustomerPanel\Themes\NewDefault\Views\MySubscriptions\App_LocalResources\Index.aspx.resx.
- linkToService – The link to the Atomia Hosting Control Panel page where a user can deactivate or remove the service.
- showToCustomer – Set to
false
if you want to hide the unsupported service message in the Atomia Billing Customer Panel and to allow downgrade without user removing the service (it will be removed automatically). Otherwise, set totrue
.
Custom messages should be added in the file Index.aspx.resx. You can use encoded HTML in the message and placeholders servicesNumberExeeded
and linkToService
. For example, you can add next two lines for services CsSiteBuilder and CsLetsEncryptCertificate:
<data name="SiteBuilder" xml:space="preserve">; <value><a href="{linkToService}">Site builder</a> - {servicesNumberExeeded} must be removed</value>; </data> <data name="LetsEncryptCertificate" xml:space="preserve">; <value><a href="{linkToService}">Lets encrypt certificate</a> - {servicesNumberExeeded} must be removed</value>; </data>
The Atomia Billing Customer Panel will display the messages like this: