editContract endpoint.
When you edit a contract, any draft invoices update immediately to reflect that edit. Finalized invoices remain unchanged. If you void and regenerate a finalized invoice, the regenerated invoice updates to reflect the edits you made.
Contract editing examples
This section describes example contract editing scenarios for a company named BigData.Edit the access schedule and invoice schedule for a commit
In this example, BigData’s customer initially negotiated a 2-year SLG contract with a $100K prepaid commit applicable for the first year. The contract started on January 1, 2025 and spans until January 1, 2027. After only 6 months, they’ve used the product very quickly and only have $10K left on their commit. They reach out and negotiate new terms. They’ve doubled their commit amount to $200K, but now have the full 2-year contract term to consume $200K. To implement this change in Metronome, BigData:- Increases the amount of the access schedule segment to $200K
- Extends the
ending_beforedate to the end of the contract term - Adds another invoice schedule segment to charge the customer now for the additional $100K commit
Edit the applicable product IDs for a commit
In this example, a customer’s contract includes a product-specific prepaid commitment named Commit A. Only the usage of the Data Reads product is eligible to consume their commitment. The finalized February 2025 invoice includes usage of Data Reads and Data Writes products. Only Data Reads consumes the prepaid commitment.
The draft March 2025 invoice also includes usage of Data Reads and Data Writes. Again, only Data Reads consumes the prepaid commitment.
The customer then negotiates a mid-term change to their contract, where Data Writes is now eligible to burn down these commits, starting with the March 2025 billing period.
This example API call from March 5, 2025 edits the applicable product IDs associated with the commitment to add Data Reads and Writes.
The finalized February 2025 invoice remains untouched.
If the client had voided and regenerated the month 1 invoice, Commit A would apply to both Data Reads and Data Writes, based on the current state of the contract.
Track edits over time
View a contract’s history to track all changes and edits made over time. ThegetEditHistory endpoint returns all edits ever made to a contract. This includes any edits made through:
- The
editContractendpoint - The
updateEndDateAPI endpoint - Adding usage filters with the
setUsageFiltersendpoint - The Metronome UI
as_of_date parameter on the getContract endpoint.
This example response shows the full state of the contract after the first edit but before the second edit. It takes the created_at time for the first edit and passes that into the as_of_date parameter in getContract.
Supported Edits
Currently, the following edits are supported:- Adding new commits
- Editing Commit access and invoice schedules
- Editing Commit name and description
- Editing Applicable product IDs and Applicable product tags on commits
- Editing Rollover fraction on commits
- Archiving commits
- Adding new recurring commits
- Editing ending_before, the invoice amount, and the access amount on recurring commits
- Adding new credits
- Editing credit access schedules
- Editing Credit name and description
- Editing Applicable product IDs and Applicable product tags on credits
- Adding new recurring credits
- Archiving credits
- Editing ending_before and the access amount on recurring credits
- Adding new overrides
- Removing overrides
- Adding new scheduled charges
- Editing scheduled charge invoice schedules
- Archiving scheduled charges
- Adding spend threshold configuration
- Updating spend threshold configuration
- Updating contract end date
- Updating contract name
Limitations
The contract editing feature has these guardrails. Commit and scheduled charge invoice schedules- If the invoice schedule item is associated with a finalized invoice , you cannot remove or update the invoice schedule item.
- If the invoice schedule item is associated with a voided invoice , you cannot remove the invoice schedule item.
- You cannot remove an access schedule segment that was applied to a finalized invoice. You can void the invoice beforehand and then remove the access schedule segment.
- If you remove an access schedule segment, its manual ledger entry is also removed.
- If you change the access schedule of a commit or credit, any draft invoices reflects the change in access schedule immediately. Finalized invoices remain untouched. If you void and regenerate the finalized invoices, the regenerated invoices reflect the new access schedule of the credit or commit.
- You cannot edit rollover commits.
- You can edit the access schedule of the originating commit until the contract it was transitioned to has a finalized invoice.
- You can edit the invoice schedule of the originating commit until the original contract has ended.
- Before archiving a commit, all finalized usage invoices that the commit was applied to must be voided. Any finalized invoices for commit payment must also be voided.
- Before archiving a credit, all finalized usage invoices that the credit was applied to must be voided.
- Before archiving a scheduled charge, all finalized invoices created by the scheduled charge must be voided.