Druva MSP icon

Druva MSP

Interact with the Druva MSP API

Actions79

Consumption Billing Analyzer → Analyze Consumption for Billing

AI-generated

Overview

The Consumption Billing Analyzer node in n8n is designed to analyze consumption data for billing purposes within the Druva MSP platform. It supports analyzing consumption over specific dates or relative date ranges, allowing users to calculate billable values using different methods such as average usage, high water mark, or Druva's internal billing formula. This node is beneficial for MSPs or billing administrators who need to generate accurate billing reports based on consumption data, filter results by customers, and apply rounding or unit conversions to the output values. Practical examples include generating monthly billing reports, comparing usage across different periods, or preparing data for invoicing.

Use Case Examples

  1. Analyzing the previous month's consumption for a set of customers to generate billing reports.
  2. Calculating the high water mark usage for a specific quarter to determine peak resource consumption.
  3. Using Druva's API billing method to match internal billing calculations for accurate chargeback.

Properties

Name Meaning
Date Selection Method Choose whether to use specific dates or relative date ranges for the billing period analysis.
Start Date Start date for the billing period (required if using specific dates).
End Date End date for the billing period (required if using specific dates).
Date Range Select a predefined relative date range for billing period analysis (used if relative date range is selected).
Filter by Customers Whether to filter results by specific customer IDs.
Customer IDs List of customer IDs to include in the analysis (required if filtering by customers).
Calculation Method Method to calculate billable values from daily consumption data.
Apply Rounding Whether to apply rounding to the calculated values.
Rounding Direction Direction for rounding calculated values.
Decimal Places Number of decimal places to round to.
Filter Out Zero Usage Whether to filter out items where both usage amount and CU consumed are zero.
Convert Byte Values Whether to convert raw byte values to a larger unit (GB or TB).
Target Unit Unit to convert byte values to if conversion is enabled.
Add Auto-Generated Key Whether to add a deterministic auto-generated key field to each record.
Key Field Name Name of the auto-generated key field.
Wrap Output Items When enabled, wraps all output items into a single item containing an array to prevent multiple executions downstream.
Wrapper Property Name The property name to use for the wrapped array of items in the output.

Output

JSON

  • customerGlobalId - Global identifier for the customer.
  • tenantId - Identifier for the tenant.
  • startDate - Start date of the billing period analyzed.
  • endDate - End date of the billing period analyzed.
  • productName - Name of the product associated with the consumption.
  • productModuleName - Name of the product module associated with the consumption.
  • editionName - Edition name of the product or service.
  • usageDescription - Description of the usage type or metric.
  • usageAmount - Amount of usage consumed during the billing period.
  • cuConsumed - Compute Units consumed, representing billable usage.
  • pricePerUnit - Price per unit of usage or compute unit.
  • totalCost - Total cost calculated based on usage and price per unit.
  • autoGeneratedKey - Deterministic auto-generated key field if enabled, used for uniquely identifying records.

Dependencies

  • Druva MSP API
  • An API key credential for Druva MSP API authentication

Troubleshooting

  • Ensure the API credentials are correctly configured and have necessary permissions to access consumption data.
  • If filtering by customers, verify that the customer IDs are valid and accessible.
  • Check date inputs for correctness, especially when using specific dates to avoid invalid date ranges.
  • If the node throws errors related to resource implementation, confirm that the selected resource and operation are supported by the node version.

Discussion