4. Configuration

4.1. Atomia Billing API configuration

4.1.1. NHibernate (database connection) configuration

The database access configuration is placed into the hibernate-configuration section of the API web.config file. This is the standard NHibernate configuration section with only one property to change - connection.connection_string . Its value is the connection string for the AtomiaBilling database. Here are some examples of this configuration with and without integrated security:

<property name="connection.connection_string">
Server=localhost;Initial Catalog=AtomiaBilling;Integrated Security=True
</property>
<property name="connection.connection_string">
Server=localhost;Initial Catalog=AtomiaBilling;user id=atomiabilling;password=**********
</property>

4.1.2. Atomia Billing API main configuration

The Atomia Billing API core configuration is placed inside the atomiaBilling configuration section. It has several attributes and subsections (elements):

  • Attributes :

    • provisioningPluginName - name of the provisioning plug-in to be used in application.

    • invoiceTemplatingPluginName - name of the invoice templating plug-in to be used in application.

    • hostingCategoryName - name of the hosting category.

    • domainCategoryName - name of the domains category.

    • onlyRoleBasedAuthorization - determines whether authorization is performed based on role data only or if operation data should be included too. Can be true or false .

    • permanentCampaignCode - campaign code which will be applied to all orders.

    • itemEmailSubjectTemplateNameFormat and itemEmailBodyTemplateNameFormat - formats of template names for subject and body of e-mails sent after provisioning is done

  • Elements :

    • pdfPrintLocation - used for specifying the root folder on the hard drive for saving printed invoices (PDF files) and its root url used for downloading created files:

      <pdfPrintLocation fileRootPath="e:\Program Files\Atomia\Atomia Billing API\PDFs\" urlRootPath="http://billingapi.atomia.com/pdfs/" />
    • packageCategoryNames - contains list of categories which are used for package products

      <packageCategoryNames>
      <packageCategoryName name="DNS" />
      <packageCategoryName name="Hosting" />
      </packageCategoryNames>
    • templates - contains templates which will be used for invoices and credit invoices. There should be configured templates of following types: Default , FullGraphics and NoBackground . They will be used with adequate print options.

      <templates>
       <invoicePrintTemplates>
         <printTemplate key="Default" name="DefaultInvoicePrintTemplate" />
         <printTemplate key="FullGraphics" name="FullGraphicsInvoicePrintTemplate" />
         <printTemplate key="NoBackground" name="NoBackgroundInvoicePrintTemplate" />
       </invoicePrintTemplates>
       <creditInvoicePrintTemplates>
         <printTemplate key="Default" name="DefaultCreditInvoiceTemplate" />
         <printTemplate key="FullGraphics" name="FullGraphicsCreditInvoiceTemplate" />
         <printTemplate key="NoBackground" name="NoBackgroundCreditInvoiceTemplate" />
       </creditInvoicePrintTemplates>
      </templates>
    • authorization - contains configuration for checking whether users have permission for requested operations. It contains a list of operation containers ( operationContainers element), object resolvers ( objectResolvers element) and explicitly allowed users ( explicitlyAllowedUsers element). Operation containers and object resolvers are specified by setting fullClassName to their fully qualified type name while explicitly allowed users are specified by their names:

      <authorization>
       <operationContainers>
         <operationContainer fullClassName="Atomia.Billing.Core.Sdk.IAtomiaBillingApi, Atomia.Billing.Core.Sdk" />
       </operationContainers>
       <objectResolvers>
         <objectResolver fullClassName="Atomia.Billing.Core.Sdk.Authorization.AuthorizationHelper, Atomia.Billing.Core.Sdk" />
       </objectResolvers>
       <explicitlyAllowedUsers>
         <allowedUser name="User one"/>
         <allowedUser name="User two"/>
       </explicitlyAllowedUsers>
      </authorization>
    • stateRules - defines possible customer and subscription state transitions.

      <stateRules>
       <state name="OK">
         <rules>
           <rule name="Suspended" />
           <rule name="Closed" />
         </rules>
       </state>
       <state name="Suspended">
         <rules>
           <rule name="Unsuspended" />
           <rule name="Closed" />
         </rules>
       </state>
       <state name="Unsuspended">
         <rules>
           <rule name="OK" />
           <rule name="Closed" />
           <rule name="Suspended" />
         </rules>
       </state>
      </stateRules>
    • subscribtionProvisioningProcess - defines configuration of subscription provisioning processes. The subscribtionProvisioningProcess configuration section contains attributes and elements which specify the maximum number of attempts for provisioning of one item and intervals for those specific attempts. These values are used by the scheduler to determine when items will be provisioned.

      <subscribtionProvisioningProcess maxAttempts="10">
       <attemptsCollection>
         <attemptDescription attemptCount="2" interval="5"/>
         <attemptDescription attemptCount="3" interval="10"/>
         <attemptDescription attemptCount="4" interval="30"/>
       </attemptsCollection>
      </subscribtionProvisioningProcess>

Here is complete atomiaBilling configuration section example:

<atomiaBilling xmlns="atomiaBilling" provisioningPluginName="AtomiaProvisioningHosting" invoiceTemplatingPluginName="InvoiceTemplating" referenceNumberPluginName="ReferenceNumberPlugin" hostingCategoryName="Hosting" onlyRoleBasedAuthorization="true">
 <packageCategoryNames>
   <packageCategoryName name="DNS" />
   <packageCategoryName name="Hosting" />
 </packageCategoryNames>
 <templates>
   <invoicePrintTemplates>
     <printTemplate key="Default" name="DefaultInvoicePrintTemplate" />
     <printTemplate key="FullGraphics" name="FullGraphicsInvoicePrintTemplate" />
     <printTemplate key="NoBackground" name="NoBackgroundInvoicePrintTemplate" />
   </invoicePrintTemplates>
   <creditInvoicePrintTemplates>
     <printTemplate key="Default" name="DefaultCreditInvoiceTemplate" />
     <printTemplate key="FullGraphics" name="FullGraphicsCreditInvoiceTemplate" />
     <printTemplate key="NoBackground" name="NoBackgroundCreditInvoiceTemplate" />
   </creditInvoicePrintTemplates>
 </templates>
 <authorization>
   <operationContainers>
     <operationContainer fullClassName="Atomia.Billing.Core.Sdk.IAtomiaBillingApi, Atomia.Billing.Core.Sdk" />
   </operationContainers>
   <objectResolvers>
     <objectResolver fullClassName="Atomia.Billing.Core.Sdk.Authorization.AuthorizationHelper, Atomia.Billing.Core.Sdk" />
   </objectResolvers>
   <explicitlyAllowedUsers>
     <allowedUser name="User one" />
     <allowedUser name="User two" />
   </explicitlyAllowedUsers>
 </authorization>
 <pdfPrintLocation fileRootPath="e:\Program Files\Atomia\Atomia Billing API\PDFs\" urlRootPath="http://billingapi.atomia.com/pdfs/" />
 <stateRules>
   <state name="OK">
     <rules>
       <rule name="Suspended" />
       <rule name="Closed" />
     </rules>
   </state>
   <state name="Suspended">
     <rules>
       <rule name="Unsuspended" />
       <rule name="Closed" />
     </rules>
   </state>
   <state name="Unsuspended">
     <rules>
       <rule name="OK" />
       <rule name="Closed" />
       <rule name="Suspended" />
     </rules>
   </state>
 </stateRules>
 <subscribtionProvisioningProcess maxAttempts="10">
   <attemptsCollection>
     <attemptDescription attemptCount="2" interval="5" />
     <attemptDescription attemptCount="3" interval="10" />
     <attemptDescription attemptCount="4" interval="30" />
   </attemptsCollection>
 </subscribtionProvisioningProcess>
</atomiaBilling>

4.1.3. Search property configuration

This configuration is used for searching entities of a defined type and in defined state in specific situations. Currently, it is used for checking whether domain names exist in orders and subscriptions. This search is performed as part of the availability check before registration and transfer of domain names. The onfiguration is defined in the searchPropertyConfiguration section of web.config. Search object definitions are specified as a list of searchObject elements. It has the following attributes and elements:

  • type (attribute) - type of entity to be searched for. List of searched objects include Orders, Order Lines and Subscriptions.

  • forSearch (attribute) - type of search where the searchObject element is used. Can be DomainCheck and DomainCheckForTransfer.

  • allowedStates (element) - contains a list of states of defined types to be matched. These states are specified as state elements with the attribute name for setting allowed state.

  • properties (element) - contains a list of properties to be matched. The list of properties is specified with property elements with the attribute name for setting the property name.

4.1.3.1. Example 1
<searchPropertyConfiguration xmlns="publicOrderService">
 <objects>
   <searchObject type="Order" forSearch="DomainCheck">
     <allowedStates>
       <state name="1"/>
       <state name="3"/>
       <state name="5"/>
     </allowedStates>
     <properties>
       <property name="DomainName"/>
     </properties>
   </searchObject>
 </objects>
</searchPropertyConfiguration>

In this example, search object configuration is defined for search in DomainCheck method for entity Order . It filters DomainName property for orders in state 1, 3 and 5.

4.1.3.2. Example 2
<searchPropertyConfiguration xmlns="publicOrderService">
 <objects>
   <searchObject type="Subscription" forSearch="DomainCheck">
     <allowedStates>
       <state name="OK"/>
     </allowedStates>
     <properties>
       <property name="DomainName"/>
     </properties>
   </searchObject>
 </objects>
</searchPropertyConfiguration>

