HomeGuidesAPI ReferenceChangelog
Log In
Guides

Recreate Account Calculations Underlying a Savings Analysis

Use Account Cost Calculation requests to inspect the calculations underlying a savings analysis with specific detailLevel and groupBy settings.

Use Account Cost Calculation requests to inspect the calculations underlying a Savings Analysis with specific detailLevel and groupBy settings.

Inspect the components behind the first-year forecast's bundled rates with Account Cost Calculation. For a full validation workflow, follow How to Validate Savings Analyses.

Send a POST request to one of the following endpoints to generate an underlying calculation for a Savings Analysis. This method lets you specify the detailLevel and groupBy fields in your request, which gives you the data granularity you need.

Using account ID:

POST /rest/v1/accounts/{accountId}/calculate/

Using provider account ID:

POST /rest/v1/accounts/pid/{providerAccountId}/calculate/

Recreate calculation workflow

  1. Identify the Savings Analysis inputs you want to inspect.
  2. Choose the account identifier.
  3. Set the calculation period.
  4. Pass the consumption and solar profiles explicitly.
  5. Set the tariff for the scenario you want to inspect.
  6. Choose detailLevel and groupBy options.
  7. Run the Account Cost Calculation and compare the result to the Savings Analysis.

Scenario: Full Switch account

Check the account's default profiles, properties, and rates before recreating a Savings Analysis. Use propertyInputs and rateInputs to override account defaults where needed. Set includeDefaultProfile to false and pass consumption and solar profiles explicitly to avoid including unintended profiles.

Step 1: Set the account URL

Update the POST URL with the appropriate identifier.

Step 2: Set the profile IDs

Replace the profile placeholders in the POST body with the consumption and solar profile IDs from the Savings Analysis response.

Step 3: Set the tariff

Use the pre-solar masterTariffId when recreating the before-solar calculations. Use the post-solar masterTariffId when recreating the after-solar calculations.

Step 4: Verify the request structure

Verify the request structure before sending it:

  • The fromDateTime and toDateTime parameters align with the Savings Analysis. You can observe one year of data or adjust these parameters to align with one month of the Savings Analysis.
  • The correct time zone value is set on fromDateTime and toDateTime. An incorrect time zone can negatively influence the cost calculation.
  • The operator key with a value of - must be present on the solar profile property object if stored as positive values in the corresponding profile (this is the standard approach).
  • The autoBaseline and useIntelligentBaselining parameter values match the original Savings Analysis request.

Step 5: Send the request

Send the POST request and inspect the response. Adjust detailLevel and groupBy to change the granularity of the returned data. Use the masterTariffId for the scenario you are recreating, including any tariff change associated with the solar installation.

Request template:

POST /rest/v1/accounts/{yourAccountId}/calculate/
{
  "fromDateTime": "2024-08-01T00:00:00-05:00",
  "toDateTime": "2024-09-01T00:00:00-05:00",
  "includeDefaultProfile": "false",
  "minimums": "true",
  "detailLevel": "CHARGE_TYPE",
  "groupBy": "ALL",
  "fields": "EXT",
  "masterTariffId": 3479298,
  "autoBaseline": true,
  "useIntelligentBaselining": true,
  "propertyInputs": [
    {
      "keyName": "profileId",
      "dataType": "STRING",
      "dataValue": "{yourConsumptionProfileId}",
      "scenarios": "before"
    },
    {
      "keyName": "profileId",
      "dataType": "STRING",
      "dataValue": "{yourSolarProfileId}",
      "scenarios": "after",
      "operator": "-"
    }
  ]
}

Request field reference

FieldPurpose
fromDateTime / toDateTimeSets the calculation period to inspect.
includeDefaultProfileSet to false when passing profiles explicitly.
minimumsControls whether minimum charges are included.
detailLevelControls the level of charge detail returned.
groupByControls the aggregation level of the response.
fieldsIncludes extended fields when set to EXT.
masterTariffIdSets the tariff used for the scenario calculation.
autoBaselineShould match the Savings Analysis setting.
useIntelligentBaseliningShould match the Savings Analysis setting.
propertyInputs[].profileIdIdentifies the consumption or solar profile used in the calculation.
operator: "-"Subtracts solar production from consumption for the post-solar scenario.

Compare the response

After the request succeeds, compare the returned costs, quantities, and line items against the Savings Analysis values for the same scenario and date range.

Check these fields first:

  • summary.totalCost
  • summary.adjustedTotalCost
  • summary.kWh
  • items[].chargeType
  • items[].rateAmount
  • items[].itemQuantity
  • items[].cost

If the recreated calculation does not match the Savings Analysis, confirm that the account, profiles, tariff, date range, time zone, autoBaseline, and useIntelligentBaselining values match the original analysis.

Summary

You can recreate the account-level calculations behind a Savings Analysis by passing the same account, profile, tariff, date range, and baselining inputs into Account Cost Calculation. Use detailLevel and groupBy to control how granularly you inspect the calculation response.


Did this page help you?