Create a custom field key
Creates a new custom field key for a given entity (e.g. billable metric, contract, alert).
Custom fields are properties that you can add to Metronome objects to store metadata like foreign keys or other descriptors. This metadata can get transferred to or accessed by other systems to contextualize Metronome data and power business processes. For example, to service workflows like revenue recognition, reconciliation, and invoicing, custom fields help Metronome know the relationship between entities in the platform and third-party systems.
Use this endpoint to:
- Create a new custom field key for Customer objects in Metronome. You can then use the Set Custom Field Values endpoint to set the value of this key for a specific customer.
- Specify whether the key should enforce uniqueness. If the key is set to enforce uniqueness and you attempt to set a custom field value for the key that already exists, it will fail.
Usage guidelines:
- Custom fields set on commits, credits, and contracts can be used to scope alert evaluation. For example, you can create a spend threshold alert that only considers spend associated with contracts with custom field key
contract_typeand valuepaygo - Custom fields set on products can be used in the Stripe integration to set metadata on invoices.
- Custom fields for customers, contracts, invoices, products, commits, scheduled charges, and subscriptions are passed down to the invoice.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Add a key to the allow list for an entity
alert, billable_metric, charge, commit, contract_credit, contract_product, contract, customer, discount, invoice, product, rate_card, scheduled_charge, subscription, package_commit, package_credit, package_subscription, package_scheduled_charge Response
Success