Like in the previous example, this configuration sets up a search for the DomainCheck method but for Subscription entities. It filters subscriptions in state OK with the same properties.

4.1.4. Default e-mail client configuration

In the default configuration, Atomia Billing API uses its implementation of IEmailClient for sending messages. It should be configured by adding a defaultEmailClientConfig configuration section to web.config . It has the following attributes:

  • host - hostname of the mail server.

  • port - port number for the SMTP service on the mail server.

  • username - username for logging into the mail server.

  • password - password for logging into the mail server.

  • ssl - value indicating whether to use SSL or not (yes or no).

Here is an example of a default e-mail client configuration:

<defaultEmailClientConfig
 host="smtp.foobar.com"
 username="foobar"
 password="******"
 port="25"
 ssl="true"
 xmlns="Atomia.Billing.Core.Sdk.Utils.Email.DefaultEmailClient" />

4.1.5. Reports Configuration

Reports engine in Billing is based on using stored procedures in the database. Because of that, connection string for the database has to be configured, which is done in reportsConfiguration section:

<reportsConfiguration xmlns="reportsConfiguration" connectionString="Data Source=localhost;Initial Catalog=AtomiaBilling;Integrated Security=True" />

4.1.6. Shop validators configuration

When shops are saved, validation is performed by configured shop validators. List of active validators is configured in Unity section of Atomia Billing API config file. The following figure shops list of predefined validator types and their registration for usage in the code.

<unity>
  <typeAliases><typeAlias alias="IShopHelper" type="Atomia.Billing.Core.Sdk.BusinessLogic.IShopHelper, Atomia.Billing.Core.Sdk" />
    <typeAlias alias="ShopHelper" type="Atomia.Billing.Core.Sdk.BusinessLogic.ShopHelper, Atomia.Billing.Core.Sdk" />
    <typeAlias alias="IShopValidator" type="Atomia.Billing.Core.Sdk.BusinessLogic.IShopValidator, Atomia.Billing.Core.Sdk" />
    <typeAlias alias="DefaltShopValidator" type="Atomia.Billing.Core.Sdk.BusinessLogic.DefaltShopValidator, Atomia.Billing.Core.Sdk" />
    <typeAlias alias="ShopNameValidator" type="Atomia.Billing.Core.Sdk.BusinessLogic.ShopNameValidator, Atomia.Billing.Core.Sdk" />
    <typeAlias alias="DefaultCurrencyPricesShopValidator" type="Atomia.Billing.Core.Sdk.BusinessLogic.DefaultCurrencyPricesShopValidator, Atomia.Billing.Core.Sdk" />
    <typeAlias alias="PricesShopValidator" type="Atomia.Billing.Core.Sdk.BusinessLogic.PricesShopValidator, Atomia.Billing.Core.Sdk" />
  </typeAliases>
  <containers>
    <container name="defaultContainer">
      <types>
        <type type="IShopHelper" mapTo="ShopHelper">
          <constructor>
            <param name="shopValidators" value="null" />
          </constructor>
        </type>
        <type type="IShopValidator" mapTo="DefaltShopValidator" name="DefaltShopValidator">
          <constructor>
            <param name="shopHelper" />
          </constructor>
        </type>
        <type type="IShopValidator" mapTo="ShopNameValidator" name="ShopNameValidator">
          <constructor>
              <param name="shopHelper" />
          </constructor>
        </type>
        <type type="IShopValidator" mapTo="DefaultCurrencyPricesShopValidator" name="DefaultCurrencyPricesShopValidator" />
      </types>
    </container>
  </containers>
</unity>
            

This configuration sets DefaltShopValidator, ShopNameValidator and DefaultCurrencyPricesShopValidator as active shop validators. If another price validator is to be used, last mapping should be changed to reflect that validator type alias (PricesShopValidator).

4.2. Atomia Billing Ticker Service configuration

The configuration for the Atomia Billing Ticker Service is placed into the Atomia.Billing.Core.TickerService.Properties.Settings section of the applicationSettings configuration section group. Here is a complete list of configuration properties:

  • TickerPeriod - interval (in millisecond) for triggering heart beat of the Atomia Billing API.

Here is an example of a Atomia.Billing.Core.TickerService.Properties.Settings section for the Atomia Billing Ticker Service which sets the TickerPeriod to 60 seconds:

<Atomia.Billing.Core.TickerService.Properties.Settings>
 <setting name="TickerPeriod" serializeAs="String">
   <value>60000</value>
 </setting>
</Atomia.Billing.Core.TickerService.Properties.Settings>

4.3. Atomia Billing Mail Dispatcher configuration

4.3.1. NHibernate (database connection) configuration

In order for Mail Dispatcher to work properly, it has to have access to the AtomiaBilling database. Database access is configured in the hibernate-configuration section of the Atomia Billing Mail Dispatcher configuration file ( Atomia.Biling.Core.MailDispatcher.config ). The property the should be updated is connection.connection_string . Its value should contain a proper connection string for the AtomiaBilling database:

<property name="connection.connection_string">
 Server=localhost\MSSQL;Initial Catalog=AtomiaBilling;Integrated Security=True
</property>

Here is an example of a complete hibernate-configuration section for the Atomia Billing Mail Dispatcher:

<!-- NHibernate configuration -->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
 <session-factory>
   <property name="connection.provider">
     NHibernate.Connection.DriverConnectionProvider
   </property>
   <property name="dialect">
     NHibernate.Dialect.MsSql2005Dialect
   </property>
   <property name="connection.driver_class">
     NHibernate.Driver.SqlClientDriver
   </property>
   <property name="command_timeout">
     180
   </property>
   <property name="connection.connection_string">
     Server=localhost\MSSQL;Initial Catalog=AtomiaBilling;Integrated Security=True
   </property>
   <property name="cache.provider_class">
     NHibernate.Cache.HashtableCacheProvider
   </property>
   <property name="cache.use_second_level_cache">
     true
   </property>
   <property name="proxyfactory.factory_class">
     NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
   </property>
 </session-factory>
</hibernate-configuration>

4.3.2. Application configuration

The configuration for the Atomia Billing Mail Dispatcher is placed into the mailDispatcherConfiguration section of the application configuration. Here is a complete list of configuration properties:

  • TimerInterval - interval (in seconds) for checking whether there are unsent messages in the queue.

  • mailPlugin element:

    • fullClassName - fully qualified type name of the plug-in used for sending e-mail messages.

    • host - hostname of the mail server

    • port - port number for the SMTP service on the mail server

    • username - username for logging into the mail server

    • password - password for logging into the mail server

    • ssl - value indicating whether to use SSL or not (true or false)

    • dispatcherEmailAddress - sender e-mail address

    • dispatcherReplyToEmailAddress - reply-to e-mail address for outgoing messages

    • useResellerDispatcherEmailAddresses - dispatcher email address and dispatcher reply-to email address from reseller configuration in AtomiaBilling database.

  • SMSPlugin element

    • fullClassName - fully qualified type name of plug-in used for sending SMS messages.

    • url - url of the service used for sending of SMS mesages

    • username - username for logging into the SMS service

    • password - password for logging into the SMS service

    • originatorType - type of the originator (numeric or alpha)

    • originator - sender identification

Here is an example of the Atomia.Biling.Core.MailDispatcher.Properties.Settings section for Atomia Billing Mail Dispatcher:

<mailDispatcherConfiguration xmlns="atomia.billing.services.maildispatcher" timerInterval="30">
 <mailPlugin fullClassName="Atomia.Billing.Plugins.MessagingPlugins.Email.MailSenderSmtpPlugin, Atomia.Billing.Plugins.MessagingPlugins.Email"
   host="smtp.foobar.com" port="28" username="foobar"
   password="********" ssl="true"
   dispatcherEmailAddress="no-reply@foobar.com"
   dispatcherReplyToEmailAddress="support@foobar.com"
   bccEmailAddressesList="" 
   useResellerDispatcherEmailAddresses="false" />
 <smsPlugin fullClassName="Atomia.Billing.Plugins.MessagingPlugins.Sms.SmsSenderCellsyntPlugin, Atomia.Billing.Plugins.MessagingPlugins.Sms"
   url=" https://sms.services.com/sms.php" username="foobar" password="********"
   originatorType="alpha" originator="FooBar" />
</mailDispatcherConfiguration>

4.4. Scheduled task configuration

The scheduled task configuration is placed in the table scheduled_tasks of the Atomia Billing database. Each record in this table represents one task's configuration.

The following table shows the record structure of the scheduled_tasks table:

Column name

Description

id

Unique identifier of the record

name

Name of the plugin that implements IScheduledTaskHandler interface. This plugih has to be defined in the plugin table.

last_run_time

Last run timestamp.

next_run_time

Next run timestamp.

expires_after

Expiring period (in ticks) - number of ticks after which a task is no longer valid and should not be run (has effect only when RunOnce flag is set.)

run_once

Run once flag - if set, task will be run only once.

period

Period of repetition (number of ticks) - used to calculate next run time.

finished

Task status (not used).

skip_holidays

Skip execution of tasks on holidays - when set, task will run on non-holidays only.

skip_weekend

Skip execution of tasks on weekends - when set, task will run on non-weekend days only.

Here is a configuration example of a scheduled task:

name

NotificationHandler

last_run_time

2010-05-25 21:06:10.000

next_run_time

2010-05-25 22:06:07.00

expires_after

86400000000000

run_once

0

period

36000000000

finished

0

skip_holidays

