Manual provisioning

665 views 0

How to configure manual provisioning for a product.

Overview

Manual provisioning by default is sending email to specific email addresses when a product is bought, renewed or deleted. It can also be configured to hold on provisioning action until the administrator manually clicks on “Resolve” action for a specific subscription.

Configuring manual provisioning with email

To enable manual provisioning for products and set the email addresses, you will need to edit BillingApiWeb.config file that is located in the folder C:\Program Files (x86)\Atomia\BillingAPIs. Here is an example of a transformation file with name Web.ManualProvisioning.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
	<atomiaBilling xmlns="atomiaBilling">
		<provisioningOrders>
			<provisioningOrder provisioningService="ManualProvisioningWithEmail" order="10" xdt:Transform="Insert" />
		</provisioningOrders>
	</atomiaBilling>
	<atomiaProvisioningConfiguration xmlns="atomiaProvisioning">
		<provisioningDescriptionMappings>
			<provisioningDescription name="ProvisioningDescription" xdt:Locator="Match(name)">
				<packages>
					<package name="ManualProvisioningWithEmail" type="Custom" xdt:Transform="Insert" />
				</packages>
			</provisioningDescription>
		</provisioningDescriptionMappings>
		<atomiaProvisioningHosting>
			<manuallyProvisionedProducts xdt:Transform="Insert">
				<manuallyProvisionedProduct name="ManualProvisioningWithEmail" provisioningService="ManualProvisioningWithEmail" handlerClass="Atomia.Billing.Plugins.ProvisioningPlugins.AtomiaProvisioningPlugin.ManuallyProvisioningHandler, Atomia.Billing.Plugins.ProvisioningPlugins.AtomiaProvisioningPlugin">
					<onAdd template="ManualProvisioningAddTemplate">
						<notification recipient="[email protected]"/>
					</onAdd>
					<onDelete template="ManualProvisioningDeleteTemplate">
						<notification recipient="[email protected]"/>
					</onDelete>
					<onRenew template="ManualProvisioningRenewalTemplate">
						<notification recipient="[email protected]"/>
					</onRenew>
					<onDowngrade template="ManualProvisioningDowngradeTemplate"></onDowngrade>
					<onUpgrade template="ManualProvisioningUpgradeTemplate"></onUpgrade>
					<onSuspend template="ManualProvisioningOnSuspendTemplate"></onSuspend>
					<onUnsuspend template="ManualProvisioningUnsuspendTemplate"></onUnsuspend>
				</manuallyProvisionedProduct>
			</manuallyProvisionedProducts>
		</atomiaProvisioningHosting>
	</atomiaProvisioningConfiguration>
</configuration>

The email addresses [email protected] should be replaced with your email addresses. Additionally, it is possible to configure and get email notifications when a subscription is downgraded, upgraded, suspended or unsuspended.

Keep in mind

If the manual provisioning is configured for a specific product, the option Re-provision must be enabled for that product. This option is available in Options section on the Edit product page for products with the recurring type of billing. If the re-provision option is disabled, the email will not be sent when the product is renewed.

Configuration options

The first configurable element is provisioningOrder which has attributes:

  • provisioningService – The name of the provisioning service. It must be the same as attribute provisioningService in the manuallyProvisionedProduct element.
  • order – Order in the provisioning process.

The second configurable element is package with attributes:

  • name – This value is visible in Edit product page inside the Provisioning service dropdown. It must match the name attribute value inside the manuallyProvisionedProduct element.
  • type – This should be Custom.

Next configurabe element is manuallyProvisionedProduct:

  • name – The name of the product. It can by any text.
  • provisioningService – The provisioning service name. It can by any text.
  • handlerClass – You probably don’t want to change this.

Finally, inside manuallyProvisionedProduct section you can set email template and email addresses for notifications:

  • template – Template name which will be used for emails. The mail template specified here must exist in the admin panel. This mail template is defined by two mail templates in the admin panel, one with suffix EmailSubject and the other with suffix EmailBody. For instance, if you set template="ManualProvisioningAddTemplate", you need to create ManualProvisioningAddTemplateEmailSubject and ManualProvisioningAddTemplateEmailBody templates in the admin panel.
  • recipient – Email address where the emails will be sent. You can find more information in the section Defining email addresses that is below.

