Automatically set budgets for billable accounts
Story
"As a sustainability manager, I want budgets for billable (client) accounts to be set automatically in SprintCraft so that I don't have to spend time doing this manually and can focus more on addressing potential issues."
Full description
Manually keeping budgets for billable (client) accounts up-to-date in SprintCraft is time-consuming and somewhat error-prone. In many cases it requires a lot of back-and-forth between the sustainability manager, the administrative specialist, and client/epic owners, sucking up time that could otherwise be used more productively (e.g. to track a cell's sustainability ratio more closely and work on plans for addressing potential issues before they get out of hand).
Additionally, errors that were made in the past are difficult to correct (in the sense that they require reviewing a lot of historical context which might be spread out over different tickets, epics, spreadsheets, and e-mail threads); and if they are not detected, this means that long-term sustainability statistics will be inaccurate at least to some degree (ref):
- “If budgets for client accounts aren’t set to match the number of billed hours for a certain period, this may result in hidden overhead (if budgets are set higher than the number of billed hours) or artificial overhead (if budgets are set lower than the number of billed hours).”
- “To get the correct upper bound for a cell’s sustainability ratio for a given period, all billable client accounts must have their budgets set to match the number of billed (or billable) hours for that period.”
--
To address these issues we'll need to add functionality for automatically setting budgets for billable (client) accounts to SprintCraft. In particular, budgets for these types of accounts should be:
- Set once per month, for the previous month.
- Based on the number of hours that were invoiced for the previous month.
The reasoning behind this is that the number hours we invoice each month is the ultimate source of truth for sustainability statistics [1]. (In fact, there are many cases where conversations about budgets between the sustainability manager and epic owners ultimately require getting information from the administrative specialist about the number of hours that a client was billed for over the course of a month or several months.)
By setting budgets for billable (client) accounts based on number of hours invoiced, we’ll be able to make sure that budgets set in SprintCraft never exceed the number of billable hours that we actually had available for a given account. (As mentioned above, the latter would hide sustainability issues.)
[1]: This assumes that clients eventually pay the invoices that we issue to them in full. In the odd case that this doesn't happen, the administrative specialist can always go back and manually adjust the budget for a specific month and client to match the number of hours that the client actually paid for.
--
The number of hours to invoice for a specific account generally matches the number of hours logged against that account (see below for exceptions to this rule): About a week into the new month, actuals from Tempo are uploaded to Freshbooks, and draft invoices are generated based on them. The administrative specialist reviews the draft invoices and sends them out to clients.
The automation to build in the context of this ticket should do the same: On the same day that the Freshbook upload normally happens, SprintCraft should pull the number of hours logged over the course of the previous month from Tempo, for each relevant account, and generate a budget entry that matches the number of hours logged.
If the administrative specialist ends up making a change to the draft invoice for an account in Freshbooks (or if the number of hours that a client ends up paying for is different from the number of hours invoiced), they can then go back and selectively adjust the budget entry for that account via SprintCraft's Django admin.
Exceptions
Fixed-price projects where the full amount from the initial quote is invoiced only upon completion of agreed-upon scope.
SprintCraft should not set budgets for accounts belonging to these types of projects automatically; instead, it should allow these budgets to be set manually, in advance, at the start of each fixed-price project.
Completion criteria
- SprintCraft automatically generates budget entries for billable (client) accounts as described above.
- Existing functionality for setting and adjusting budget entries via SprintCraft's Django admin remains in place.
- Create PRs as necessary.
- Deploy changes.
Documentation updates & improvements criteria
- Update SprintCraft's documentation to describe the new functionality.
- Create a follow-up ticket (in STAR) for updating documentation about sustainability management in the handbook.