0

skip_weekend

0

1 millisecond = 10000 ticks, 36000000000 ticks = 1 hour = 3600000 milliseconds.

4.5. Payment plugin configuration

Atomia Billing currently have support for the following payment gateways. In order for the payment gateway to work you have to provide a valid configuration. You will find configuration examples for the different payment gateways below.

4.5.1. Adyen

Steps needed to complete Adyen configuration:

  1. Retrieve configuration details from the Adyen website.

  2. Modify example configuration with details that was fetched in the previous step.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'AdyenHppPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
              "AutoCapture": false,
              "HmacKey": "12345678",
              "MerchantAccount": "your_account",
              "ModificationServiceUrl": "https://pal-test.adyen.com/pal/servlet/soap/Payment",
              "PaymentPageUrl": "https://test.adyen.com/hpp/pay.shtml",
              "RecurringServiceUrl": "https://pal-test.adyen.com/pal/servlet/soap/Recurring",
              "SkinCode": "your_skin_code",
              "SoapPassword": "your_password",
              "SoapUsername": "your_username"
            }');
          

4.5.2. Atomia Prepaid Credit

No configuration is needed, just enable the plugin by execution the following query

            UPDATE AtomiaBilling.dbo.plugin
            SET enabled = 1
            WHERE name = 'AtomiaPrepaidCreditPaymentPlugin'
          

4.5.3. Authorize.Net

Steps needed to complete Autohrize.Net configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(), '00000000-0000-0000-0000-000000000000', 'ApiLogin', 'Api Login')

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(), '00000000-0000-0000-0000-000000000000', 'TransactionKey', 'Transaction Key')

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(), '00000000-0000-0000-0000-000000000000', 'TestMode', 'True or false')
          

4.5.4. Dibs Flexwin

Steps needed to complete Dibs Flexwin configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'DibsFlexwinPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
              "ApiPassword": "Api Password",
              "ApiUsername": "Api Username",
              "CallbackHandlerUrl": "billigpanelurl/dibsHandler.axd",
              "CaptureApiUrl": "https://payment.architrade.com/cgi-bin/capture.cgi",
              "FlexWinUrl": "https://payment.architrade.com/paymentweb/start.action",
              "MerchantId": "MerchantId",
              "RecurringPaymentsDelay": "PT1H",
              "RecurringPaymentsMaxAttempts": 4,
              "TestMode": "true or false",
              "TicketAuthApiUrl": "https://payment.architrade.com/cgi-ssl/ticket_auth.cgi",
              "TicketDelApiUrl": "https://payment.architrade.com/cgi-adm/delticket.cgi"
            }');
          

4.5.5. PayEx

Steps needed to complete PayEx configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'PayExCCPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
              "AccountNumber": "PayEx account number",
              "EncryptionKey": "PayEx encryption key",
              "RecurringPaymentsDelay": "PT1H",
              "RecurringPaymentsMaxAttempts": 4,
              "ReturnUrl": "billingpanelurl/payExAsyncHandler.axd"
            }');
          

4.5.6. PayEx redirect

Steps needed to complete PayEx configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'PayExRedirectPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
              "AccountNumber": "PayEx account number",
              "EncryptionKey": "PayEx encryption key",
              "RecurringPaymentsDelay": "PT1H",
              "RecurringPaymentsMaxAttempts": 4,
              "ReturnUrl": "billingpanelurl/payExAsyncHandler.axd"
            }');
          

4.5.7. PayPal

Steps needed to complete PayPal configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'PayPalPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
            "AllowCreditCards": "true or false",
            "ApiPassword": "Api password",
            "ApiSignature": "Your PayPal signature",
            "ApiUsername": "Api username",
            "PayPalUrl": "www.sandbox.paypal.com",
            "PendpointUrl": "https://api-3t.sandbox.paypal.com/nvp",
            "RecurringPaymentsDelay": "PT1H",
            "RecurringPaymentsMaxAttempts": 4
            }');
          

4.5.8. WorldPay

Steps needed to complete WorldPay configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'WorldPayRedirectPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
              "CallbackHandlerUrl": "billingpanelurl/worldPayHandler.axd",
              "IadminAuthPw": "Password",
              "IadminInstallationId": "Iadmin Installation ID",
              "IadminUrl": "https://secure-test.worldpay.com/wcc/iadmin",
              "InstallationId": "Installation ID",
              "RecurringPaymentsDelay": "PT1H",
              "RecurringPaymentsMaxAttempts": 4,
              "ServiceUrl": "https://secure-test.worldpay.com/wcc/purchase",
              "TestMode": "true or false"
            }');
          

4.5.9. WorldPay XML

Steps needed to complete WorldPay XML configuration:

  1. Retrive configuration details from website.

  2. Modify example configuration with the fetched details.

  3. Execute the query from the example.

