Table name | Description |
---|---|
Customer | This table contains customer metadata like CRM customer ID or ERP customer ID that are needed to match Metronome’s billing data to downstream systems for revenue recognition. |
Contract | This table contains metadata like contract type, opportunity ID, or sales order ID that are needed to match Metronome’s billing data to downstream systems for revenue recognition. |
Invoice | This table contains all invoices generated by Metronome. Invoices include invoices.type , which indicates the types of charges included on each invoice (prepaid commit purchase, usage, or postpaid commit true-up). |
Invoice line items | This table contains all line items associated to each invoice. Line items include:
|
Balances | This table contains a consolidation of all credits and commits. Balances include balances.type , which indicates if the balance is prepaid, postpaid, or credit. Each balance contains a ledger, which tracks all invoice deductions, manual adjustments, expirations, or true-ups. |
id | name |
---|---|
10001 | Customer A |
id | customer_id | starting_at | ending_before |
---|---|---|---|
20001 | 10001 | Jan 1, 2024 00:00 | null |
id | invoice_type | total | issued_at | start_timestamp | end_timestamp | contract_id |
---|---|---|---|---|---|---|
30001 | CONTRACT_USAGE | 459 | Feb 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20001 |
id | invoice_id | quantity | unit_price | total | line_item_name | product_name | commit_id | starting_at | ending_before |
---|---|---|---|---|---|---|---|---|---|
40001 | 30001 | 360 | 1.00 | 360 | CloudCompute | CloudCompute | 50001 | Jan 1, 2024 00:00 | Jan 16, 2024 00:00 |
40002 | 30001 | 100 | 0.50 | 50 | CloudStorage | CloudStorage | 50001 | Jan 1, 2024 00:00 | Jan 16, 2024 00:00 |
40003 | 30001 | 1 | null | -360 | Free_trial_credits applied | CloudCompute | 50001 | Jan 1, 2024 00:00 | Jan 16, 2024 00:00 |
40004 | 30001 | 1 | null | -50 | Free_trial_credits applied | CloudStorage | 50001 | Jan 1, 2024 00:00 | Jan 16, 2024 00:00 |
40005 | 30001 | 384 | 1.00 | 384 | CloudCompute | CloudCompute | null | Jan 16, 2024 00:00 | Feb 1, 2024 00:00 |
40006 | 30001 | 150 | 0.50 | 75 | CloudStorage | CloudStorage | null | Jan 16, 2024 00:00 | Feb 1, 2024 00:00 |
balances_id | customer_id | contract id | name | ledger type | ledger_entry_id | ledger entry type | ledger entry timestamp | ledger entry amount |
---|---|---|---|---|---|---|---|---|
50001 | 10001 | 20001 | Free_trial_credits | CREDIT | 60001 | credit_segment_start | Jan 1, 2024 00:00 | 500 |
50001 | 10001 | 20001 | Free_trial_credits | CREDIT | 60002 | credit_automated_invoice_deduction | Jan 16, 2024 00:00 | -410 |
50001 | 10001 | 20001 | Free_trial_credits | CREDIT | 60003 | credit_segment_expiration | Jan 16, 2024 00:00 | -90 |
id | name |
---|---|
10002 | Customer B |
id | customer_id | starting_at | ending_before |
---|---|---|---|
20002 | 10001 | Jan 1, 2024 00:00 | Jan 1, 2025 |
id | invoice_type | total | issued_at | start_timestamp | end_timestamp | contract_id |
---|---|---|---|---|---|---|
30002 | CONTRACT_SCHEDULED | 10,000 | Jan 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20002 |
30003 | CONTRACT_USAGE | 0 | Feb 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20002 |
id | invoice_id | quantity | unit_price | total | line_item_name | product_name | commit_id | starting_at | ending_before |
---|---|---|---|---|---|---|---|---|---|
40005 | 30002 | 1 | 10000 | 10000 | Prepaid Commit | Prepaid Commit | 50002 | Jan 1, 2024 00:00 | Jan 1, 2024 00:00 |
40006 | 30003 | 1,000 | 0.80 | 800 | CloudCompute | CloudCompute | 50002 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 |
40007 | 30003 | 250 | 0.40 | 100 | CloudStorage | CloudStorage | 50002 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 |
40008 | 30003 | 1 | null | -800 | prepaid_commitment applied | CloudCompute | 50002 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 |
40009 | 30003 | 1 | null | -100 | prepaid_commitment applied | CloudStorage | 50002 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 |
balances_id | customer_id | contract id | name | ledger type | ledger entry type | ledger entry timestamp | ledger entry amount |
---|---|---|---|---|---|---|---|
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | prepaid_segment_start | Jan 1, 2024 00:00 | 10,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | prepaid_automated_invoice_deduction | Feb 1, 2024 00:00 | -900 |
Month | Usage Charges | Overage Charges | Invoice Total | Remaining Commit Balance |
---|---|---|---|---|
1 | 900 | 0 | 0 | 9,100 |
2 | 700 | 0 | 0 | 8,400 |
3 | 700 | 0 | 0 | 7,700 |
4 | 700 | 0 | 0 | 7,000 |
5 | 700 | 0 | 0 | 6,300 |
6 | 700 | 0 | 0 | 5,600 |
7 | 700 | 0 | 0 | 4,900 |
8 | 700 | 0 | 0 | 4,200 |
9 | 700 | 0 | 0 | 3,500 |
10 | 700 | 0 | 0 | 2,800 |
11 | 700 | 0 | 0 | 2,100 |
12 | 700 | 0 | 0 | 1,400 |
id | invoice_type | total | issued_at | start_timestamp | end_timestamp | contract_id |
---|---|---|---|---|---|---|
30002 | CONTRACT_SCHEDULED | 10,000 | Jan 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20002 |
30003 | CONTRACT_USAGE | 0 | Feb 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20002 |
30004 | CONTRACT_USAGE | 0 | Mar 1, 2024 | Feb 1, 2024 00:00 | Mar 1, 2024 00:00 | 20002 |
30005 | CONTRACT_USAGE | 0 | Apr 1, 2024 | Mar 1, 2024 00:00 | Apr 1, 2024 00:00 | 20002 |
30006 | CONTRACT_USAGE | 0 | May 1, 2024 | Apr 1, 2024 00:00 | May 1, 2024 00:00 | 20002 |
30007 | CONTRACT_USAGE | 0 | Jun 1, 2024 | May 1, 2024 00:00 | Jun 1, 2024 00:00 | 20002 |
30008 | CONTRACT_USAGE | 0 | Jul 1, 2024 | Jun 1, 2024 00:00 | Jul 1, 2024 00:00 | 20002 |
30009 | CONTRACT_USAGE | 0 | Aug 1, 2024 | Jul 1, 2024 00:00 | Aug 1, 2024 00:00 | 20002 |
30010 | CONTRACT_USAGE | 0 | Sep 1, 2024 | Aug 1, 2024 00:00 | Sep 1, 2024 00:00 | 20002 |
30011 | CONTRACT_USAGE | 0 | Oct 1, 2024 | Sep 1, 2024 00:00 | Oct 1, 2024 00:00 | 20002 |
30012 | CONTRACT_USAGE | 0 | Nov 1, 2024 | Oct 1, 2024 00:00 | Nov 1, 2024 00:00 | 20002 |
30013 | CONTRACT_USAGE | 0 | Dec 1, 2024 | Nov 1, 2024 00:00 | Dec 1, 2024 00:00 | 20002 |
30014 | CONTRACT_USAGE | 0 | Jan 1, 2025 | Dec 1, 2024 00:00 | Jan 1, 2025 00:00 | 20002 |
balances_id | customer_id | contract id | name | ledger_type | ledger_entry_id | ledger_entry_type | ledger_entry_timestamp | ledger_entry_amount |
---|---|---|---|---|---|---|---|---|
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60001 | prepaid_segment_start | Jan 1, 2024 00:00 | 10,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60002 | prepaid_automated_invoice_deduction | Feb 1, 2024 00:00 | -900 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60003 | prepaid_automated_invoice_deduction | Mar 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60004 | prepaid_automated_invoice_deduction | Apr 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60005 | prepaid_automated_invoice_deduction | May 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60006 | prepaid_automated_invoice_deduction | Jun 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60007 | prepaid_automated_invoice_deduction | Jul 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60008 | prepaid_automated_invoice_deduction | Aug 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60009 | prepaid_automated_invoice_deduction | Sep 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60010 | prepaid_automated_invoice_deduction | Oct 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60011 | prepaid_automated_invoice_deduction | Nov 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60012 | prepaid_automated_invoice_deduction | Dec 1, 2024 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60013 | prepaid_automated_invoice_deduction | Jan 1, 2025 00:00 | -700 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60014 | prepaid_segment_expiration | Jan 1, 2025 00:00 | -1,400 |
Month | Usage Charges | Overage Charges | Invoice Total | Remaining Commit Balance |
---|---|---|---|---|
1 | 900 | 0 | 0 | 9,100 |
2 | 1,000 | 0 | 0 | 8,100 |
3 | 1,000 | 0 | 0 | 7,100 |
4 | 1,000 | 0 | 0 | 6,100 |
5 | 1,000 | 0 | 0 | 5,100 |
6 | 1,000 | 0 | 0 | 4,100 |
7 | 1,000 | 0 | 0 | 3,100 |
8 | 1,000 | 0 | 0 | 2,100 |
9 | 1,000 | 0 | 0 | 1,100 |
10 | 1,000 | 0 | 0 | 100 |
11 | 1,000 | 900 | 800 | 0 |
12 | 1,000 | 1,000 | 1,000 | 0 |
id | invoice_type | total | issued_at | start_timestamp | end_timestamp | contract_id |
---|---|---|---|---|---|---|
30002 | CONTRACT_SCHEDULED | 10,000 | Jan 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20002 |
30003 | CONTRACT_USAGE | 0 | Feb 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20002 |
30004 | CONTRACT_USAGE | 0 | Mar 1, 2024 | Feb 1, 2024 00:00 | Mar 1, 2024 00:00 | 20002 |
30005 | CONTRACT_USAGE | 0 | Apr 1, 2024 | Mar 1, 2024 00:00 | Apr 1, 2024 00:00 | 20002 |
30006 | CONTRACT_USAGE | 0 | May 1, 2024 | Apr 1, 2024 00:00 | May 1, 2024 00:00 | 20002 |
30007 | CONTRACT_USAGE | 0 | Jun 1, 2024 | May 1, 2024 00:00 | Jun 1, 2024 00:00 | 20002 |
30008 | CONTRACT_USAGE | 0 | Jul 1, 2024 | Jun 1, 2024 00:00 | Jul 1, 2024 00:00 | 20002 |
30009 | CONTRACT_USAGE | 0 | Aug 1, 2024 | Jul 1, 2024 00:00 | Aug 1, 2024 00:00 | 20002 |
30010 | CONTRACT_USAGE | 0 | Sep 1, 2024 | Aug 1, 2024 00:00 | Sep 1, 2024 00:00 | 20002 |
30011 | CONTRACT_USAGE | 0 | Oct 1, 2024 | Sep 1, 2024 00:00 | Oct 1, 2024 00:00 | 20002 |
30012 | CONTRACT_USAGE | 0 | Nov 1, 2024 | Oct 1, 2024 00:00 | Nov 1, 2024 00:00 | 20002 |
30013 | CONTRACT_USAGE | 900 | Dec 1, 2024 | Nov 1, 2024 00:00 | Dec 1, 2024 00:00 | 20002 |
30014 | CONTRACT_USAGE | 1,000 | Jan 1, 2025 | Dec 1, 2024 00:00 | Jan 1, 2025 00:00 | 20002 |
id | invoice id | quantity | unit_price | total | line_item_name | product_name | commit id | starting_at | ending_before |
---|---|---|---|---|---|---|---|---|---|
40006 | 30013 | 1,000 | 0.80 | 800 | CloudCompute | CloudCompute | 50002 | Nov 1, 2024 00:00 | Dec 1, 2024 00:00 |
40007 | 30013 | 500 | 0.40 | 200 | CloudStorage | CloudStorage | 50002 | Nov 1, 2024 00:00 | Dec 1, 2024 00:00 |
40008 | 30013 | 1 | null | -100 | prepaid_commitment applied | CloudCompute | 50002 | Nov 1, 2024 00:00 | Dec 1, 2024 00:00 |
balances_id | customer_id | contract id | name | ledger_type | ledger_entry_id | ledger_entry_type | ledger_entry_timestamp | ledger_entry_amount |
---|---|---|---|---|---|---|---|---|
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60001 | prepaid_segment_start | Jan 1, 2024 00:00 | 10,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60002 | prepaid_automated_invoice_deduction | Feb 1, 2024 00:00 | -900 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60003 | prepaid_automated_invoice_deduction | Mar 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60004 | prepaid_automated_invoice_deduction | Apr 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60005 | prepaid_automated_invoice_deduction | May 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60006 | prepaid_automated_invoice_deduction | Jun 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60007 | prepaid_automated_invoice_deduction | Jul 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60008 | prepaid_automated_invoice_deduction | Aug 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60009 | prepaid_automated_invoice_deduction | Sep 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60010 | prepaid_automated_invoice_deduction | Oct 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60011 | prepaid_automated_invoice_deduction | Nov 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60012 | prepaid_automated_invoice_deduction | Dec 1, 2024 00:00 | -1,000 |
50002 | 10002 | 20002 | prepaid_commitment | PREPAID | 60013 | prepaid_automated_invoice_deduction | Jan 1, 2025 00:00 | -1,000 |
id | name |
---|---|
10003 | Customer C |
id | customer_id | starting_at | ending_before |
---|---|---|---|
20003 | 10003 | Jan 1, 2024 00:00 | Jan 1, 2025 |
id | invoice_type | total | issued_at | start_timestamp | end_timestamp | contract_id |
---|---|---|---|---|---|---|
30002 | CONTRACT_SCHEDULED | 800 | Feb 1, 2024 | Jan 1, 2024 00:00 | Feb 1, 2024 00:00 | 20003 |
30003 | CONTRACT_SCHEDULED | 800 | Mar 1, 2024 | Feb 1, 2024 00:00 | Mar 1, 2024 00:00 | 20003 |
30004 | CONTRACT_SCHEDULED | 800 | Apr 1, 2024 | Mar 1, 2024 00:00 | Apr 1, 2024 00:00 | 20003 |
30005 | CONTRACT_SCHEDULED | 800 | May 1, 2024 | Apr 1, 2024 00:00 | May 1, 2024 00:00 | 20003 |
30006 | CONTRACT_SCHEDULED | 800 | Jun 1, 2024 | May 1, 2024 00:00 | Jun 1, 2024 00:00 | 20003 |
30007 | CONTRACT_SCHEDULED | 800 | Jul 1, 2024 | Jun 1, 2024 00:00 | Jul 1, 2024 00:00 | 20003 |
30008 | CONTRACT_SCHEDULED | 800 | Aug 1, 2024 | Jul 1, 2024 00:00 | Aug 1, 2024 00:00 | 20003 |
30009 | CONTRACT_SCHEDULED | 800 | Sep 1, 2024 | Aug 1, 2024 00:00 | Sep 1, 2024 00:00 | 20003 |
30010 | CONTRACT_SCHEDULED | 800 | Oct 1, 2024 | Sep 1, 2024 00:00 | Oct 1, 2024 00:00 | 20003 |
30011 | CONTRACT_SCHEDULED | 800 | Nov 1, 2024 | Oct 1, 2024 00:00 | Nov 1, 2024 00:00 | 20003 |
30011 | CONTRACT_SCHEDULED | 800 | Dec 1, 2024 | Nov 1, 2024 00:00 | Dec 1, 2024 00:00 | 20003 |
30011 | CONTRACT_SCHEDULED | 800 | Jan 1, 2025 | Dec 1, 2024 00:00 | Jan 1, 2025 00:00 | 20003 |
30012 | CONTRACT_TRUEUP | 400 | Jan 1, 2025 | Dec 1, 2024 00:00 | Jan 1, 2025 00:00 | 20003 |
balances_id | customer_id | contract id | name | commit_type | ledger_entry_id | ledger_entry_type | ledger_entry_timestamp | ledger_entry_amount |
---|---|---|---|---|---|---|---|---|
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60001 | postpaid_initial_balance | Jan 1, 2024 00:00 | 10,000 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60002 | postpaid_automated_invoice_deduction | Feb 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60003 | postpaid_automated_invoice_deduction | Mar 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60004 | postpaid_automated_invoice_deduction | Apr 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60005 | postpaid_automated_invoice_deduction | May 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60006 | postpaid_automated_invoice_deduction | Jun 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60007 | postpaid_automated_invoice_deduction | Jul 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60008 | postpaid_automated_invoice_deduction | Aug 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60009 | postpaid_automated_invoice_deduction | Sep 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60010 | postpaid_automated_invoice_deduction | Oct 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60011 | postpaid_automated_invoice_deduction | Nov 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60012 | postpaid_automated_invoice_deduction | Dec 1, 2024 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60013 | postpaid_automated_invoice_deduction | Jan 1, 2025 00:00 | -800 |
50003 | 10003 | 20003 | postpaid_commitment | POSTPAID | 60014 | postpaid_trueup | Jan 1, 2025 00:00 | -400 |