HomeGuidesAPI ReferenceChangelog
Log In
Guides

Recreating Account Calculations that Underly a Switch

Overview

When reviewing a savings analysis, you might wonder about the components that derive the bundled rates presented in the first-year forecast. This guide illustrates using the Account Cost Calculator to observe the underlying data in greater detail.

Using the Account API we can send a POST request to the following endpoints to generate an underlying calculation for our SA. This method allows us the added benefit of specifying the detailLevel and groupBy fields in our request providing us with the data granularity we are looking for.

Using Account ID:

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

Using Provider Account ID:

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

Scenario: Full Switch Account

An account that has conducted a full switch will generally have default profiles set at the account level. The calculator adheres to properties and rates set at the account level, however, you can utilize the propertyInputs and rateInputs lists to supersede these defaults. When attempting to recreate SA calculations we strongly recommend setting includeDefaultProfile to false and passing in consumption and solar profiles directly to avoid unexpected behavior.

Step 1

Begin with updating the POST URL with the appropriate Account ID.

Step 2

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 SA to identify these for the consumption and solar profiles.

Step 3

Depending on what scenario you want to observe, make sure to adjust the masterTarrifId to align with the pre-solar or post-solar tariff on the account.

Step 4

Verify the structure of the call and ensure these key points have been addressed:

  • 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 SA.
  • Ensure that the correct time zone value is set on fromDateTime and toDateTime, this can negatively influence the cost calculation.
  • The operator key with a value of - must be present on the solar profile property object.
  • Ensure the autoBaseline and useIntelligentBaselining parameter values match the Savings Analysis.

Step 5

Issue the POST request and observe the response. Remember that the detailLevel and groupBy parameters can be adjusted to alter the granularity of the data.

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": "-"
        }
    ]
}