Core entities
Foundational data types and entities used throughout Metronome.billable_metric
billable_metric
billable_metric
Column | Type | Description |
---|---|---|
id | string | ID of the billable metric |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
aggregate | string | The aggregation type |
aggregate_keys | json | The keys used for aggregation |
group_keys | json | The group by keys associated with this billable metric |
name | string | Name of the billable metric |
created_at | timestamp | The timestamp (UTC) of when the billable_metric was created |
archived_at | timestamp | The timestamp (UTC) of when the billable_metric was archived |
updated_at | timestamp | The timestamp (UTC) of when the billable_metric was last updated |
credit_type
credit_type
credit_type
Column | Type | Description |
---|---|---|
_metronome_metadata_id | string | Metronome metadata ID |
id | string | The credit type ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
name | string | The name of the credit type |
is_currency | boolean | Whether or not the credit type is a currency, TRUE or FALSE |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
Events
The full set of deduplicated raw events received by Metronome, regardless of whether or not they matched a billable metric.events
events
events
Column | Type | Description |
---|---|---|
transaction_id | string | The unique ID of the event |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
customer_id | string | The ID of the customer the event applies to |
timestamp | timestamp | The timestamp (UTC) of the event |
event_type | string | The event type |
properties | json | The properties of the event |
_metronome_metadata_id | string | Metronome metadata ID |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
Customers
Includes customer metadata stored in Metronome including their ingest aliases, which can be joined with theevents
table. The archived_at
column is used to determine if the customer is active.
The customer_billing_provider_configuration
table adds further context on the billing provider for the customer.
customer
customer
customer
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the customer |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
name | string | The name of the customer |
ingest_aliases | json | The ingest aliases of the customer |
salesforce_account_id | string | The Salesforce account ID for the customer |
billing_provider_type | string | The billing provider connected to the customer |
billing_provider_customer_id | string | The billing provider ID of the customer |
custom_fields | json | Custom fields attached to the customer |
created_at | timestamp | The timestamp (UTC) of when the customer was created |
updated_at | timestamp | The timestamp (UTC) of when the customer was last updated |
archived_at | timestamp | The timestamp (UTC) of when the customer was archived, if applicable |
customer_billing_provider_configuration
customer_billing_provider_configuration
customer_billing_provider_configuration
Column | Type | Description |
---|---|---|
id | string | The Metronome customer billing provider configuration ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
configuration | string | The configuration associated with the row |
customer_id | string | The customer ID associated with this row |
billing_provider | string | The billing provider associated with this row |
created_at | timestamp | The timestamp (UTC) of when the customer billing provider configuration was created |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
Invoicing
All invoice-related data including finalized invoices, drafts, and detailed breakdowns.Finalized invoices
Includes all invoices to customers that have been finalized or voided. No further changes can be made to these invoices or their corresponding line items.invoice
invoice
invoice
Column | Type | Description |
---|---|---|
id | string | The Metronome invoice ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
status | string | The Metronome invoice status: FINALIZED or VOID |
total | decimal | The invoice total |
credit_type_id | string | The credit type ID for the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
customer_id | string | The Metronome ID of the customer |
plan_id | string | Deprecated field - expect to be NULL |
plan_name | string | Deprecated field - expect to be NULL |
contract_id | string | The contract ID associated with the invoice |
billing_provider_invoice_id | string | The external invoice ID from the billing provider (e.g., Stripe) |
billing_provider_type | string | The type of external system billing provider (e.g. Stripe) |
billing_provider_invoice_created_at | timestamp | The timestamp (UTC) the external invoice was created by Metronome |
billing_provider_invoice_external_status | string | The status of the invoice in the external system (e.g. Stripe) |
invoice_label | string | The categorical label of the invoice |
metadata | json | Metadata |
start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) |
end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) |
issued_at | timestamp | The timestamp (UTC) of when the invoice was issued |
updated_at | timestamp | The timestamp (UTC) of when this row was last updated |
line_item
line_item
line_item
Column | Type | Description |
---|---|---|
id | string | The line item ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
invoice_id | string | The Metronome invoice ID associated with the line item |
credit_grant_id | string | Deprecated field - expect to be NULL |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
name | string | The line item description |
quantity | decimal | The quantity associated with the line item; this will always be 1 for invoice adjustments |
total | decimal | The line item total |
commit_id | string | The commit ID associated with the line item. Only present for Contract Invoices |
product_id | string | The product ID associated with the line item; this will always be NULL for invoice adjustments |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
unit_price | decimal | The price associated with the line item |
pricing_group_values | json | Optional pricing group values array |
metadata | json | Metadata |
subscription_id | string | The subscription ID associated with the line item. Only present for subscription charges. |
is_prorated | boolean | Indicates if the value is prorated over the period. For subscription charges only. |
starting_at | timestamp | The timestamp (UTC) of when the line item is effective from (inclusive) |
ending_before | timestamp | The timestamp (UTC) of when the line item is effective to (exclusive) |
updated_at | timestamp | The timestamp (UTC) of when the line item was last updated |
Draft invoices
Includes all invoices to customers that are in a draft state. These tables are daily snapshots of invoices based on each customer’s configuration and usage at a point-in-time during the day. Theupdated_at
column is the time that the invoice row was calculated while the snapshot_time
corresponds to the start of day (UTC). An invoice row will be populated once per day throughout a billing period until it is finalized or voided.
If an invoice is in a DRAFT_INCOMPLETE
state, it means that Metronome hasn’t fully computed the invoice. There will be no line items or total on the invoice. Exporting these invoices lets you know that the invoice exists, but Metronome has failed to compute it for some reason. Exporting incomplete invoices enables Metronome to send data to the specified destination as soon as possible. We expect these incomplete invoices to be hydrated in future snapshots.
draft_invoice
draft_invoice
draft_invoice
Column | Type | Description |
---|---|---|
_metronome_metadata_id | string | Unique identifier for each draft invoice ID + snapshot_time pair |
id | string | The Metronome invoice ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_time | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
status | string | The Metronome invoice status: DRAFT or DRAFT_INCOMPLETE (see the invoice table for FINALIZED and VOID invoices) |
total | decimal | The invoice total |
credit_type_id | string | The credit type ID for the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
customer_id | string | The Metronome ID of the customer |
plan_id | string | Deprecated field - expect to be NULL |
plan_name | string | Deprecated field - expect to be NULL |
contract_id | string | The contract ID associated with the invoice |
billable_status | string | Billable status of the invoice, BILLABLE or UNBILLABLE |
billing_provider_invoice_id | string | The external invoice ID from the billing provider (e.g., Stripe) |
billing_provider_invoice_created_at | timestamp | The timestamp (UTC) of when the external invoice was created by Metronome |
label | string | The categorical label of the invoice |
start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) |
end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
draft_line_item
draft_line_item
draft_line_item
Column | Type | Description |
---|---|---|
_metronome_metadata_id | string | Opaque unique identifier for each row |
id | string | The line item ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_time | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
invoice_id | string | The Metronome invoice ID associated with the line item |
credit_grant_id | string | Deprecated field - expect to be NULL |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
name | string | The line item description |
quantity | decimal | The quantity associated with the line item; this will always be 1 for invoice adjustments |
total | decimal | The line item total |
commit_id | string | The commit ID associated with the line item. Only present for Contract Invoices |
product_id | string | The product ID associated with the line item; this will always be NULL for invoice adjustments |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
unit_price | decimal | The price associated with the line item |
pricing_group_values | json | Optional pricing group values array |
subscription_id | string | The subscription ID associated with the line item. Only present for subscription charges. |
is_prorated | boolean | Indicates if the value is prorated over the period. For subscription charges only. |
metadata | json | Metadata |
starting_at | timestamp | The timestamp (UTC) of when the line item is effective from (inclusive) |
ending_before | timestamp | The timestamp (UTC) of when the line item is effective to (exclusive) |
updated_at | timestamp | The timestamp (UTC) of when the line item was last updated |
Invoice breakdowns
Invoice breakdowns are stored in four separate tables that are exported to your warehouse destination daily. The draft invoice data exports in snapshots that contains all month-to-date breakdown periods up to the snapshot timestamp. This ensures that any mid-billing period pricing and packaging changes, as well as backdated usage data, correctly reflect in the most recent draft invoice breakdown snapshot. Finalized invoice breakdowns export incrementally as invoices finalize.- All $0 total and >0 quantity invoices and line items
- All $0 and 0 quantity invoices and line items
breakdowns_invoices
breakdowns_invoices
breakdowns_invoices
Column | Type | Description |
---|---|---|
id | string | The Metronome invoice breakdown ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_timestamp | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
invoice_id | string | The Metronome invoice ID associated with the breakdown |
customer_id | string | The Metronome customer ID associated with the breakdown |
transfer_id | string | The Metronome transfer ID for this invoice breakdown |
credit_type_id | string | The ID of the credit type associated with the invoice |
net_payment_term_days | integer | The net payment term in days associated with the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
subtotal | decimal | Deprecated field—expect to be NULL unless using Plans data model |
total | decimal | The total for the invoice |
type | string | The invoice type |
external_invoice | json | The external invoice data |
plan_id | string | Deprecated field—expect to be NULL unless using Plans data model |
contract_id | string | The contract ID associated with the invoice |
amendment_id | string | The amendment ID associated with the invoice |
custom_fields | json | Custom fields that apply to the invoice |
billable_status | string | The invoice’s billable status |
window_size | string | The size of the breakdown window—typically DAILY |
metadata | json | Metadata |
issued_at | timestamp | The timestamp (UTC) when this invoice was issued |
invoice_start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) (inclusive) |
invoice_end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) (exclusive) |
breakdown_start_timestamp | timestamp | The timestamp corresponding with the start of the breakdown window (inclusive) |
breakdown_end_timestamp | timestamp | The timestamp corresponding with the end of the breakdown window (exclusive) |
updated_at | timestamp | The timestamp (UTC) when this row last updated |
breakdowns_line_items
breakdowns_line_items
breakdowns_line_items
Column | Type | Description |
---|---|---|
id | string | The Metronome line item breakdown ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_timestamp | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
watermark_timestamp | timestamp | The timestamp indicating the latest modification to this row |
invoice_breakdown_id | string | The Metronome invoice breakdown ID associated with the line item |
name | string | The name of the line item associated with the breakdown |
transfer_id | string | The Metronome transfer ID for this line item breakdown |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
quantity | decimal | The quantity of this line item breakdown row—always 1 for invoice adjustments |
total | decimal | The total for the line item breakdown |
unit_price | decimal | The unit price for the line item |
product_id | string | The ID of the product for the line item—always NULL for invoice adjustments |
product_type | string | The type of product for the line item breakdown |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
commit_id | string | The commit ID associated with the line item breakdown |
commit_segment_id | string | The commit segment ID associated with the line item breakdown |
commit_type | string | The commit type associated with the line item breakdown |
subscription_id | string | The subscription ID associated with the line item breakdown—only present for subscription charges. |
is_prorated | boolean | Indicates if the value is prorated over the period. For subscription charges only. |
line_item_id | string | The unique line item id that can be used to join with records in the line_item table |
line_item_type | string | The unique line item type that defines the type of revenue represented in the line item |
custom_fields | json | Custom fields that apply to the breakdown |
pricing_group_values | json | The pricing group values associated with the line item breakdown |
presentation_group_values | json | The presentation group values associated with the line item breakdown |
billable_metric_id | string | The billable metric ID that applies to the line item breakdown |
metadata | json | Additional metadata in JSON format (see Metadata ) |
breakdown_start_timestamp | timestamp | The timestamp corresponding with the start of the breakdown window (inclusive) |
breakdown_end_timestamp | timestamp | The timestamp corresponding with the end of the breakdown window (exclusive) |
updated_at | timestamp | The timestamp (UTC) when this row last updated |
breakdowns_draft_invoices
breakdowns_draft_invoices
breakdowns_draft_invoices
Column | Type | Description |
---|---|---|
id | string | The Metronome invoice breakdown ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_timestamp | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
invoice_id | string | The Metronome invoice ID associated with the breakdown |
customer_id | string | The Metronome customer ID associated with the breakdown |
transfer_id | string | The Metronome transfer ID for this invoice breakdown |
credit_type_id | string | The ID of the credit type associated with the invoice |
net_payment_term_days | integer | The net payment term in days associated with the invoice |
credit_type_name | string | The name of the credit type associated with the invoice |
subtotal | decimal | Deprecated field—expect to be NULL unless using Plans data model |
total | decimal | The total for the invoice |
type | string | The invoice type |
external_invoice | json | The external invoice data |
plan_id | string | Deprecated field—expect to be NULL unless using Plans data model |
contract_id | string | The contract ID associated with the invoice |
amendment_id | string | The amendment ID associated with the invoice |
custom_fields | json | Custom fields that apply to the invoice |
billable_status | string | The invoice’s billable status |
window_size | string | The size of the breakdown window—typically DAILY |
metadata | json | Additional metadata in JSON format |
issued_at | timestamp | The timestamp (UTC) when this invoice was issued |
invoice_start_timestamp | timestamp | Beginning of the usage period that this invoice covers (UTC) (inclusive) |
invoice_end_timestamp | timestamp | End of the usage period that this invoice covers (UTC) (exclusive) |
breakdown_start_timestamp | timestamp | The timestamp corresponding with the start of the breakdown window (inclusive) |
breakdown_end_timestamp | timestamp | The timestamp corresponding with the end of the breakdown window (exclusive) |
updated_at | timestamp | The timestamp (UTC) when this row last updated |
breakdowns_draft_line_items
breakdowns_draft_line_items
breakdowns_draft_line_items
Column | Type | Description |
---|---|---|
id | string | The Metronome line item breakdown ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_timestamp | timestamp | The timestamp (UTC) aligning with the start of the snapshot |
watermark_timestamp | timestamp | The timestamp indicating the latest modification to this row |
invoice_breakdown_id | string | The Metronome invoice breakdown ID associated with the line item |
name | string | The name of the line item associated with the breakdown |
transfer_id | string | The Metronome transfer ID for this line item breakdown |
group_key | string | The group key associated with the line item |
group_value | string | The group value associated with the line item |
quantity | decimal | The quantity of this line item breakdown row; always 1 for invoice adjustments |
total | decimal | The total for the line item breakdown |
unit_price | decimal | The unit price for the line item |
product_id | string | The ID of the product for the line item; always NULL for invoice adjustments |
product_type | string | The type of product for the line item breakdown |
credit_type_id | string | The credit type ID associated with the line item |
credit_type_name | string | The name of the credit type associated with the line item |
commit_id | string | The commit ID associated with the line item breakdown |
commit_segment_id | string | The commit segment ID associated with the line item breakdown |
commit_type | string | The commit type associated with the line item breakdown |
subscription_id | string | The subscription ID associated with the line item breakdown; only present for subscription charges. |
is_prorated | boolean | Indicates if the value is prorated over the period. For subscription charges only. |
line_item_id | string | The unique line item id that can be used to join with records in the line_item table |
line_item_type | string | The unique line item type that defines the type of revenue represented in the line item |
custom_fields | json | Custom fields that apply to the breakdown |
pricing_group_values | json | The pricing group values associated with the line item breakdown |
presentation_group_values | json | The presentation group values associated with the line item breakdown |
billable_metric_id | string | The billable metric ID that applies to the line item breakdown |
metadata | json | Additional metadata in JSON format (see Metadata ) |
breakdown_start_timestamp | timestamp | The timestamp corresponding with the start of the breakdown window (inclusive) |
breakdown_end_timestamp | timestamp | The timestamp corresponding with the end of the breakdown window (exclusive) |
updated_at | timestamp | The timestamp (UTC) when this row last updated |
Contracts
Includes contract information. Thearchived_at
column defines whether the contract has been archived or not.
contracts_contracts
contracts_contracts
contracts_contracts
Column | Type | Description |
---|---|---|
id | string | ID of the contract |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the contract row |
name | string | Name of the contract |
customer_id | string | The customer ID of the contract |
rate_card_id | string | The rate card ID of the contract |
starting_at | timestamp | The contract start timestamp (UTC) |
ending_before | timestamp | The contract end timestamp (UTC). This timestamp is exclusive. |
archived_at | timestamp | The timestamp (UTC) of when the contract was archived. |
multiplier_override_prioritization | string | The prioritization for a multiplier override. There are two options: • Lowest multiplier (default): The lowest multiplier, aka the biggest discount, is used. • Explicit: The override with the lowest priority will be prioritized. |
net_payment_terms_days | integer | The amount of time a customer has to pay a contract. For example, “net 30” |
usage_statement_schedule_frequency | string | The usage statement generation frequency. For example, “monthly” or “quarterly”. |
scheduled_charges_on_usage_invoices | string | Valid values are ALL if scheduled invoices will be combined with usage invoices on the same date, otherwise null. |
metadata | Metadata | JSON encoded object |
created_at | timestamp | The timestamp (UTC) of when the contract was created |
created_by | string | The entity the contract was created by |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_commits
contracts_commits
contracts_commits
Column | Type | Description |
---|---|---|
id | string | The commit |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID of the row |
contract_id | string | The contract ID of the commit |
amendment_id | string | The amendment ID associated with the commit |
type | string | The type of commit: postpaid or prepaid |
name | string | The name of the commit |
priority | float | The priority that defines the order in which commits should be applied |
description | string | The description of the commit |
product_id | string | The product ID associated with the commit |
amount | float | Deprecated (use the amount from the schedule items instead) |
access_schedule | json | AccessSchedule |
invoice_schedule | json | InvoiceSchedule The invoice_schedule is always set for “postpaid” commits, sometimes set for “prepaid” commits, and never for “credit” |
rollover_fraction | float | The fraction of the commit that was rolled over |
rate_type | string | Either COMMIT_RATE or LIST_RATE |
applicable_product_ids | json | JSON encoded list of applicable product IDs |
applicable_product_tags | json | JSON encoded list of applicable product tags |
specifiers | json | CommitSpecifier[] - JSON encoded list of applicable usage |
ledger | json | CommitLedgerEntry[] |
rolled_over_from_commit_id | string | The commit ID the commit was rolled over from |
rolled_over_from_contract_id | string | The contract ID the commit was rolled over from |
recurring_commit_id | string | The ID of the parent config that created this commit (null if this commit was not created by a recurring commit) |
metadata | json | Metadata |
balance | float | The current balance of the commit. This balance reflects the amount of commit that the customer has access to use at this moment. Expired and upcoming commit segments contribute 0 to the balance. The balance matches the sum of all ledger entries except when the sum of negative manual ledger entries exceeds the positive amount remaining on the commit. In that case, the balance is 0. All manual ledger entries associated with active commit segments are included in the balance, including future-dated manual ledger entries. |
updated_at | timestamp | The timestamp (UTC) of when the commit was last updated |
contracts_commits.AccessSchedule
contracts_commits.InvoiceSchedule
contracts_commits.CommitLedgerEntry
contracts_commits.CommitSpecifier
contracts_balances
contracts_balances
contracts_balances
Column | Type | Description |
---|---|---|
id | string | The ID of the balance |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID of the row |
customer_id | string | The customer ID of the balance |
contract_id | string | The contract ID of the balance |
amendment_id | string | The amendment ID of the balance |
type | string | Either postpaid , prepaid , or credit |
name | string | The name of the balance |
priority | float | The priority that defines the order of balance application |
description | string | The description of the balance |
product_id | string | The product ID associated with the balance |
access_schedule | json | AccessSchedule |
invoice_schedule | json | InvoiceSchedule - The invoice_schedule is always set for “postpaid” commits, sometimes set for “prepaid” commits, and never for “credit” |
rollover_fraction | float | The fraction of the balance that was rolled over |
rate_type | string | Either COMMIT_RATE or LIST_RATE |
applicable_product_ids | json | JSON encoded list of applicable product IDs |
applicable_product_tags | json | JSON encoded list of applicable product tags |
specifiers | json | CommitSpecifier[] - JSON encoded list of applicable usage |
applicable_contract_ids | json | JSON encoded list of applicable contract IDs |
invoice_contract_id | string | The invoice contract ID associated with the balance |
ledger | json | CommitLedgerEntry[] |
rolled_over_from_commit_id | string | The commit ID the balance was rolled over from |
rolled_over_from_contract_id | string | The contract ID the balance was rolled over from |
recurring_commit_id | string | The ID of the parent config that created this commit / credit (null if this commit was not created by a recurring commit / credit) |
metadata | json | Metadata |
balance | float | The current balance of the credit or commit. This balance reflects the amount of credit or commit that the customer has access to use at this moment. Expired and upcoming credit or commit segments contribute 0 to the balance. The balance matches the sum of all ledger entries except when the sum of negative manual ledger entries exceeds the positive amount remaining on the credit or commit. In that case, the balance is 0. All manual ledger entries associated with active credit or commit segments are included in the balance, including future-dated manual ledger entries. |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_balances.AccessSchedule
contracts_balances.InvoiceSchedule
contracts_balances.CommitLedgerEntry
contracts_balances.CommitSpecifier
contracts_recurring_commits_and_credits
contracts_recurring_commits_and_credits
contracts_recurring_commits_and_credits
Column | Type | Description |
---|---|---|
id | string | The unique ID of the recurring commit/credit |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID of the row |
contract_id | string | The contract ID of the recurring commit/credit |
customer_id | string | The customer ID associated with the recurring commit/credit |
type | string | The type: commit or credit |
name | string | The name that’s passed down to created commits/credits |
priority | float | The priority that’s passed down to created commits/credits |
description | string | The description that’s passed down to created commits/credits |
product_id | string | The product ID that’s passed down to created commits/credits |
access_amount | json | AccessAmount |
invoice_amount | json | InvoiceAmount Not set for recurring credits, but optional for recurring commits |
rollover_fraction | float | The rollover amount that’s passed down to created commits/credits. Note that this controls rollover between contracts on contract transition, and not rollover from one period to the next. |
rate_type | string | The rate type that’s passed down to created commits/credits |
applicable_product_ids | json | The applicable product IDs passed down to created commits/credits |
applicable_product_tags | json | The applicable product tags passed down to created commits/credits |
specifiers | json | CommitSpecifier[] - JSON encoded list of applicable usage |
commit_duration | json | CommitDuration How long each created commit is valid for starting from the start date. Currently the unit is always PERIODS , representing the length of the contract’s billing periods (e.g. monthly, quarterly or annual) |
proration | string | Used to control whether the first or last billing periods are prorated. Valid values are NONE , FIRST , LAST , and FIRST_AND_LAST . Default is FIRST_AND_LAST . |
recurrence_frequency | string | If set, commits or credits are created based on the frequency specified and begin to recur at the start date specified on the recurring commit or credit config. Accepted values are MONTHLY , QUARTERLY , and ANNUAL . |
metadata | json | Metadata |
subscription_config | json | SubscriptionConfig - Configuration for linked subscription |
starting_at | timestamp | The timestamp (UTC) of when the recurring credit or commit starts (inclusive) |
ending_before | timestamp | The timestamp (UTC) of when the recurring credit or commit ends (exclusive) |
updated_at | timestamp | The timestamp (UTC) of when the recurring commit / credit was last updated |
contracts_recurring_commits_and_credits.AccessAmount
contracts_recurring_commits_and_credits.InvoiceAmount
contracts_recurring_commits_and_credits.CommitDuration
contracts_recurring_commits_and_credits.CommitSpecifier
contracts_recurring_commits_and_credits.SubscriptionConfig
contracts_usage_filter_schedule
contracts_usage_filter_schedule
contract_id
starting_at >= {TIME_PERIOD_START}
ending_before <= {TIME_PERIOD_END}
contracts_usage_filter_schedule
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the contract usage filter |
contract_id | string | The ID of the contract associated with the usage filter |
starting_at | timestamp | The timestamp (UTC) of the starting timestamp the usage filter is active (inclusive) |
ending_before | timestamp | The timestamp (UTC) of the ending timestamp the usage filter is active (inclusive) |
group_key | string | The group key for the usage filter |
group_values | json | Group values for this usage filter row, stored in a JSON encoded list |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_billing_provider_configuration
contracts_billing_provider_configuration
contracts_billing_provider_configuration
updated_at
column to pull the latest updates.Column | Type | Description |
---|---|---|
id | string | The Metronome contract billing provider configuration ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
contract_id | string | The Metronome contract ID associated with this row |
customer_id | string | The customer ID associated with this row |
billing_provider_config_id | string | The Metronome billing provider configuration ID associated with this row |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
contracts_usage_filters
contracts_usage_filters
contracts_usage_filters
- Filter the table by
contract_id
andstarting_at <= {TIME}
- Select the row with the largest
version
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the contract usage filter |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The ID of the snapshot this row was transferred during |
contract_id | string | The ID of the contract associated with the usage filter |
version | integer | The version of the usage filter |
starting_at | timestamp | The timestamp (UTC) of the starting timestamp the usage filter is active (inclusive) |
group_key | string | The group key for the usage filter |
group_values | json | Group values for this usage filter row, stored in a JSON encoded list |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_prepaid_balance_threshold_configurations
contracts_prepaid_balance_threshold_configurations
contracts_prepaid_balance_threshold_configurations
Column | Type | Description |
---|---|---|
id | string | Same as contract_id |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
contract_id | string | The contract ID associated with the prepaid balance threshold configuration |
enabled | boolean | Whether prepaid balance threshold billing is enabled |
threshold_amount | float | The prepaid balance threshold at which to trigger threshold commit creation |
recharge_to_amount | float | The amount to recharge the balance to when the threshold is reached |
commit_name | string | The name to use as the line item of the threshold charge |
commit_description | string | The description used in the threshold commit |
commit_product_id | string | The fixed product ID used for prepaid balance threshold commits |
commit_applicable_product_ids | json | JSON encoded list of applicable product IDs for the commit |
commit_applicable_product_tags | json | JSON encoded list of applicable product tags for the commit |
payment_gate_type | string | The payment gate type: STRIPE , EXTERNAL , or NONE |
tax_type | string | The tax provider used: STRIPE , ANROK , PRECALCULATED , or NONE |
stripe_payment_type | string | The payment type if using Stripe payment gate: PAYMENT_INTENT or INVOICE |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_spend_threshold_configurations
contracts_spend_threshold_configurations
contracts_spend_threshold_configurations
Column | Type | Description |
---|---|---|
id | string | Same as contract_id |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
contract_id | string | The contract ID associated with the spend threshold configuration |
enabled | boolean | Whether spend threshold billing is enabled |
threshold_amount | float | The spend threshold at which to trigger threshold commit creation |
commit_name | string | The name to use as the line item of the threshold charge |
commit_description | string | The description used in the threshold commit |
commit_product_id | string | The ID of the fixed product used for spend threshold commits |
payment_gate_type | string | The payment gate type: STRIPE , EXTERNAL , or NONE |
tax_type | string | The tax provider used: STRIPE , ANROK , PRECALCULATED , or NONE |
stripe_payment_type | string | The payment type if using Stripe payment gate: PAYMENT_INTENT or INVOICE |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_subscriptions
contracts_subscriptions
contracts_subscriptions
Column | Type | Description |
---|---|---|
id | string | The ID of the subscription |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
customer_id | string | The Metronome ID of the customer |
contract_id | string | The current contract ID |
product_id | string | The product ID of the subscription |
name | string | The name of the subscription |
description | string | The description of the subscription |
billing_frequency | string | The billing frequency of the subscription |
collection_schedule | string | The collection schedule of the subscription |
is_prorated | boolean | Whether or not the subscription is prorated |
invoice_behavior | string | The invoice behavior of the subscription |
quantity_schedule | json | The quantity schedule of the subscription |
fiat_credit_type_id | string | The fiat credit type ID used by the subscription |
metadata | json | Metadata |
starting_at | timestamp | The timestamp (UTC) of when the subscription starts |
ending_before | timestamp | The timestamp (UTC) of when the subscription ends |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_scheduled_charges
contracts_scheduled_charges
contracts_scheduled_charges
Column | Type | Description |
---|---|---|
id | string | The ID of the scheduled charge |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
contract_id | string | The contract ID associated with the scheduled charge |
amendment_id | string | The amendment ID associated with the scheduled charge |
name | string | The name of the scheduled charge |
description | string | The description of the scheduled charge |
product_id | string | The product ID associated with the scheduled charge |
credit_type_id | string | The ID of the credit type or currency |
credit_type_name | string | The name of the credit type or currency |
schedule | json | Schedule |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_scheduled_charges.Schedule
Contract modifications
Includes any modifications of contracts. Thecontracts_overrides
table holds any overrides on top of an existing contract. The contracts_transitions
and contracts_edits
tables contain information about contracts ending, renewing, or changing.
contracts_overrides
contracts_overrides
contracts_overrides
Column | Type | Description |
---|---|---|
id | string | The ID of the override |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
contract_id | string | The contract ID of the override |
amendment_id | string | The amendment ID of the override |
product_id | string | The product ID of the override |
entitled | boolean | Whether or not the override is entitled |
rate_type | string | Either multiplier , overwrite_flat , or overwrite_percentage . NULL if this does not override the rate |
multiplier | float | The multiplier of the override |
priority | float | Only defined for contracts with EXPLICIT multiplier override prioritization |
new_rate | json | Rate |
credit_type_id | string | Only defined for “overwrite_flat”, “overwrite_tiered”, “overwrite_subscription”, or “overwrite_custom” rate types |
credit_type_name | string | Only defined for “overwrite_flat”, “overwrite_tiered”, “overwrite_subscription”, or “overwrite_custom” rate types |
applicable_product_tags | json | JSON encoded list of strings |
override_specifiers | json | OverrideSpecifier[] |
target | string | Either COMMIT_RATE or LIST_RATE . Indicates which rate the override applies to |
is_commit_specific | boolean | Whether or not the override is commit specific |
metadata | json | Metadata |
tiered_override | json | Rates and tiers for tiered overrides |
starting_at | timestamp | The timestamp (UTC) of when the override starts (inclusive) |
ending_before | timestamp | The timestamp (UTC) of when the override ends (exclusive) |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_overrides.OverrideSpecifier
contracts_overrides.Rate
contracts_transitions
contracts_transitions
contracts_transitions
Column | Type | Description |
---|---|---|
id | string | The ID of the transition event |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
type | string | Either “renewal” or “supersede” |
contract_id | string | The current contract ID |
from_contract_id | string | The contract ID that applies prior to the transition |
to_contract_id | string | The contract ID that applies after the transition |
date | timestamp | The timestamp (UTC) of the transition |
metadata | json | Metadata |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
contracts_edits
contracts_edits
contracts_edits
Column | Type | Description |
---|---|---|
id | string | The ID of the contract edit |
contract_id | string | The contract ID of the edit |
timestamp | timestamp | The timestamp (UTC) of the edit |
edits | json | Details of the edits made |
metadata | json | Metadata |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
created_by | string | The entity the contract edit was created by |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
snapshot_id | string | The snapshot ID for the row |
contracts_amendments
contracts_amendments
contracts_amendments
Column | Type | Description |
---|---|---|
id | string | The ID of the contract amendment |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The snapshot ID for the row |
contract_id | string | The contract ID of the amendment |
effective_at | timestamp | The timestamp (UTC) of when the contract amendment is effective starting at |
metadata | json | Metadata |
created_at | timestamp | The timestamp (UTC) of when the contract amendment was created |
created_by | string | The entity the contract amendment was created by |
updated_at | timestamp | The timestamp (UTC) at which this row was exported |
Contract pricing
Includes all information about pricing for a contract.contracts_rate_cards
contracts_rate_cards
contracts_rate_cards
Column | Type | Description |
---|---|---|
id | string | The Metronome contract rate card ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The ID of the snapshot this row was transferred during |
credit_type_conversions | json | The credit type conversions associated with the row |
metadata | json | Metadata |
aliases | json | List of aliases for the rate card |
fiat_credit_type_id | string | The fiat credit type ID associated with the rate card |
fiat_credit_type_name | string | The name of the fiat credit type associated with the rate card |
description | string | The description of the rate card |
name | string | The name of the rate card |
created_by | string | The creator of the rate card |
created_at | timestamp | The timestamp (UTC) this row was created |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
archived_at | timestamp | The timestmap (UTC) this row was archived if applicable |
contracts_rate_card_entries
contracts_rate_card_entries
contracts_rate_card_entries
Column | Type | Description |
---|---|---|
id | string | The Metronome contract rate card entry ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
rate_card_id | string | The Metronome rate card ID associated with this entry |
product_id | string | The product ID associated with this entry |
version | integer | The version of this rate card entry |
entitled | boolean | Whether or not the entry is entitled |
rate | string | The rate that applies to the entry |
commit_rate | string | The commit rate that applies to the entry (if applicable) |
product_order | integer | The product order associated with the entry |
pricing_group_values | json | The pricing group values that apply to the entry |
snapshot_id | string | The ID of the snapshot this row was transferred during |
metadata | json | Metadata |
credit_type_id | string | The credit type ID associated with the rate card |
credit_type_name | string | The name of the credit type associated with the rate card |
billing_frequency | string | The billing frequency associated with the entry. For subscriptions only. |
starting_at | timestamp | The timestamp (UTC) the rate card entry starts at (inclusive) |
ending_before | timestamp | The timestamp (UTC) the rate card entry ends at (exclusive) |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
contracts_product_list_item_versions
contracts_product_list_item_versions
contracts_product_list_item_versions
Column | Type | Description |
---|---|---|
id | string | The Metronome product list item version ID |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
snapshot_id | string | The ID of the snapshot this row was transferred during |
product_list_item_id | string | The product list item ID associated with the row |
type | string | The type of the product list item version |
version | integer | The version of the product list item |
name | string | The name of the product list item version |
is_refundable | boolean | Whether or not the product list item version is refundable |
billable_metric_id | string | The billable metric ID associated with the product list item version |
composite_product_ids | json | The list of composite product IDs associated with the row |
tags | json | The list of tags associated with the row |
composite_tags | json | The list of composite tags associated with the row |
quantity_conversion | json | The quantity conversion for the row |
quantity_rounding | json | The quantity rounding for the row |
pricing_group_key | json | The pricing group key for the row |
presentation_group_key | json | The presentation group key for the row |
metadata | json | Metadata |
starting_at | timestamp | The timestamp (UTC) the version is active starting at (inclusive) |
created_at | timestamp | The timestamp (UTC) this row was created at |
created_by | string | The entity this row was created by |
updated_at | timestamp | The timestamp (UTC) this row was last updated |
Alerts
Includes alerts and the history of customer alerts triggered.alert
alert
alert
Column | Type | Description |
---|---|---|
id | string | The ID of the alert |
name | string | The name of the alert |
alert_type | string | The type of alert |
threshold | decimal | The threshold to trigger the alert |
webhooks_enabled | boolean | Indicates if the alert is configured for webhooks |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
created_at | timestamp | The timestamp (UTC) of when the alert was created |
disabled_at | timestamp | The timestamp (UTC) of when the alert was disabled |
updated_at | timestamp | The timestamp (UTC) of when the alert was last updated |
archived_at | timestamp | The timestamp (UTC) of when the alert was archived |
group_values | json | The group value filters associated with the alert |
customer_alert_history
customer_alert_history
customer_alert_history
Column | Type | Description |
---|---|---|
id | string | The Metronome ID of the customer alert history |
environment_type | string | The Metronome environment, SANDBOX or PRODUCTION |
customer_id | string | The name of the customer associated with the alert history |
alert_id | string | The alert ID associated with the row |
alert_status | string | The alert status associated with the row |
additional_data | json | Additional data about the alert |
created_at | timestamp | Timestamp (UTC) when the alert was evaluated and the status changed |
Metadata
Many tables in the data export include ametadata
column. Clients using Metronome have a variety of external systems and require different metadata to be stored. This metadata is client-specific and is stored as a JSON object in the metadata
column of the table.