Other Configurable Settings
App Settings Table
There are few configurable settings in Usage and Billing which can be configured by editing ‘dbo.AppSettings’ table in the ‘CloudAssertBilling’ database.
Key | Values | Default | Functionality |
MaxHourlyUnitPriceAllowed | Number | 100 | Does not calculate the usage cost if the hourly unit price for the resource exceeds the ‘MaxHourlyUnitPriceAllowed’ value |
MaxMonthlyUnitPriceAllowed | Number | 74400 | Does not calculate the usage cost if the monthly unit price for the resource exceeds the ‘MaxMonthlyUnitPriceAllowed value |
IsAutoApproveInvoices | Text | False | Invoice will be auto-approved by admin when the value is set to true and will be ready to be processed in WHMCS payment portal. |
IsAutoSuspendSubscriptionOnLowCredit | Text | False | When the value is set to true, subscriptions will be auto-suspended when the credit runs out. This works only if ‘LowCreditChecker’ is enabled Agent Service config file. |
PriceCatalogsTheme | Text | EffectivePriceCatalog.html | Changing it changes the appearance of the market place tile. Themes for the tile cane be seen in ‘C:\inetpub\MgmtSvc-Tenantsite\Content\CloudAssertBilling\Themes’ folder. Any customized html file can be placed in this folder and can be set in the app setting table. |
PriceCatalogsViewOptions | Text | GridAndTiles | Shows both Grid and List view of plans in the tenant portal MARKETPLACE Tab. Other values are ‘Grid’ and ‘Tile’. |
MaximumPurchaseLimitForAddOnAtAnInstance | Number | 5 | Will not allow the tenants to purchase multiple instances of an add-on beyond ‘5’ at a single purchase. |
DefaultCustomerDomainSuffix | Text | .onmicrosoft.com | This will be suffixed to the domain name when a new customer creates a CSP customer profile from the tenant portal |
CsvColumnOrderForSubscription | Text | SubscriptionId, ProviderName, ServiceType, MeteredResourceDisplayName:ResourceName, ResourceId, PropertiesJson:Properties, StartTime:Date, ISOCurrencySymbol:CurrencyText, CurrencySymbol, Units:TotalUnits, Cost:TotalCost, PlanName, SubscriptionName | Contains the column order for the subscription summary csv file. (the value given right to the colon is a friendly name, it is optional) |
CsvColumnOrderForAllUsers | Text | AccountAdminEmailId:User, SubscriptionId:Subscription ID, PlanName:Plan Name, SubscriptionName:Subscription Name, ISOCurrencySymbol:Curreny Text, CurrencySymbol:Currency Symbol, AddOnMonthlyFee:AddOn Cost, ProratedMinimumMonthlyFee:Monthly Fee, OneTimeFee: One-Time Fee, TotalCost:Total Cost, TotalIncludedOfferCredits:Included Offer Credits, TaxAmount:Tax Amount, CreditBalance:User Credits, CurrentBillAmount:Billable Cost, SubscriptionProvisionedDate:Subscription Created Time | Contains the column order for the subscription summary of all users csv file. (the value given right to the colon is a friendly name, it is optional) |
CsvColumnOrderForAllInvoices | Text | Id:Invoice ID, AccountUserId:User, PlanName:Plan Name, SubscriptionName:Subscription Name, Subscription_Id:Subscription ID, InvoiceStartTime:Start, InvoiceEndTime:End, InvoiceDueDate:Due Date, ProcessingStatusString:Processing Status, PaymentStatusString:Payment Status, IsOfflinePayment:Is Offline Payment, ISOCurrencySymbol:Currency, TotalAmountToPay:Total Amount | Contains the column order for the invoice summary of all users csv file. (the value given right to the colon is a friendly name, it is optional) |
IncludeExtendedResourcePropeties | Text | False | When the value is set to true, the usage cost will be set based on the custom property of the VM. |
TimeoutIntervalSeconds | Number | 300 | Used for subscription sync process after addon is purchased. |
PollingIntervalSeconds | Number | 20 | Waiting time for subscription sync process state checking. |
MaxAutoRetry | Number | 2 | Maximum auto retries for subscription sync process (if it is failed to sync) when addon purchase is failed. |
ShowRemainingDaysInOverviewTile | Text | True | When the value is set to false, in the tenant portal overview tab, remaining days will not be shown. |
ShowOverviewTileText | Text | False | When the value is set to true, in the tenant portal overview tab, a text will be shown just below the Current bill amount. |
TenantOverviewTileText | Text | Prices do not include tax | In the tenant portal overview tab, the specified value will be shown just below the Current bill amount. |
DownloadUsageCsvGranularity | Text | Daily | When the value is set to Monthly, the usage will be downloaded for monthly usage instead of daily. |
ShouldSendEmailAlertForAgentServiceHealtStatus | Text | False | When the value is set to True, an email notification will be sent to Admin if Agent service or any usage processor goes down. |
AgentServiceHealthNotificationCatchupHours | Number | 2 | Monitoring the agent service health status every 2 hours. |
UsageRecordProcessorEmailCatchupHours | Number | 3 | Monitoring the Usage Record Processor health status every 3 hours. |
BillingDailyAggregatorEmailCatchupHours | Number | 25 | Monitoring the Billing Daily Aggregator health status every 3 hours. |
UsageExtensionProcessorEmailCatchupHours | Number | 3 | Monitoring the Usage Extension Processor health status every 3 hours. |
InvoiceProcessorForWHMCSEmailCatchupHours | Number | 2 | Monitoring the Invoice Processor for WHMCS health status every 3 hours. |
UpdateBillingHistoryForMonths | Number | 3 | Billing History table will be updated with previous 3 months. |
API Service Configuration File
The ‘Web.config’ file is located at ‘C:\inetpub\MgmtSvc-CloudAssertBilling’ in the machines where the Cloud Assert Usage and Billing API Service is installed.
Replace the ‘Data Source’, ‘User Id’ and ‘Password’ values with the WAP server name, database User Id and Password in the following line if already not set.
<add name="WapMembershipDatabase" connectionString="Data Source=localhost;User Id=sa; Password=[[ReplaceWithYourPassword]]; Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;" />
Agent Service Configuration File
The job processors of Usage and Billing solutions can turned on and off by changing the values in the ‘CloudAssert.WAP.Billing.AgentService.exe.config’ file located at ‘C:\Program Files\ CloudAssertBilling\ CloudAssert.WAP.Billing.AgentService’ in the machine where the Cloud Assert Usage and Billing Agent Service is installed.
Updating WAP Membership Connection
Find the line that has ‘WapMembershipDatabase’ in it.
Replace the ‘Data Source’, ‘User Id’ and ‘Password’ values with the WAP server name, database User Id and Password in the following line if already not set.
<add name="WapMembershipDatabase" connectionString="Data Source=localhost;User Id=sa; Password=[[ReplaceWithYourPassword]]; Initial Catalog=Microsoft.MgmtSvc.PortalConfigStore;" />
Invoice Processor Settings
This setting has to be set as ‘TRUE’ for WHMCS integration. It sends the invoices of tenants to the WHMCS portal.
Setting ‘IsAutoApproveInvoices’ value to ‘True’ from the above image will auto-approve the invoices by admin, and will be made ready for processing by WHMCS. This has to be set in ‘App Settings’ table also (Refer App Settings Table).
Invoice notifier Settings
Marking this setting ‘True’ will auto-suspend the subscription if the tenants fail to pay the invoice on or before the Due date (Refer step 335 & 6 from Step 6 – Configure Invoice Settings). It is also responsible for sending warning and reminder emails to tenants on invoice due date. It also reactivates the subscriptions automatically upon successful payment of invoice.
Low Credit Checker Settings
Marking this setting ‘True’ will auto-suspends the subscriptions of the user if more credits are consumed beyond the allotted limit. It also sends an email notification to the user upon suspending or reactivating the subscriptions.
Once the setting is set to ‘True’ in configuration file, it has to be set in the ‘App Settings’ table as well (Refer App Settings Table).
User Invoice Aggregator Settings
This setting has to be set as ‘TRUE’ to generate invoices per user.
Subscription State Processor Settings
This setting has to be set as ‘TRUE’ to auto suspend / delete the subscription upon reaching its expiry date/ delete after days.
FTP Push Setting
This setting will push the invoice csv files to the ftp server location which can be later used by any ERP system.
Logon to WAP Admin portal, click on Usage and Billing on the Left.
Click on the ‘SETTINGS’ Tab.
Click ‘FTP SERVER’ sub tab.
Check the ‘IS FTP PUSH ENABLED’ checkbox for the invoices to be sent to the FTP/SFTP severs.
Specify the fields as seen in the above screenshot.
Click ‘Save’ button.
Note: A manual restart of the Billing Agent service might be required for the FTP Push settings to work properly.
Customizing Column Order in CSV Files
Usage and Billing solutions allows to set the column order, remove unwanted columns and give friendly name for any downloadable csv file. This can be done by editing the App Settings Table values for ‘CsvColumnOrderForSubscription’, ‘CsvColumnOrderForAllUsers’ and ‘CsvColumnOrderForAllInvoices’.
Adding Custom Column and Custom Data in Invoice CSV File
Custom column and custom data for each and every column for the invoice CSV file can be added.
Adding Custom Column
Logon to the machine where Usage and Billing database is installed.
Navigate to [dbo].[AppSettings] table.
Right click on the table name and click ‘Edit top 200 Rows’.
Search for the key ‘CsvColumnOrderForAllInvoices’ (Refer App Settings Table).
In the corresponding value add the custom column name anywhere separated by a comma (,).
Adding Custom Data
Logon to WAP Admin portal, click on Usage and Billing on the Left.
Click on the ‘USAGE’ Tab.
Click ‘SUBSCRIPTION PROPERTIES’ sub tab.
Drill down into a desired subscription and click on the ‘ADD CUSTOM PROPERTIES’ button at the bottom.
Check the ‘Include Custom Properties in Invoice Csv?’ to view the available coumns.
In the following dialog box that appears, specify the column name from the ‘AVAILABLE COLUMNS’ list and specify the value.
Click complete button to save the values.
Click ‘INVOICES’ sub tab under ‘USAGE’ tab.
Click ‘Export All Invoices’ button at the bottom to download the csv file.
Last updated