Defining email addresses

Email address in the recipient attribute can be set in different ways:

  • Setting an email address directly, e.g. recipient="[email protected]".
  • You can define a property in the unattended.ini file and use its value as email address. For example, if you define the section CustomData and the property SupportEmail under the section CustomData, then you can use that property value like this recipient="{CustomData/SupportEmail}".
  • Using customers and resellers email addresses:
    • Customers main email address, e.g. recipient="customer.main".
    • Customers billing email adrress, e.g. recipient="customer.billing".
    • Customer shipping email address, e.g. recipient="customer.tech".
    • Resellers main email address, e.g. recipient="reseller".

Manual provisioning with resolve action

Subscriptions for manually provisioned products can be set in the provisioning status Pending manual provisioning. This allows you to track manually provisioned subscriptions on the subscriptions page in the admin panel. Once a product is manually provisioned, you need to resolve Pending manual provisioning provisioning status for a subscription. Resolved subscriptions will be set in the provisioning status Provisioned after some time.

Resolving subscription manual provisioning

There is a button Resolve Manual Provisioning on the subscriptions page that should be used to resolve manual provisioning for subscriptions. This button is hidden by default, but it becomes visible when you include subscriptions with provisioning status Pending manual provisioning on the subscriptions page in the admin panel.

Good to know

After resolving a subscription, the subscription provisioning status will be reset and the subscription will be provisioned with email provisioning handler which can send emails.

Keep in mind

Manual provisioning will not work completely for some specific subscriptions product categories like Domain, Domain Transfer and Hosting.

Configuration

It can be configured for actions add, delete and renewal which correspond to subscriptions statuses OK, Terminated and Renewal. Configuration is the same as for manual provisioning with email that is described above. You should only add the next XML section inside the tag atomiaBilling, right next to tag provisioningOrders:

<manualProvisioningServices>
    <manualProvisioningService name="ManualProvisioningWithEmail" xdt:Transform="Insert">
        <manualProvisioningState value="OK" />
        <manualProvisioningState value="Renewal" />
        <manualProvisioningState value="Terminated" />
    </manualProvisioningService>
</manualProvisioningServices>

If you do not want to send email notifications when a product is provisioned, you can remove email configuration. In that case, the transformation file should look like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <atomiaBilling xmlns="atomiaBilling">
        <provisioningOrders>
            <provisioningOrder provisioningService="ManualProvisioningWithEmail" order="10" xdt:Transform="Insert" />
        </provisioningOrders>
        <manualProvisioningServices>
            <manualProvisioningService name="ManualProvisioningWithEmail" xdt:Transform="Insert">
                <manualProvisioningState value="OK" />
                <manualProvisioningState value="Renewal" />
                <manualProvisioningState value="Terminated" />
            </manualProvisioningService>
        </manualProvisioningServices>
    </atomiaBilling>
    <atomiaProvisioningConfiguration xmlns="atomiaProvisioning">
        <provisioningDescriptionMappings>
            <provisioningDescription name="ProvisioningDescription" xdt:Locator="Match(name)">
                <packages>
                    <package name="ManualProvisioningWithEmail" type="Custom" xdt:Transform="Insert" />
                </packages>
            </provisioningDescription>
        </provisioningDescriptionMappings>
        <atomiaProvisioningHosting>
            <manuallyProvisionedProducts xdt:Transform="Insert">
                <manuallyProvisionedProduct name="ManualProvisioningWithEmail" provisioningService="ManualProvisioningWithEmail" handlerClass="Atomia.Billing.Plugins.ProvisioningPlugins.AtomiaProvisioningPlugin.ManuallyProvisioningHandler, Atomia.Billing.Plugins.ProvisioningPlugins.AtomiaProvisioningPlugin">
                </manuallyProvisionedProduct>
            </manuallyProvisionedProducts>
        </atomiaProvisioningHosting>
    </atomiaProvisioningConfiguration>
</configuration>

Also, you can make different combinations. For example, you can use provisioning with email for a subscription renewal and provisioning with resolve action for a subscription termination.

Was this helpful?