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.

When reviewing a Savings Analysis, you might want to inspect the components that derive the bundled rates presented in the first-year forecast. Use Account Cost Calculation to observe the underlying data in greater detail. For a full validation workflow, see 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

An account that has conducted a full Savings Analysis will generally have default profiles set at the account level. The calculator uses properties and rates set at the account level. However, you can use the propertyInputs and rateInputs lists to override these defaults. When recreating Savings Analysis calculations, we strongly recommend setting includeDefaultProfile to false and passing in consumption and solar profiles directly to avoid unexpected behavior.

Step 1: Set the account URL

Update the POST URL with the appropriate identifier.

Step 2: Set the profile IDs

Update the placeholder values for the profiles in the POST body to align with the account. You can refer back to the response object in the Savings Analysis to identify the consumption and solar profiles.

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

Issue the POST request and observe the response. You can adjust detailLevel and groupBy to change the granularity of the returned data. Depending on the scenario, update the masterTariffId if a tariff change occurred as a result of the solar system implementation.

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.