Edge Case: When Accounts with Adjustment Bills are Present
Task
Obtain the total consumption for a given meter during a given service period.
Contextual notes
- In Utility Cloud, there are four types of statements:
BILL,NOTICE,ADJUSTMENT,PREPAID. Adjustment statements are invoices issued by a provider after an initial invoice has been issued to update the content on the original invoice. The update may or may not relate to usages and charges. Therefore, you should always confirm whether the usage and charges on the adjustment statement is the same as the original statement.- If they are the same, you can continue to use the previous data that you’ve already proceeded with – make sure you are not counting the usages from both statements which would result in double counting.
- If they are different, we recommend you manually review the two statements and decide which one is more suitable to be used contextually. Currently, we do not have a recommendation that works for all, if not most, cases. If you are having trouble deciding, please reach out to us for help.
- At a high level, the following steps checks: For a statement period (denoted by the
periodStartandperiodEnddate values), whether a meter (identified by themeterId) shows up on more than one statement (identified by thestatementId).
Steps
Accounting for adjustment bills for one meter:
- Use the List Meter’s Statements endpoint to make a request by specifying the
meterId. - The response will include a list of statements at the JSON path
._embedded.statements. For each statement, there will be aperiodStartandperiodEnddate pair. Identify the respectiveperiodStartandperiodEndfields for eachstatementIdand review them to identify whether there are periods that have multiple statementIds.- If there are no periods that have more than one
statementIds (in other words, each period only has one correspondingstatementId), then there are no adjustment statements. You have completed this check and can continue to use the data you’ve stored without extra processing steps. - If there are periods that have more than one
statementIds, then there may be adjustment statements. You need to proceed to step 3.
- If there are no periods that have more than one
- For the
statementIds that have the same values for theperiodStartandperiodEndfields, review the value for thestatementTypefield at the JSON path._embedded.statements.statementTypefor eachstatementId. If the value for thestatementTypefield isADJUSTMENT, its statement object is created from an adjustment bill from the provider. - Compare the
totalUsageandtotalChargesvalues on themeterDataobjects at the JSON path._embedded.statements.accountData.meterDatafrom all statement types during the same period and determine which one is more appropriate to be used contextually.Likely, you will need to carry this step out manually.
Accounting for adjustment bills for all meters:
- Use the List Meters endpoint to make a request with no search parameters specified.
- The response will include a list of all meters that belongs to your organization.
- Follow steps 1-4 for each
meterIdreturned in the response in step 6.
Updated 3 months ago