Example:

            INSERT INTO AtomiaBilling.dbo.plugin_configuration
            ([id], [fk_plugin_id], [fk_reseller_id], [key], [value])
            VALUES (NEWID(),
            (SELECT id FROM AtomiaBilling.dbo.plugin WHERE name = 'WorldPayXmlRedirectPaymentMethodPlugin'),
            CAST(CAST(0 AS BINARY) AS UNIQUEIDENTIFIER),
            'Configuration', '
            {
              "CallbackHandlerUrl": "billingpanelurl/worldPayXmlHandler.axd",
              "MerchantCode": "Merchant code",
              "RecurringMerchantCode": "Recurring merchant code",
              "RecurringPaymentsDelay": "PT1H",
              "RecurringPaymentsMaxAttempts": 4,
              "RecurringXmlServicePassword": "Password",
              "XmlServicePassword": "Password",
              "XmlServiceUrl": "https://secure-test.worldpay.com/jsp/merchant/xml/paymentService.jsp"
            }');
          

4.6. Plug-in configuration

Configuration settings of plug-ins are placed into two tables of the Atomia Billing database:

  • plugin - contains all registered plug-ins, and

  • plugin_configuration - contains additional plug-in data.

Structure of plugin table:

Column name

Description

id

Unique identifier of the record.

name

Unique name of the plug-in (used to reference this record).

full_class_name

Class that implements the IPlugin interface, in format <class name>, <dll file that contains class>.

enabled

Enables and disables the plug-in, when set to 0 plug-in is disabled.

Here is an example of a plug-in configuration:

name

CampaignPlugin

full_class_name

Atomia.Billing.Plugins.CampaignPlugin, Atomia.Billing.Plugins.CampaignPlugin

enabled

1

Additional plug-in configuration data is stored in the plugin_configuration table which has following structure:

Column name

Description

id

Unique identifier of the record

fk_reseller_id

Unique identifier of the reseller

key

Parameter name

value

Parameter value

fk_plugin_id

Unique identifier of the plugin

The following table shows an example of the PaymentRule plug-in configuration which has two parameters (HighBound and LowBound):

id

fk_reseller_id

key

value

fk_plugin_id

9D3AFAB0...

B77B8B91...

HighBound

20;1000SEK

F7D5B3D8...

DFCAD78C...

B77B8B91...

LowBound

1;4SEK

F7D5B3D8...

4.7. Generic Workflow configuration

Generic Workflow for domain, webhosting and VPS companies is a set of automated processes for billing and managing customers services. Technically, the workflow is a set of configuration options and a set of periodic processes.

4.7.1. General Workflow Settings

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.GenericWorkflowPluginBase

Example configuration:

            {
              "DnsCategoryName":"DNS",
              "DomainRegistrationCategoryName":"Domain",
              "DomainTransferCategoryName":"DomainTransfer",
              "HostingCategoryName":"Hosting",
              "OnlinePaymentUrl":
              "https://billing.example.com/Invoice/{0}/{1}/OnlinePayment",
              "OwnDomainArticleNumber":"DOM_OW",
              "RegisteredDomainsLimit":0,
              "ResetPasswordUrl":"https://my.example.com/ResetPasswords/{0}/{1}",
              "SendInvoiceByPostItem":"FEE-POST",
              "SetupFeeItem":"FEE-SETUP",
              "ApplyToSubresellers":true
            }
          

The general workflow configuration options are specified by JSON structure with the following entries:

  • DnsCategoryName The name of the product category of free hosting (DNS only) products.

  • DomainRegistrationCategoryName The name of the product category of domain products (domain registrations and domain renewals).

  • DomainTransferCategoryName The name of the product category of domain transfer products.

  • HostingCategoryName The name of the product category of hosting products.

  • OnlinePaymentUrl The URL to pay invoice online. For example: https://billing.example.com/Invoice/{0}/{1}/OnlinePayment Where {0} is a placeholder which will be filled in with the username of the customer and {1} is a placeholder for invoice number.

  • OwnDomainArticleNumber The article number of the fake product that will be used to record customers domain that’s registered externally and will be DNS-pointed to his hosting services.

  • RegisteredDomainsLimit The total number of domains allowed to be ordered using Billing API. Zero means no limit.

  • ResetPasswordUrl The URL of the forgot password link. For example: https://login.example.com/PasswordReset.aspx?user={0}&id={1} Where {0} is a placeholder which will be replaced with an email of the user and {1} will be replaced with the unique identifier (long, hard to guess string) of the password reset request.

  • SendInvoiceByPostItem The id (article number) of the product that represents a postal fee to be added to all invoices sent by regular post.

  • SetupFeeItem The id (article number) of the product that represents a general setup fee product. In this generic workflow this Setup fee is used only for upgrade from free (DNS) products. For new orders it is expected that the order page handles the logic of setup fees.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

4.7.2. Renewals Heads-Up Notifications

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.RenewalHeadsUpNotificationScheduledEventHandler

It is possible to notify customers about upcoming renewals. Each product category can have separate notifications rules.

Example configuration:


            {
              "ApprovedItemsCount":1000,
              "ScheduleItemsCount":1000,
              "ApplyToSubresellers":true,
              "AdditionalOffset":3,
              "Notifications":[
                {
                  "AutoApprove":true,
                  "MessageType":0,
                  "Name":"DomainsRenewalHeadsUp",
                  "SendOnPreviousWorkingDay":true,
                  "SendOnWorkingDayOnly":true,
                  "TemplateNamePrefix":"DomainRenewalHeadsUpEmail",
                  "Categories":[
                    "Domain",
                    "DomainTransfer"
                  ],
                  "DaysOffset":60
                }
              ]
            }

          

Renewal heads-up options are specified by JSON structure with the following entries:

  • ScheduleItemsCount Limit the number of subscriptions to be scheduled for renewal heads-up during one run. Zero means no limit.

  • ApprovedItemsCount Limit the number of subscription renewal heads-up tasks to be auto-approved during one run. Zero means no limit.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • AdditionalOffset Specify additional days in advance to send a renewals heads up email. This number is added on top of the number calculated by the Notifications configuration.

  • Notifications[ ] Contains the actual settings for different product categories.

  • Notifications[ ].AutoApprove Should the renewal heads-up message task be automatically or manually approved (true/false).

  • Notifications[ ].MessageType The message type (0 - Email, 1 - SMS).

  • Notifications[ ].Name A friendly name of this entry.

  • Notifications[ ].SendOnWorkingDayOnly Will the renewal heads up messages be sent on work days only (true/false).

  • Notifications[ ].SendOnPreviousWorkingDay If Notifications[ ].SendOnWorkingDayOnly=true, should the invoice be sent on previous (true) or next work day (false).

  • Notifications[ ].TemplateNamePrefix The template name prefix. For example if this prefix is “RenewalsHeadsUp”, then the system will look for “RenewalsHeadsUp” and “RenewalsHeadsUp in case of Email message or “RenewalsHeadsUp” in case of SMS message.

  • Notifications[ ].Categories[ ] Product categories this entry is applicable to, or all if not set.

  • Notifications[ ].DaysOffset How many days before the subscription renewal date should the message be sent.

4.7.3. Renewal Process

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.SubscriptionRenewalScheduledEventHandler

This process will create (and send if by email) the renewal invoice for subscriptions which are about to expire.

Example configuration:

            {
               "ApprovedItemsCount":0,
               "ScheduleItemsCount":0,
               "ApplyToSubresellers":true,
               "AdditionalOffset":3,
               "AutoApprove":true,
               "IncludeSuspendedSubscriptions":false,
               "Offsets":[
                  {
                     "Key":"Default",
                     "Value":{
                        "DefaultOffsetValue":30,
                        "MonthlyInvoices": false,
                        "MonthlyInvoicesForAll": true,
                        "MontlyInvoicesOffsetValue": 0,
                        "RenewalPeriodsConfiguration":[
                            {
                               "RenewalPeriodUnit": "month",
                               "RenewalPeriodValue": "1", 
                               "OffsetValue": "20"
                            },
                            {
                               "RenewalPeriodUnit": "month",
                               "RenewalPeriodValue": "3", 
                               "OffsetValue": "20"
                            }
                        ]
                     }
                  },
                  {
                     "Key":"Domain",
                     "Value":{
                        "DefaultOffsetValue":38,
                        "MonthlyInvoices": false,
                        "MonthlyInvoicesForAll": true,
                        "MontlyInvoicesOffsetValue": 0,
                        "RenewalPeriodsConfiguration":null
                     }
                  },
                  {
                     "Key":"DomainTransfer",
                     "Value":{
                        "DefaultOffsetValue":38,
                        "MonthlyInvoices": false,
                        "MonthlyInvoicesForAll": true,
                        "MontlyInvoicesOffsetValue": 0,
                        "RenewalPeriodsConfiguration":null
                     }
                  }
               ],
               "SendOnPreviousWorkingDay":true,
               "SendOnWorkingDayOnly":true
            }
          

Renewal Process specification:

  1. Subscription renewal is a process that will automatically send renewal invoices for subscriptions that are about to expire.

  2. The invoice is sent several days ahead of renewal/expiration date. The actual number of days is specified by the configuration and can be different for different product categories. Also, within one product category it can be different for different renewal periods.

  3. The process will put all subscriptions’ renewal fees for one customer to a single invoice.

Renewal options are specified by JSON structure with the following entries:

  • ScheduleItemsCount Limit the number of subscriptions to be scheduled for renewal during one renewal run. Zero means no limit.

  • ApprovedItemsCount Limit the number of subscription renewal tasks to be auto-approved during one renewal run. Zero means no limit.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • AutoApprove Should the renewals be automatically or manually approved (true/false).

  • IncludeSuspendedSubscriptions Should suspended subscriptions be invoiced (true/false).

  • SendOnWorkingDayOnly Will the invoices be sent on work days only (true/false).

  • SendOnPreviousWorkingDay If SendOnWorkingDayOnly=true, should the invoice be sent on previous (true) or next work day (false).

  • Offsets[ ] Offsets is JSON based configuration of how many days in advance should the invoice be sent. It allows specifying different number of days for different categories and within each category, different number of days for each subscription renewal period.

  • Offsets.Key The name of the product category to be used. “Default” can be used to specify the options that apply to all categories with no specific options in the Offsets section.

  • Offsets.Value This section defines when the invoice is sent. Each entry in this section is a configuration for one product category.

  • Offsets[ ].Value.DefaultOffsetValue For a given category (specified by Offsets.Key) defines how many days in advance the invoice will be sent. This can be overriden by the value of RenewalPeriodsConfiguration.

  • Offsets[ ].Value.MonthlyInvoices If this is set to true, then monthly invoicing is enabled. Who gets monthly invoices is controlled by the MonthlyInvoicesForAll option.

  • Offsets[ ].Value.MonthlyInvoicesForAll This option only takes affect when MonthlyInvoices is enabled. If this is set to false, only customers with IsInvoicedMonthly set to true will be invoiced monthly. The default value for this setting is true

  • Offsets[ ].Value.MontlyInvoicesOffsetValue When Offsets[ ].Value.MonthlyInvoices is enabled this offset will specify how many months ahead in time the invoices should be generated.

  • Offsets[ ].Value.RenewalPeriodsConfiguration[ ] Allows you to specify an alternative value for how many days in advance the invoice will be sent, for certain renewal periods. (For example you might want to send invoice 60 days in advance for yearly subscriptions, while for monthly subscriptions you might want to send it 15 days in advance).

  • Offsets[ ].Value.RenewalPeriodsConfiguration[ ].RenewalPeriodUnit The unit of a renewal period in question (can be “month” or “year”).

  • Offsets[ ].Value.RenewalPeriodsConfiguration[ ].RenewalPeriodValue The renewal period (in units specified by RenewalPeriodUnit).

  • Offsets[ ].Value.RenewalPeriodsConfiguration[ ].OffsetValue How many days before renewal to send the invoice for the specified renewal period.

  • AdditionalOffset Specify additional days in advance to create an invoice. This number is added on top of the number calculated by the Offsets configuration.

4.7.4. Reminders, Suspend and Terminate Process

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.InvoiceReminderScheduledEventHandler

This workflow is used to send reminders and execute actions (for example: to suspend and terminate subscriptions) for unpaid invoices. It is possible to define different reminders and actions for different product categories.

Example configuration:

            {
              "ReminderConfigurations": [
                {
                  "Key": "B77B8B91-741B-4CF1-88B4-FEB21550055C",
                  "Value": {
                     "ApprovedItemsCount":1000,
                     "ScheduleItemsCount":1000,
                       "ApplyToSubresellers":true,
                     "InvoiceReminders":[
                        {
                           "AutoApprove":true,
                           "MessageType":0,
                           "Name":"InvoiceReminder1",
                           "SendOnWorkingDayOnly":true,
                           "SendOnPreviousWorkingDay":true,
                           "TemplateNamePrefix":"InvoiceReminder1Email",
                           "AdditionalOffset":3,
                           "AttachInvoice":true,
                           "RelativeToDueDate":false,
                           "CategoriesConfigurations":[
                              {
                                 "Categories":[

                                 ],
                                 "DaysOffset":22,
                                 "Filter":"all",
                                 "ApplicableTo":"any",
                                 "HandlersConfiguration":null,
                                 "Order":1
                              }
                           ],
                           "RelativeToReminder":null
                        },
                        {
                           "AutoApprove":true,
                           "MessageType":0,
                           "Name":"InvoiceReminder2",
                           "SendOnPreviousWorkingDay":true,
                           "SendOnWorkingDayOnly":true,
                           "TemplateNamePrefix":"InvoiceReminder2Email",
                           "AdditionalOffset":3,
                           "AttachInvoice":true,
                           "RelativeToDueDate":false,
                           "CategoriesConfigurations":[
                              {
                                 "Categories":[
                                    "Domain",
                                    "DomainTransfer"
                                 ],
                                 "DaysOffset":30,
                                 "Filter":"all",
                                 "ApplicableTo":"renewal",
                                 "HandlersConfiguration":null,
                                 "Order":1
                              },
                              {
                                 "Categories":[

                                 ],
                                 "DaysOffset":27,
                                 "Filter":"all",
                                 "HandlersConfiguration":null,
                                 "Order":2
                              }
                           ],
                           "RelativeToReminder":null
                        },
                        {
                           "AutoApprove":true,
                           "MessageType":2,
                           "Name":"InvoiceReminder3",
                           "PrintEmail":"some-internal-address@yourcompany.com",
                           "SendOnPreviousWorkingDay":true,
                           "SendOnWorkingDayOnly":true,
                           "TemplateNamePrefix":"InvoiceReminder3Print",
                           "AdditionalOffset":3,
                           "AttachInvoice":true,
                           "RelativeToDueDate":false,
                           "CategoriesConfigurations":[
                              {
                                 "Categories":[
                                    "Domain",
                                    "DomainTransfer"
                                 ],
                                 "DaysOffset":30,
                                 "Filter":"all",
                                 "HandlersConfiguration":null,
                                 "Order":1
                              },
                              {
                                 "Categories":[

                                 ],
                                 "DaysOffset":27,
                                 "Filter":"all",
                                 "HandlersConfiguration":null,
                                 "Order":2
                              }
                           ],
                           "RelativeToReminder":null
                       },
                       {
                          "AutoApprove":true,
                          "MessageType":0,
                          "Name":"DebtCollecting",
                          "SendOnPreviousWorkingDay":false,
                          "SendOnWorkingDayOnly":false,
                          "AdditionalOffset":0,
                          "AttachInvoice":true,
                          "CategoriesConfigurations":[{
                              "Categories":[],
                              "DaysOffset":30,
                              "Filter":"all",
                              "HandlersConfiguration":{
                                "ActionHandlers":[{
                                    "ClassName":"Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.InvoiceDebtCollectionCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                    "Parameters":[
                                      { "Key":"DebtCollectionPlugin", "Value":"ECollectPlugin" }, 
                                      { "Key":"CreditInvoice", "Value":"true" }, 
                                      { "Key":"DaysLimit", "Value":"0" }
                                    ]
                                  }
                                ]
                              },
                              "Order":1
                            }
                          ]
                       },
                       {
                           "AutoApprove":true,
                           "MessageType":0,
                           "Name":"SuspendServices",
                           "SendOnPreviousWorkingDay":false,
                           "SendOnWorkingDayOnly":false,
                           "TemplateNamePrefix":null,
                           "AdditionalOffset":0,
                           "AttachInvoice":true,
                           "RelativeToDueDate":false,
                           "CategoriesConfigurations":[
                              {
                                 "Categories":[
                                    "O365"
                                 ],
                                 "DaysOffset":23,
                                 "Filter":"all",
                                 "HandlersConfiguration":{
                                    "ActionHandlers":[
                                       {
                                          "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.SuspendInvoiceSubscriptionsCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                          "Parameters": [
                          { "Key": "AllowedSubscriptionStates", "Value": "Ok,Renewal,Renewed" },
                          { "Key": "DisallowedSubscriptionStates", "Value": "Suspended" }
                      ]
                                       }
                                    ],
                                    "TemplateNamePrefix":null
                                 },
                                 "Order":1
                              },
                              {
                                 "Categories":[

                                 ],
                                 "DaysOffset":30,
                                 "Filter":"all",
                                 "HandlersConfiguration":{
                                    "ActionHandlers":[
                                       {                        "ClassName":"Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.SuspendInvoiceSubscriptionsCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                          "Parameters":null
                                       }
                                    ],
                                    "TemplateNamePrefix":null
                                 },
                                 "Order":2
                              }
                           ],
                           "RelativeToReminder":null
                        },
                        {
                           "AutoApprove":true,
                           "MessageType":0,
                           "Name":"TerminateServices",
                           "SendOnPreviousWorkingDay":false,
                           "SendOnWorkingDayOnly":false,
                           "TemplateNamePrefix":null,
                           "AdditionalOffset":0,
                           "AttachInvoice":true,
                           "RelativeToDueDate":false,
                           "CategoriesConfigurations":[
                              {
                                 "Categories":[
                                    "Domain",
                                    "DomainTransfer"
                                 ],
                                 "DaysOffset":68,
                                 "Filter":"all",
                                 "HandlersConfiguration":{
                                    "ActionHandlers":[
                                       {
                                          "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.TerminateInvoiceSubscriptionsCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                          "Parameters":null
                                       },
                                       {
                                          "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.AutoCreditInvoicesCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                          "Parameters":null
                                       }
                                    ],
                                    "TemplateNamePrefix":"BadDebtTerminationEmail"
                                 },
                                 "Order":1
                              },
                              {
                                 "Categories":[

                                 ],
                                 "DaysOffset":60,
                                 "Filter":"all",
                                 "HandlersConfiguration":{
                                    "ActionHandlers":[
                                       {
                                          "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.TerminateInvoiceSubscriptionsCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                          "Parameters":null
                                       },
                                       {
                                          "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.CustomActions.AutoCreditInvoicesCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                                          "Parameters":null
                                       }
                                    ],
                                    "TemplateNamePrefix":"BadDebtTerminationEmail"
                                 },
                                 "Order":2
                              }
                           ],
                           "RelativeToReminder":null
                        }
                     ],
                 "MessageHandlers":null
                  }
                }
              ]
            }
          

Renewal options are specified by JSON structure with the following entries:

  • Key Which reseller the configuration applies to.

  • Value The configuration for the reseller.

  • ScheduleItemsCount Limit the number of invoices to be scheduled for reminder sending during one run. Zero means no limit.

  • ApprovedItemsCount Limit the number of invoice reminder tasks to be auto-approved during one run. Zero means no limit.

  • ApplyToSubresellers If set and the configuration is reseller specific, then it also applies to customers of subresellers of the reseller with the configuration.

  • MessageHandlers This is a dictionary of which classes are used to handle different message types. If not specified or null, this matches:

                    { 
                      "Email": "Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.EmailInvoiceReminderHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                      "Sms": "Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.SmsInvoiceReminderHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                      "Print": "Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.PrintInvoiceReminderHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin"
                    }
                    
  • InvoiceReminders[ ] This is a list of configuration options for different reminder actions. Every entry is a set of configuration options for one step in the workflow.

  • InvoiceReminders[ ].Name The descriptive name of the reminder or other kind of action.

  • InvoiceReminders[ ].AutoApprove Should the action be auto-approved.

  • InvoiceReminders[ ].MessageType The message type (0 - Email, 1 - SMS, 2 - Print). Email and SMS sends the reminder directly to the customer. Print sends a merged copy of all the reminders produced by one run of the task to the email specified by the InvoiceReminders[ ].PrintEmail option described below.

  • InvoiceReminders[ ].PrintEmail The (internal) email address to send print-reminders to, if MessageType is set to 2.

  • InvoiceReminders[ ].SendOnWorkingDayOnly Will this action be run work days only (true/false).

  • InvoiceReminders[ ].SendOnPreviousWorkingDay Should the invoice be sent on previous (true) or next work day (false).

  • InvoiceReminders[ ].TemplateNamePrefix The template name prefix. For example if this prefix is “Reminder1”, then the system will look for “Reminder1Subject” and “Reminder1Body” in case of Email message or “Reminder1SMS” in case of SMS message. If the prefix is null no message will be sent.

  • InvoiceReminders[ ].AdditionalOffset Additional days in advance to run the action / send the reminder. This number is added on top of the number calculated by the InvoiceReminders[ ].CategoriesConfigurations[ ] configuration.

  • InvoiceReminders[ ].AttachInvoice Should the original invoice be attached to a message (in case of email).

  • InvoiceReminders[ ].RelativeToDueDate If set to true offset will be relative to due date, otherwise it will be relative to invoice date. False is the default value for this option.

  • InvoiceReminders[ ].RelativeToReminder If you want this reminder date to be counted relative from the invoice date, set this to “null”. Otherwise put a name (InvoiceReminders[ ].Name of the previous reminder).

  • InvoiceReminders[ ].CategoriesConfigurations[ ] You can have different configuration options for different categories. This is a list of configuration settings - one entry per group of categories.

  • InvoiceReminders[ ].CategoriesConfigurations[ ].Categories[ ] List of categories this configuration is applicable to. Empty list means - all the other categories (the ones that don’t appear in other entries).

    NOTE: if the invoice lines contain products from different categories, system will apply only one action to each product line (subscription).

  • InvoiceReminders[ ].CategoriesConfigurations[ ].DaysOffset When to send this reminder / run this action - relative to invoice date (or previous reminder date in case that InvoiceReminders[ ].RelativeToReminder is not null).

  • InvoiceReminders[ ].CategoriesConfigurations[ ].Filter Use this field for additional filtering of products this action is applicable to.

    NOTE: Properties Categories[ ] andFilter are used together to determine if action is applicable to the invoice. Filter can have one of two values: "all" and "any". For "all", all invoice lines of have to be in specified categories and for "any" it is sufficient that any of them have needed category.

  • InvoiceReminders[ ].CategoriesConfigurations[ ].ApplicableTo Use this field for additional filtering of which invoices this action is applicable to.

    ApplicableTo can have one of the following values: "any", "renewal", "somerenewal", "somenew", "norenewal". The value "any" means "any kind of invoice matching the other rules" and is the default. The value "renewal" means "invoices containing only renewal subscriptions". The value "norenewal" means "invoices without any renewal subscription". The value "somenew" means "invoices with some subscription that is not a renewal". The value "somerenewal" means "invoices where at least one subscription is a renewal".

  • InvoiceReminders[ ].CategoriesConfigurations[ ].Order The order of execution of reminders / actions (among the entries in CategoriesConfigurations[ ]).

  • InvoiceReminders[ ].CategoriesConfigurations[ ].HandlersConfiguration This section contains the configuration of handlers - the actions to be taken.

  • InvoiceReminders[ ].CategoriesConfigurations[ ].HandlersConfiguration.TemplateNamePrefix Using this option you can specify the template for additional notification which can be used by ActionHandler.

  • InvoiceReminders[ ].CategoriesConfigurations[ ].HandlersConfiguration.ActionHandlers[ ] You can invoke several actions (like suspending the subscription), which is defined by the entries of this option.

  • InvoiceReminders[ ].CategoriesConfigurations[ ].HandlersConfiguration.ActionHandlers[ ].ClassName Namespace and the class name of the .Net class which will execute this action.

  • InvoiceReminders[ ].CategoriesConfigurations[ ].HandlersConfiguration.ActionHandlers[ ].Parameters Parameters to be passed to action class.

4.7.5. Unsuspend Subscriptions

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.UnsuspendSubscriptionScheduledEventHandler

Unsuspends subscriptions when the matching invoice has been paid.

Example configuration:

            {
               "ApprovedItemsCount":50,
               "ScheduleItemsCount":50,
               "AutoApprove":true,               
               "ApplyToSubresellers":true
            }
          
  • ApprovedItemsCount Limit the number of transfer out tasks to be auto-approved during one run. Zero means no limit.

  • ScheduleItemsCount Limit the number of subscriptions to be checked for the transfer out during one run. Zero means no limit.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • AutoApprove Should the action be auto-approved.

4.7.6. Subscription Expiration

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.SubscriptionExpirationScheduledEventHandler

This handler is used to control the actions for a subscription when it either expires or is terminated. When a subscription is terminated it can be configured to automatically downgrade to the cheapest package available. For expired subscriptions a set of different actions can be taken. The configuration option should be set on the item.

Expire actions:

  • ExpireActionType.NoAction: Do nothing.

  • ExpireActionType.Suspend: Suspend the subscription.

  • ExpireActionType.Terminate: Terminate the subscription.

  • ExpireActionType.Downgrade: Downgrade the subscription to the cheapest package available.

Example configuration:

            {
              "ApprovedItemsCount": 50,
              "ScheduleItemsCount": 50,
              "ApplyToSubresellers":true,
              "AutoApprove": true,
              "Downgrade": false,
              "ExpirationActionAllowedStates": null,
              "ExpirationActionOffsets": [
                {
                  "Key": "Domain",
                  "Value": 8
                }
              ],
              "TerminationActionAllowedStates": null,
              "TerminationActionOffsets": [

              ]
            }
          
  • ApprovedItemsCount Limit the number of transfer out tasks to be auto-approved during one run. Zero means no limit.

  • ScheduleItemsCount Limit the number of subscriptions to be checked for the transfer out during one run. Zero means no limit.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • AutoApprove Should the action be auto-approved.

  • Downgrade If set to true the subscription will be downgraded when the termination occurs.

  • ExpirationActionAllowedStates List of states that should be used to filter which subscriptions to expire.

  • ExpirationActionOffsets[].Key The name of the product category to be used. “Default” can be used to specify the options that apply to all categories with no specific options in the Offsets section.

  • ExpirationActionOffsets[].Value Expiration date offset.

  • TerminationActionAllowedStates List of states that should be used to filter which subscriptions to terminate.

  • TerminationActionOffsets[].Key The name of the product category to be used. “Default” can be used to specify the options that apply to all categories with no specific options in the Offsets section.

  • TerminationActionOffsets[].Value Termination date offset.

4.7.7. Payment Workflow

Every payment will automatically unsuspend all subscriptions connected to the paid invoice.

4.7.8. Recurring Payments

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.RecurringPaymentsScheduledEventHandler

Some of the payment gateways supports recurring payments for the customers. The configuration options will be described below.

Example configuration:

            {
              "ApplyToSubresellers":true,
              "DefaultDelay": "PT10M",
              "FailureTemplatePrefix": "AutopaymentFailure",
              "SuccessTemplatePrefix": "AutopaymentSuccess",
              "MaximumAttempts": 2,
              "Retries": [
                {
                  "Delay": "PT10M",
                  "FailureTemplatePrefix": "AutopaymentFailure1",
                  "SuccessTemplatePrefix": "AutopaymentSuccess"
                },
                {
                  "Delay": "PT30M",
                  "FailureTemplatePrefix": "AutopaymentFailure2",
                  "SuccessTemplatePrefix": "AutopaymentSuccess"
                }
              ]
            }
          
  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • DefaultDelay How long the system should wait until a retry will be made. This must be specified in the ISO-8601 Duration format.

  • FailureTemplatePrefix Failure email template.

  • SuccessTemplatePrefix Successfull email template.

  • MaximumAttempts Maximum number of attempts before giving up.

  • Retries[].Delay How long the system will wait until next retry. This must be specified in the ISO-8601 Duration format.

  • Retries[].FailureTemplatePrefix Failure email template for this attempt.

  • Retries[].SuccessTemplatePrefix Success email template for this attempt.

4.7.9. Periodic Invoicing

There are two ways of enabling periodic invoicing. If you want your customers to receive their invoices the first day of every month you set it up in the Renewal Configuration.

If you have configured that your reseller should receive your customers invoices you can enable the option "Is invoiced monthly" in the Admin Panel for the reseller. If this is done the invoices will be generated once a month for all customers that belongs to the reseller.

Example configuration:

            {
              "ApplyToSubresellers":true,
              "AutoApprove": true
            }
          

4.7.10. Postpaid Invoicing

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.PostpaidInvoiceScheduledEventHandler

Creates postpaid invoices for usage based products.

Example configuration:

            {
               "AutoApproveRecurringPayments":true
            }
          
  • AutoApproveRecurringPayments If set to true and customer has valid payment profile and auto payment turned on, recurring payment will be scheduled and approved for issued invoice.

4.7.11. Domain Transfer Out Workflow

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.TransferOutNotificationScheduledEventHandler

System will periodically check for domains in Atomia Automation Server which are not marked as local. This list will be compared with the list of all OK and Suspended and, at the same time, Provisioned subscriptions of the category Domain or DomainTransfer (except from the in-progress transfers-in).

The matched domain’s subscription will be terminated and it is possible to send email to the customer.

Example configuration:

            {
               "ApprovedItemsCount":50,
               "ScheduleItemsCount":50,
               "ApplyToSubresellers":true,
               "AutoApprove":true,
               "MessageType":0,
               "TemplatePrefix":"TransferOutEmail"
            }
          
  • ApprovedItemsCount Limit the number of transfer out tasks to be auto-approved during one run. Zero means no limit.

  • ScheduleItemsCount Limit the number of subscriptions to be checked for the transfer out during one run. Zero means no limit.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • AutoApprove Should the action be auto-approved.

  • MessageType The message type (0 - Email, 1 - SMS).

  • TemplateNamePrefix The template name prefix. For example if this prefix is “TransferOut”, then the system will look for “TransferOutSubject” and “TransferOutBody” in case of Email message or “TransferOutSMS” in case of SMS message.

4.7.12. Domain Transfer In Workflow

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.TransferInNotificationScheduledEventHandler

System will periodically check all subscriptions that are domain transfer in progress. The system will check if domains of these subscriptions is transferred-in according to Atomia Automation Server.

If successful, system will:

  1. Update TransferStatus=success

  2. Update expiration and renewal date of the subscription to the actual domain expiration date.

If failed, the system will:

  1. Update TransferStatus=failed (customer can re-try the transfe from the control panel)

It is possible to set actions that will occur after defined period of time if transfer in doesn’t complete.

It is possible to notify the customer of the succesfull or failed domain transfers.

Example configuration:

            {
               "NotificationName":"TransferInCheck",
               "ApprovedItemsCount":250,
               "ScheduleItemsCount":250,
               "ApplyToSubresellers":true,
               "AutoApprove":true,
               "MessageType":0,
               "FailureTemplatePrefix":"DomainTransferFailEmail",
               "SuccessTemplatePrefix":"DomainTransferSuccessEmail",
               "Actions":[
                  {
                     "Action":"Terminate",
                     "DaysOffset":90,
                     "MessageType":0,
                     "NotificationName":"TerminaTransfer",
                     "Statuses":[
                        "pending",
                        "fail"
                     ],
                     "TemplatePrefix":null
                  }
               ]
            }
          
  • NotificationName A descriptive name to this configuration (has no effect on workflow). This will appear as the name of the task i the list of scheduled tasks.

  • ScheduleItemsCount Limit the number of subscriptions to be scheduled for transfer-in check during one run. Zero means no limit.

  • ApprovedItemsCount Limit the number of subscription transfer-in tasks to be auto-approved during one run. Zero means no limit.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • AutoApprove Should the action be auto-approved.

  • MessageType The message type (0 - Email, 1 - SMS).

  • FailureTemplateNamePrefix A prefix of mail, and SMS templates for messages which are sent in case of failed transfer.

  • SuccessTemplateNamePrefix A prefix of mail, and SMS templates for messages which are sent in case of succesfull transfer.

  • Actions[ ] A list of actions to be executed on different days after invoice date.

  • Actions[ ].NotificationName A descriptive name to this configuration entry (has no effect on the workflow).

  • Actions[ ].Action The Action to be taken. Can be “Terminate” or “Suspend”. For new orders it is expected that the order page handles the logic of setup fees.

  • Actions[ ].DaysOffset How many days after the invoice date should this action be taken.

  • Actions[ ].MessageType Message type: mail=0, sms=1

  • Actions[ ].Statuses[ ] This is a list of transfer statuses (the value of subscription TransferStatus custom attribute) to which this action is applicable.

  • Actions[ ].TemplatePrefix Email or SMS message template prefix. If the value is null, no message will be sent.

4.7.13. Invoice debt collection

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.InvoiceDebtCollectionScheduledEventHandler

This task is used to send unpaid invoices to debt collector service, check its collection status and cancel debt collection if invoice is paid within Atomia system.

Example configuration:

            {
            "AutoApprove":true,
            "CheckTimeoutMinutes":60,
            "ApprovedItemsCount":0
            }
          
  • AutoApprove If true, all debt collection tasks will be automatically approved.

  • CheckTimeoutMinutes A value indicating number of minutes between each debt collection status check.

  • ApprovedItemsCount Number of tasks to be auto-approved during one run. 0 means no limit.

4.7.14. Order postprocessing

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.OrderEventHandlers

It is possible to alter the flow of the order by:

  1. Applying the campaign

  2. Adding additional subscriptions

  3. Running custom code

Example configuration:

            {
              "SendOrderConfirmationMail": true,
              "OrderConfirmationTemplatePrefix":"CreateOrderConfirmationEmail",
              "PermanentCampaignCode":"permanent",
              "ReformatPhoneNumber": false,
              "ApplyToSubresellers": true,
              "SendPaidInvoiceEmail": true
            }
          
  • SendOrderConfirmationMail Should order confirmation email be sent. If not configured the default is true.

  • OrderConfirmationTemplatePrefix Order confirmation email template prefix.

  • DowngradeRefundTemplatePrefix Downgrade refund email template prefix.

  • DowngradeRefundEmailDestination Downgrade refund email destination.

  • PermanentCampaignCode This campaign code will be added to all orders.

  • ReformatPhoneNumber Should phone numbers (incl. fax and mobile) be reformated to standard format.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

  • SendPaidInvoiceEmail If set to true invoices will be sent even if the order was paid directly, if set to false no invoice email will be sent if the order was paid.

4.7.15. Invoicing emails

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.InvoiceEventHandlers

It is possible to customize the invoicing emails that are sent by changing the following:

  1. Invoice email template

  2. Credit invoice email template

  3. Proforma invoice email template

  4. Receipt email template

Example configuration:

            {
              "InvoiceTemplateNamePrefix":"InvoiceEmailTemplate",
              "CreditInvoiceTemplateNamePrefix":"CreditInvoiceEmailTemplate",
              "ProformaInvoiceTemplateNamePrefix":"ProformaEmailTemplate",
              "ReceiptTemplateNamePrefix":"ReceiptEmailTemplate",
              "ApplyToSubresellers":true
            }
          
  • InvoiceTemplateNamePrefix Email template prefix for regular invoices. For example if this prefix is “InvoiceEmailTemplate”, then the system will look for “InvoiceEmailTemplateSubject” and “InvoiceEmailTemplateBody”.

  • CreditInvoiceTemplateNamePrefix Email template prefix for credit invoices. For example if this prefix is “CreditInvoiceEmailTemplate”, then the system will look for “CreditInvoiceEmailTemplateSubject” and “CreditInvoiceEmailTemplateBody”.

  • ProformaInvoiceTemplateNamePrefix Email template prefix for proforma invoices. For example if this prefix is “ProformaInvoiceEmailTemplate”, then the system will look for “ProformaInvoiceEmailTemplateSubject” and “ProformaInvoiceEmailTemplateBody”.

  • ReceiptTemplateNamePrefix Email template prefix for invoices receipts. For example if this prefix is “ReceiptEmailTemplate”, then the system will look for “ReceiptEmailTemplateSubject” and “ReceiptEmailTemplateBody”.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

4.7.16. Notifications and actions when provisioning subscriptions

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.SubscriptionProvisioningStatusChangedEventHandler

It is possible to trigger certain actions upon successful or failed provisioning actions:

  1. Sending emails

  2. Executing custom code

Example configuration:

            {
               "Categories":[
                  {
                     "CategoryName":"Domain",
                     "FailureActionConfiguration":{
                        "ActionHandlers":[],
                        "TemplateNamePrefix":"DomainNameRegistrationFailureEmail"
                     },
                     "SuccessActionConfiguration":{
                        "ActionHandlers":[],
                        "TemplateNamePrefix":"DomainNameRegistrationSuccessEmail"
                     }
                  },
                  {
                     "CategoryName":"Hosting",
                     "FailureActionConfiguration":null,
                     "SuccessActionConfiguration":{
                        "ActionHandlers":[
                           {
                              "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.MainSubscriptionProvisionedCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                              "Parameters":null
                           }
                        ],
                        "TemplateNamePrefix":"CustomerWelcomeEmail"
                     }
                  },
                  {
                     "CategoryName":"DNS",
                     "FailureActionConfiguration":null,
                     "SuccessActionConfiguration":{
                        "ActionHandlers":[
                           {
                              "ClassName": "Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.MainSubscriptionProvisionedCustomAction, Atomia.Billing.Plugins.GenericWorkflowPlugin",
                              "Parameters":null
                           }
                        ],
                        "TemplateNamePrefix":"CustomerWelcomeEmail"
                     }
                  }
               ],
               "ApplyToSubresellers":true
            }
          
  • Categories[ ] This is a list of configuration options for different product categories. Every entry is a set of configuration options for subscription provisioning events of a single product category.

  • Categories[ ].CategoryName The name of the category the configuration applies to.

  • Categories[ ].Filter Gets or sets the filter that determines which subscriptions that should be handled. This setting is optional. Possible values are: null or all: handling all subscriptions - this is the default value and makes the handler. new: only handle new subscriptions. renewalupgradedowngrade: only handle subscriptions in state renewal, upgrade or downgrade.

  • Categories[ ].SuccessActionConfiguration This section contains the configuration of handlers - the actions to be taken on successful provisioning.

  • Categories[ ].FailureActionConfiguration This section contains the configuration of handlers - the actions to be taken on failure to provision subscription.

  • Categories[ ].SuccessActionConfiguration / FailureActionConfiguration.TemplateNamePrefix Using this option you can specify the template for additional notification.

  • Categories[ ].SuccessActionConfiguration / FailureActionConfiguration.TemplateNameNewPrefix If this option is set and the subscription that is being handled is new the template name prefix in this setting will be used.

  • Categories[ ].SuccessActionConfiguration / FailureActionConfiguration.TemplateNameRenewalUpgradeDowngradePrefix If this option is set and the subscription that is being handled is either a renewal, upgrade or downgrade subscription the template name prefix in this setting will be used.

  • InvoiceReminders[ ].SuccessActionConfiguration / FailureActionConfiguration.ActionHandlers[ ] You can invoke several actions on success or failure, which is defined by the entries of this option.

  • InvoiceReminders[ ].SuccessActionConfiguration / FailureActionConfiguration.ActionHandlers[ ].ClassName Namespace and the class name of the .Net class which will execute this action.

  • InvoiceReminders[ ].SuccessActionConfiguration / FailureActionConfiguration.ActionHandlers[ ].Parameters Parameters to be passed to action class.

  • ApplyToSubresellers If set to true and this configuration is reseller specific then it also applies reseller's sub-resellers.

4.7.17. Collecting usage data

Namespace: Atomia.Billing.Plugins.GenericWorkflowPlugin.EventHandlers.UsageDataScheduledEventHandler

When hosting virtual machines in a usage based scenario this Eventhandler will in a fixed interval collect usage data from OpenStack and transform it into billing data in Atomia.

Example configuration:

            {
            "Timestep": "1",
            "VpsInstanceService": "EC2Instance",
            "ChargeWhenShutDown": "true"
            }
          
  • Timestep The time interval in hours to check for usage data, the default value of 1 will update usage in 1 hour chunks.

  • VpsInstanceService The name of the VPS instance service, the default name is EC2Instance.

  • ChargeWhenShutDown When setting to true instance usage will be counted when the virtual machine is turned off

4.7.18. Technical information on obtaining and updating workflow configuration options

Currently, there is no GUI for managing options of generic workflow. The management of the workflow isdone directly in the database.

To get all the workflow options,you will run the following query:

            select * from plugin
            inner join plugin_configuration on plugin.id=plugin_configuration.fk_plugin_id
            where full_class_name like 'Atomia.Billing.Plugins.GenericWorkflowPlugin%'
            order by full_class_name
          

To update the workflow options you will have to update an appropriate entry in the plugin_configuration table. For example:

            update plugin_configuration
            set value = '{
            "DnsCategoryName":"DNS",
            "DomainRegistrationCategoryName":"Domain",
            "DomainTransferCategoryName":"DomainTransfer",
            "HostingCategoryName":"Hosting",
            "OnlinePaymentUrl":
            "https://billing.example.com/Invoice/{0}/{1}/OnlinePayment",
            "OwnDomainArticleNumber":"DOM_OW",
            "RegisteredDomainsLimit":0,
            "ResetPasswordUrl":"https://my.example.com/ResetPasswords/{0}/{1}",
            "SendInvoiceByPostItem":"FEE-POST",
            "SetupFeeItem":"FEE-SETUP"
            }'
            where fk_plugin_id = '11cdd494-de5b-460e-9ddf-4e84bad6f596'
          

4.7.19. Technical information about variables available in different email templates

This is a placeholder section that needs to be written.

4.8. Migrate to Generic Workflow

If you are using the old workflow there are some steps needed prior to enabling Generic Workflow. You will find a more detailed description of what needs to be done below.

Feel free to contact our support at if you need help with anything in these steps.

4.8.1. Collect customization details

The first thing you need to do is to query the database and see if you have any customization plugins enabled. Execute this query SELECT * FROM AtomiaBilling.dbo.plugin WHERE name LIKE '%CustomEventHandler%';. If the query return rows you should be aware of that the functionallity that exists in the customization will be disabled when you enable the Generic Workflow.

4.8.2. Configure payment plugins

Your current payment gateway configurations has to be transferred into a new location within the database. The existing configuration files is located in the AtomiaBilling folder. Follow the instructions under the Payment Plugin configuration section to transform your current settings into the new format.

4.8.3. Configure Generic Workflow

Next step in the migration process is to configure the Generic Workflow. A detailed description of all configuration options can be found under the Generic Workflow configuration section of this document.

4.8.4. Enable new configuration

You should now have configured everything that is needed for your workflow. The final step is to execute a set of SQL queries that disables the old configuration and enables the configuration that was inserted in the previous steps.

Disable old configuration

            UPDATE AtomiaBilling.dbo.plugin
            SET enabled = 0
            WHERE full_class_name like 'Atomia.Billing.Plugins.Demo%'
          

Enable Generic Workflow configuration

            UPDATE AtomiaBilling.dbo.plugin
            SET enabled = 1
            WHERE full_class_name like 'Atomia.Billing.Plugins.Generic%'
          

Fix schedulde tasks

            DELETE FROM AtomiaBilling.dbo.scheduled_tasks
            WHERE class_name LIKE 'Atomia.Billing.Plugins.Demo.ScheduledTasks.DomainRenewalSmsScheduledEventHandler%'
          
            UPDATE AtomiaBilling.dbo.scheduled_tasks
            SET class_name = 'Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.InvoiceReminderScheduledEventHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin', name = 'InvoiceReminderScheduledEventHandler'
            WHERE class_name = 'Atomia.Billing.Plugins.Demo.ScheduledTasks.InvoiceReminderScheduledEventHandler, Atomia.Billing.Plugins.Demo'
          
            UPDATE AtomiaBilling.dbo.scheduled_tasks
            SET class_name = 'Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.SubscriptionRenewalScheduledEventHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin', name = 'SubscriptionRenewalScheduledEventHandler'
            WHERE class_name = 'Atomia.Billing.Plugins.Demo.ScheduledTasks.SubscriptionRenewalScheduledEventHandler, Atomia.Billing.Plugins.Demo'
          
            UPDATE AtomiaBilling.dbo.scheduled_tasks
            SET class_name = 'Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.RenewalHeadsUpNotificationScheduledEventHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin', name = 'RenewalHeadsUpNotificationScheduledEventHandler'
            WHERE class_name = 'Atomia.Billing.Plugins.Demo.ScheduledTasks.DomainRenewalNotificationScheduledEventHandler, Atomia.Billing.Plugins.Demo'
          
            UPDATE AtomiaBilling.dbo.scheduled_tasks
            SET class_name = 'Atomia.Billing.Plugins.GenericWorkflowPlugin.ScheduledTasks.TransferInNotificationScheduledEventHandler, Atomia.Billing.Plugins.GenericWorkflowPlugin', name = 'TransferInNotificationScheduledEventHandler'
            WHERE class_name = 'Atomia.Billing.Plugins.Demo.ScheduledTasks.DomainTransferNotificationScheduledEventHandler, Atomia.Billing.Plugins.Demo'
          

4.9. Migrate to Shops

In version 15.3, default configurations of GUI application use old XML definition of hosting products. If you want to switch to Shops which are defined in Atomia Billing, the following steps should be completed:

Feel free to contact our support at if you need help with anything in these steps.

4.9.1. Migrate data from XML file

At the moment, products are defined in XML configuration file in every GUI application. We have created small command line tool to convert this data into SQL scripts which can be used for updating products in the database and creating default shops for resellers. Tool is called AtomiaShopMigrator and can be obtained from our support. When executed, it expects one argument, path to Atomia.Web.Plugin.HostingProducts.dll.config file. It is recommended to use Billing Customer Panel's hosting products file as input for this tool since it has the most data. Upon execution, you will find two SQL files in the same folder:

  • FillItems.sql - should be used to update item properties with additional data which is stored in XML file

  • CreateShops.sql - should be used to create default shops for all resellers based on items and their categories from XML file

Before running these scripts please check how transactions are handled in them and make sure to uncomment rollback or commit statement at the end of the file.

Don't forget to review created shops in Admin Panel before you proceed to next steps. This will also allow you to tweak shops and items additionally.

4.9.2. Configure Order Page

Order Page's web.config file specifies which product provider is used for getting products from Atomia Billing. In version 15.3 default provider is OrderApiXmlProductsProvider which loads list of products from Atomia.Web.Plugin.HostingProducts.dll.config XML file. The other option is PublicApiShopProductsProvider which targets Order Service and gets products from a default shop. In order to use this products provider, locate Unity section in Order Page's web.config file and change IProductsProvider mapping from OrderApiXmlProductsProvider to PublicApiShopProductsProvider. After this, Unity section should look like this:

<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
  <alias alias="IProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.IProductsProvider, Atomia.Web.Plugin.ProductsProvider" />
  <alias alias="PublicApiShopProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.PublicApiShopProductsProvider, Atomia.Web.Plugin.ProductsProvider" />
  <alias alias="OrderApiXmlProductsProvider" type="Atomia.Web.Plugin.HostingProducts.Helpers.OrderApiXmlProductsProvider, Atomia.Web.Plugin.HostingProducts" />
  <alias alias="AtomiaBillingPublicService" type="Atomia.Web.Plugin.OrderServiceReferences.AtomiaBillingPublicService.AtomiaBillingPublicService, Atomia.Web.Plugin.OrderServiceReferences" />
  <alias alias="ICachingManager" type="Atomia.Web.Plugin.ProductsProvider.ICachingManager, Atomia.Web.Plugin.ProductsProvider" />
  <alias alias="HttpApplicationStateCacheManager" type="Atomia.Web.Plugin.HostingProducts.Helpers.HttpApplicationStateCacheManager, Atomia.Web.Plugin.HostingProducts" />
  <alias alias="EntLibCachingManager" type="Atomia.Web.Plugin.ProductsProvider.EntLibCachingManager, Atomia.Web.Plugin.ProductsProvider" />
  <container>
    <register type="AtomiaBillingPublicService">
      <property name="Url" value="http://orderapi.dev.atomia.com/AtomiaBillingPublicService.asmx" />
      <property name="Timeout" value="600000" />
    </register>
    <register type="EntLibCachingManager">
      <constructor>
        <param name="cacheManagerName" value="ProductsCache" />
      </constructor>
    </register>
    <register type="ICachingManager" mapTo="EntLibCachingManager" />
    <register type="IProductsProvider" mapTo="PublicApiShopProductsProvider">
      <constructor>
        <param name="publicService" />
        <param name="cachingManager" />
      </constructor>
    </register>
  </container>
</unity>
            

4.9.3. Configure Billing and Hosting Control Panels

Similar to Order Page's configuration, Billing and Hosting Control Panels use product provider for listing products. In these applications, default products provider, which uses XML config file, is BillingApiXmlProductsProvider and it should be replaced with BillingApiShopProductsProvider. After this, Unity section which is related to configuring product provider should look like this:

<unity>
  <typeAliases>
    <typeAlias alias="IProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.IProductsProvider, Atomia.Web.Plugin.ProductsProvider" />
    <typeAlias alias="BillingApiShopProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.BillingApiShopProductsProvider, Atomia.Web.Plugin.ProductsProvider" />
    <typeAlias alias="BillingApiXmlProductsProvider" type="Atomia.Web.Plugin.HostingProducts.Helpers.BillingApiXmlProductsProvider, Atomia.Web.Plugin.HostingProducts" />
    <typeAlias alias="ICachingManager" type="Atomia.Web.Plugin.ProductsProvider.ICachingManager, Atomia.Web.Plugin.ProductsProvider" />
    <typeAlias alias="HttpApplicationStateCacheManager" type="Atomia.Web.Plugin.HostingProducts.Helpers.HttpApplicationStateCacheManager, Atomia.Web.Plugin.HostingProducts" />
    <typeAlias alias="EntLibCachingManager" type="Atomia.Web.Plugin.ProductsProvider.EntLibCachingManager, Atomia.Web.Plugin.ProductsProvider" />
  </typeAliases>
  <containers>
    <container>
      <register type="EntLibCachingManager">
        <constructor>
          <param name="cacheManagerName" value="ProductsCache" />
        </constructor>
      </register>
      <register type="ICachingManager" mapTo="EntLibCachingManager" />
      <register type="IProductsProvider" mapTo="BillingApiShopProductsProvider">
        <constructor>
          <param name="useIdentityDelegation" value="true" />
          <param name="cachingManager" />
        </constructor>
      </register>
    </container>
  </containers>
</unity>
            

Don't forget to create transformation for these changes since config files are overwritten when applications are updated.