The values of Meter Derived Fields are not raw usage data values but always the result of a calculation, which can reference Meter Data Fields, Custom Fields, or Timestamp Fields as source fields. Derived Fields add a very powerful extra dimension of flexibility for setting up the data on which your usage-based pricing plans will be based.This topic explains the different types of field you can reference in Derived Field calculations, how to format those references in calculations, and offers some Derived Field examples:
If you’re reviewing this topic for help in using Derived Field calculations, please also see further details of the supported operators, variables, functions, and type casts at m3ter Calculation Engine.
You can use Lookup functions in your Derived Field calculations and reference Lookup Tables you’ve created for your Organization. See Lookup Tables for more details and an example.
Derived Field calculations will typically reference Meter Data Fields. But you’re not restricted to referencing only Meter Data Fields in your calculations. You can also reference Custom Fields and Timestamp Fields, which greatly extends the scope of measures you can derive and subsequently use as the basis for the Aggregations you need to price your Product Plans.
You can define Custom Fields for your Organization and for the following entity types:
Product
Plan Template
Plan
Meter
Account
Account Plan
Aggregation
Compound Aggregation
Contract
Note that you can define a Custom Field for any of these entities at both the Organizational level and at the level of the individual entity:
When you reference the Custom Field in a calculation, the value defined for the Custom Field at the Organizational level will be used unless you’ve also defined a Custom Field at the individual entity level.
If a Custom Field has also been defined at the individual entity level, this value will be used. This allows you to set up default Custom Field values to use for each entity type in your Organization.
Important! If you want to use the value of a Custom Field you’ve defined at an individual entity level, you must first define a Custom Field for the entity type at the Organizational level with a default value. For more details, see Working with Custom Fields.
Important! You can also define Custom Fields for Aggregations and Compound Aggregations. However, these Custom Fields are NOT supported for referencing in Derived Field calculations.
For example, suppose you have five Accounts in your Organization: Acct1, Acct2, Acct3, Acct4, and Acct5. You expect to use a Derived Field Calculation that will reference a Custom Field for Accounts to add a weighting to each Account for usage data:
You create a Custom Field for Accounts at the Organization level called cfAccount and set its value = 25.
You create a Custom Field for Acct2 called cfAccount and set its value = 20.
You create a Custom Field for Acct4 called cfAccount and set its value = 30.
You do not create any Custom Fields for Acct1, Acct3, or Acct5.
You now reference the Custom Field in your calculation:
account.cfAccount
The calculation will now be evaluated across the five Accounts using these values:
Here’s the general format to use when referencing Custom Fields:
organization.<fieldName>
meter.<fieldName>
product.<fieldName>
account.<fieldName>
accountPlan.<fieldName>
plan.<fieldName>
planTemplate.<fieldName>
Tip: Global vs. Product Meters? Note that Global Meters - those not associated with a Product - cannot resolve Product-scoped Custom Fields, therefore the default will be used. Meters that are associated to a Product can use the Product-specific Custom Field value if it is defined.
Tip: See Also? For creating Custom Fields in the Console, see Managing your Organization. You can use the Create/Edit Console pages for individual entities to set up Custom Fields. For API calls, see the CustomField section of our API Ref Docs. For more background on Custom Fields, see Working with Custom Fields.
You can reference system variable Timestamp Fields in your Derived Field calculations. All timestamps are numeric values representing the appropriate date/times in Epoch milliseconds:
ts
ts.startOfMonth
ts.endOfMonth
ts.startOfMonthUTC
ts.endOfMonthUTC
If the “ets” field - End Timestamp - is specified in the measurement, the following are also available:
Please run through the first example as a starter, which shows both the Console setup for the field and the JSON body schema to create the field using a Create Meter API call. Other examples simply give the calculation for the Derived Field:
In addition to concrete examples, the final section in this topic:
Links you out to a topic on supported syntax and functions for your Derived Field calculations.
Explains how to reference Custom Fields and system timestamp fields in your Derived Field calculations.
Tip: String Derived Fields? Yes, you can also create non-numeric, string Derived Fields which reference Data Fields. See Example 5 below for some examples of operations to create string Derived Fields.
Important: Updating the Calculation? When you use a Derived Field, the calculation is performed at the time the data is ingested and is persisted in the platform at the resultant values. This means that if you update the calculation at a later date:
Any calculated values for data ingested before the update remain the same.
Any calculated values for data ingested after the update will be the result of the new calculation.
Suppose you run a cloud service which offers your end customers computing capabilities. To implement this service, you want to charge for Products that your end customers consume on the basis of a usage measure in Gigabyte-seconds of processing. To set this up, you can first create two Data Fields of type Measure on a Product Meter that ingest raw data measures:
A Memory MB field, which represents the amount of memory in megabytes allocated to the compute function.
A Duration field, which represents the length of time the compute function ran for in milliseconds.
You can then create a Derived Field of type Measure on your Product Meter that:
Converts the input to Memory MB, which is in Megabytes (unit: MiBy), to Gigabytes simply by dividing by 1024.
Converts the input to Duration, which is in milliseconds (unit: ms), to seconds simply by dividing by 1000.
Multiplies the memory allocation in GiBy by the duration value in secs to give a measure in Gigabyte-seconds (unit: GiBy.s):
You can now use this Meter’s GB Second Derived Field as the basis for setting up an Aggregation for pricing your Product Plans.
Important! Note that when you reference Data Fields in a Derived Field calculation, you must use the Code of the referenced fields.
If you want to create this Meter with the same Data and Derived Fields using an API call, please see our API Reference Create Meter page. Here’s the JSON using this call for the example:
If you have a Data Field on your Meter that measures gigabytes stored - field code is gigabytes_stored - and you require a megabytes stored measure, then you can create a Measure Derived Field and use:
Suppose you have two string Data Fields on a Meter:
Location, which is a Where field used to identify the country of residence of your customers.
Type, which is a What field used to identify the type of data check you are performing on your customers.
However, you want a field that combines both these string data types - Location Type. To do this, you can use the + operator in a Derived Field calculation to concatenate the two string fields:
If you need to cast a numeric Data Field as a string to give a string Derived field, you can do this:
Tip: String Manipulation Functions? You can also use String functions in your Derived Field calculations - see String Functions for a listing and explanations.
Suppose you offer a service to manage and process orders and deliveries for online retailers. Your basic pricing model uses a tiered structure on number of orders/deliveries you handle per billing period. You also want to include some product add-ons, which customers can select for on an order-by-order basis. Pricing for an add-on will use a simple unit price model - each billing period customers are charged a fixed price per add-on consumed.To meet this pricing use case, you can create a Derived Field that uses the 3-argument ? : ternary operator. This operator evaluates a boolean statement as first argument and yields one value if the statement is TRUE, another value if the statement is FALSE.In this example:
We have a string Data Field on a Meter of type What called packaging_design.
We then create a Derived Field called package_addon of type Measure, which uses a calculation that references this Data Field:
Calculation:packaging_design=="yes"?1:0
When an order is placed for processing that takes the add-on, yes is entered in the packaging``*_*``design field.
The calculation evaluates the first argument to return TRUE or FALSE:
If the value of packaging_design is yes, then the statement is TRUE and the value of package_addon is 1.
If the value of packaging_design is not yes, then the statement is FALSE and the value of the package_addon is 0.
For pricing, we can now set up an Aggregation that uses the package_addon Derived Field as its target field, and then select SUM for the Aggregation method.We can extend this example to show how Derived Fields can be used for use cases where you want to price for a combination of product add-ons. Suppose you want to price when an order you process has opted for an express package delivery and gift packaging as a combined product add-on. You can set up two string Data Fields on a Meter of type What:
packaging_express
packaging_gift
You can then use a calculation for a Derived Field of type Measure called package_addon2 that references these two Data Fields and employs a nested ternary operator:
The nested expression in brackets is evaluated, which will result in 1 only if packaging_gift has a value of yes.
The main expression is then evaluated and results in 1 only if packaging_express has a value of yes and the nested expression has returned a value of 1. If the nested expression has returned 0, then the main expression will return 0, regardless of whether packaging_express has a value of yes or any other value - that is, is either TRUE or FALSE.
We can therefore see how this form of calculation is useful when we want to price for multiple product add-ons as a bundled add-on - only if all referenced Data Fields have a value of yes does the Derived Field have a value of 1 returned.
Note: Using the m3ter Recurring Charges for Counters feature! You can also implement seat-based pricing for your products and services out-of-the-box using m3ter’s Recurring Charges for Counters feature. See Recurring Charges: Counters for more details.
Suppose you want to implement usage-based pricing against an end-customer Account which accommodates changes in the number of users on that Account during the billing period. This kind of billing use case is often referred to as “seat-based pricing” and can adjust billing charges in the following way:
If members are added to the Account at any time within the billing cycle, the Account will be charged a prorated amount based on the percentage of the billing cycle left at the time each member was added.
If members are removed from the Account at any time within the billing cycle, the Account will be credited in a similar, prorated way.
You can implement seat-based pricing using a Derived Field calculation that uses the 3-argument ? : ternary operator. This operator evaluates a boolean statement as first argument and yields one value if the statement is TRUE , another value if the statement is FALSE.Taking a worked example to illustrate how this calculation works, let’s suppose you’ve put an end-customer Account on a Product Plan for monthly billing and you want to charge for seat-based pricing for September, a 30-day month:
The Account starts the month at 30 seats.
1 seat is removed after 8 days.
1 seat was added back in after 20 days.
This means the seat count is back at 30 at the end of the month.
The charge rate is $10 per month per seat on the Account.
For this example:
The seat-adjustments Data Field is used to log either the removal or addition of a single seat and sends in an appropriate value for these events throughout the billing period:
A value of -1 when a seat is removed.
A value of +1 when a seat is added.
We then create a Derived Field called seat_proration of type Measure that references the seat_adjustments field and exploits system ts (timestamp) fields:
For our worked example, we can first manually calculate what the charge amount should be:
We have an unchanged seat count of 29 for the full month that results in a charge due of: 29 x $10 = $290
We have a seat count of one that will be charged at the prorate of $10/30 per day for:
8 days worth: 8 x $10/30 = $2.67
10 days worth: 10 x $10/30 = $3.33
Total charge: $290 + $2.67 + $3.33 = $296.
We can now breakdown the seat_proration Derived Field calculation in the context of the worked example and see how the calculation is evaluated to give a correct prorated seat count value for the month:
(ts <= ts.startOfMonth) ? 1
If the ts (timestamp) for the seat_adjustments event is less than or equal to the start of the month (ts.startOfMonth), the result is 1.
In our example, the first seat_adjustments event was sent at the end of the 8th day of the Month and this expression checks whether ts is less than or equal to the end of the month (ts.endOfMonth) which it is. If true, it calculates a weighted value based on the position of ts within the month:
For the first seat_adjustment event, -1 was sent at the end of the 8th day so the prorated value returned would be -0.73, which represents the reduction in charge due for the 22 days of the month remaining with one seat removed.
For the second seat_adjustment event, +1 was sent at the start of the 21st day so the prorated value returned would be 0.33, which represents the additional charge due for the 10 days of the month remaining with one seat added back in.
This results in a net adjustment of: -0.73 + 0.33 = -0.4
To implement pricing on the Account, we create another Data Field on another Meter: start_seatcount. This sends a measure of the number of seats registered for the Account at the start of each billing period - in our example, the start of each month. With these two Data Fields in place, we can now add Aggregations to arrive at a pricing metric that accommodates seat count adjustments:
A simple SUM Aggregation targeting the start_seatcount Data Field.
A simple SUM Aggregation targeting the seat_proration Derived Field.
A Compound Aggregation: adjusted_seatcount, that references these two fields and adds them together them using the following calculation:
We can now use the adjusted_seatcount Compound Aggregation to price up Product Plans for those Accounts to which we want to apply seat-based pricing.
In our concrete example, the result of the calculation used for the adjusted_seatcount Compound Aggregation will be: 30 - 0.4 = 29.60. Therefore the charges for the Account will be: $10 x 29.60 = $296, which agrees with what we calculated manually.
In summary, the Derived Field for implementing seat-base pricing calculates a prorated value based on the position of a timestamp (ts) within a month provided by the remove/add usage event.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"m3ter Documentation","description":"Guides, learning resources and API reference for integrating with m3ter","colors":{"primary":"#4caf4c","dark":"#449d44"},"logo":{"light":"https://mintcdn.com/m3ter/t6C65JBQiQOFtjBy/images/m3ter-logo-blue-sf.svg?fit=max\u0026auto=format\u0026n=t6C65JBQiQOFtjBy\u0026q=85\u0026s=3928db28c84ec6950e43caf96e635d80","dark":"https://mintcdn.com/m3ter/t6C65JBQiQOFtjBy/images/m3ter-logo-white-sf.svg?fit=max\u0026auto=format\u0026n=t6C65JBQiQOFtjBy\u0026q=85\u0026s=a018cb782e49a2fbdd811276476d0605"},"favicon":"https://mintcdn.com/m3ter/T0RRts393DSUkWFc/favicon.svg?fit=max\u0026auto=format\u0026n=T0RRts393DSUkWFc\u0026q=85\u0026s=9492b54cc98df6775983b287b6f865cd","navbar":{"links":[{"href":"https://m3ter.freshdesk.com","label":"Support"},{"href":"https://console.m3ter.com","label":"Console"}],"primary":{"type":"button","label":"Schedule a demo","href":"https://www.m3ter.com/contact"}},"footer":{"socials":{"linkedin":"https://uk.linkedin.com/company/m3ter","x":"https://x.com/m3terHQ","github":"https://github.com/m3ter-com"},"links":[{"items":[{"label":"Website","href":"https://www.m3ter.com"},{"label":"Legal","href":"https://www.m3ter.com/legal"},{"label":"Security","href":"https://www.m3ter.com/security"},{"label":"Trust Center","href":"https://trust.m3ter.com"}]}]},"fonts":{"family":"Montserrat"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":false},"integrations":{"ga4":{"measurementId":"G-V9C7TTPRQT"}},"contextual":{"options":["copy","view"],"display":"header"},"thumbnails":{"fonts":{"family":"Montserrat"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"m3ter","hasAudioNarration":false,"actualSubdomain":"m3ter","customDomains":["docs.m3ter.com"],"gitSource":{"type":"github","owner":"m3ter-com","repo":"m3ter-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4b3832e4c4b8ea8e5ac1c","collectionId":"f4691807-992d-43f9-aab2-d179e798824c","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4b3832e4c4b8ea8e5ac1c"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae9a09c36175fbf7124961d","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Guides","count":400},{"language":"default","tag":"API Reference","count":393},{"language":"default","tag":"Endpoints","count":387},{"language":"default","tag":"Integrations","count":66},{"language":"default","tag":"m3sh Function Reference","count":66},{"language":"default","tag":"Synthetic functions","count":50},{"language":"default","tag":"m3ter","count":50},{"language":"default","tag":"m3sh","count":43},{"language":"default","tag":"End-Customer Accounts","count":27},{"language":"default","tag":"m3ter Connector for Salesforce","count":24}]},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":false,"enableAskAiSearchBar":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax","slug":"/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax","pageMetadata":{"title":"Working with Meter Derived Fields and Examples","description":null,"href":"/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The values of Meter Derived Fields are not raw usage data values but always the result of a calculation, which can reference Meter Data Fields, Custom Fields, or Timestamp Fields as source fields. Derived Fields add a very powerful extra dimension of flexibility for setting up the data on which your usage-based pricing plans will be based.`}),`\n`,_jsx(_components.p,{children:`This topic explains the different types of field you can reference in Derived Field calculations, how to format those references in calculations, and offers some Derived Field examples:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#referencing-fields-in-derived-field-calculations`,children:`Referencing Fields in Derived Field Calculations`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#derived-field-examples`,children:`Derived Field Examples`})}),`\n`]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Important!`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If you’re reviewing this topic for help in using Derived Field calculations, please also see further details of the supported operators, variables, functions, and type casts at `,_jsx(_components.a,{href:`/guides/m3ter-calculation-engine`,children:`m3ter Calculation Engine`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`You can use `,_jsx(_components.a,{href:`/guides/lookup-tables/lookup-functions`,children:`Lookup functions`}),` in your Derived Field calculations and reference Lookup Tables you’ve created for your Organization. See `,_jsx(_components.a,{href:`/guides/lookup-tables`,children:`Lookup Tables`}),` for more details and an example.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`referencing-fields-in-derived-field-calculations`,children:`Referencing Fields in Derived Field Calculations`}),`\n`,_jsxs(_components.p,{children:[`Derived Field calculations will typically reference Meter Data Fields. But you’re not restricted to referencing only Meter Data Fields in your calculations. You can also reference `,_jsx(_components.em,{children:`Custom Fields`}),` and `,_jsx(_components.em,{children:`Timestamp Fields,`}),` which greatly extends the scope of measures you can derive and subsequently use as the basis for the Aggregations you need to price your Product Plans.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#referencing-data-fields`,children:`Referencing Data Fields`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#referencing-custom-fields`,children:`Referencing Custom Fields`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#referencing-timestamp-fields`,children:`Referencing Timestamp Fields`})}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`referencing-data-fields`,children:`Referencing Data Fields`}),`\n`,_jsx(_components.p,{children:`The values of Data Fields in the measurement are available as variables, and can be referenced by the Data Field code, for example:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`myDataField`})}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`referencing-custom-fields`,children:`Referencing Custom Fields`}),`\n`,_jsxs(_components.p,{children:[`You can define Custom Fields for your `,_jsx(_components.strong,{children:`Organization`}),` and for the following entity types:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Product`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Plan Template`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Plan`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Meter`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Account`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Account Plan`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Aggregation`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Compound Aggregation`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Contract`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`Note that you can define a Custom Field for any of these entities at both the Organizational level and at the level of the individual entity:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`When you reference the Custom Field in a calculation, the value defined for the Custom Field at the Organizational level will be used unless you’ve also defined a Custom Field at the individual entity level.`}),`\n`,_jsx(_components.li,{children:`If a Custom Field has also been defined at the individual entity level, this value will be used. This allows you to set up default Custom Field values to use for each entity type in your Organization.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`However, restrictions apply to the Custom Fields you can reference in a Derived Field calculation. See `,_jsx(_components.a,{href:`/guides/creating-and-managing-products/working-with-custom-fields#referencing-custom-fields-in-derived-field-calculations`,children:`Referencing Custom Fields in Derived Field Calculations`}),` for details.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important!`}),` If you want to use the value of a Custom Field you’ve defined at an individual entity level, you `,_jsx(_components.em,{children:`must first define`}),` a Custom Field for the entity type at the Organizational level with a default value. For more details, see `,_jsx(_components.a,{href:`/guides/creating-and-managing-products/working-with-custom-fields`,children:`Working with Custom Fields`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important!`}),` You can also define Custom Fields for `,_jsx(_components.strong,{children:`Aggregations`}),` and `,_jsx(_components.strong,{children:`Compound Aggregations`}),`. However, these Custom Fields are NOT supported for referencing in Derived Field calculations.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`example-custom-fields-for-accounts`,children:`Example - Custom Fields for Accounts`}),`\n`,_jsxs(_components.p,{children:[`For example, suppose you have five Accounts in your Organization: `,_jsx(_components.strong,{children:`Acct1`}),`, `,_jsx(_components.strong,{children:`Acct2`}),`, `,_jsx(_components.strong,{children:`Acct3`}),`, `,_jsx(_components.strong,{children:`Acct4`}),`, and `,_jsx(_components.strong,{children:`Acct5`}),`. You expect to use a Derived Field Calculation that will reference a Custom Field for Accounts to add a weighting to each Account for usage data:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`You create a Custom Field for Accounts at the Organization level called `,_jsx(_components.code,{children:`cfAccount`}),` and set its value = `,_jsx(_components.strong,{children:`25`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`You create a Custom Field for `,_jsx(_components.strong,{children:`Acct2`}),` called `,_jsx(_components.code,{children:`cfAccount`}),` and set its value = `,_jsx(_components.strong,{children:`20`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`You create a Custom Field for `,_jsx(_components.strong,{children:`Acct4`}),` called `,_jsx(_components.code,{children:`cfAccount`}),` and set its value = `,_jsx(_components.strong,{children:`30`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`You do not create any Custom Fields for `,_jsx(_components.strong,{children:`Acct1`}),`, `,_jsx(_components.strong,{children:`Acct3`}),`, or `,_jsx(_components.strong,{children:`Acct5`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`You now reference the Custom Field in your calculation:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`account.cfAccount`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`The calculation will now be evaluated across the five Accounts using these values:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Acct1`}),` = `,_jsx(_components.strong,{children:`25`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Acct2`}),` = `,_jsx(_components.strong,{children:`20`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Acct3`}),` = `,_jsx(_components.strong,{children:`25`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Acct4`}),` = `,_jsx(_components.strong,{children:`30`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Acct5`}),` = `,_jsx(_components.strong,{children:`25`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`format-for-referencing-custom-fields`,children:`Format for Referencing Custom Fields`}),`\n`,_jsx(_components.p,{children:`Here’s the general format to use when referencing Custom Fields:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`organization.\u003cfieldName>`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`meter.\u003cfieldName>`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`product.\u003cfieldName>`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`account.\u003cfieldName>`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`accountPlan.\u003cfieldName>`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`plan.\u003cfieldName>`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`planTemplate.\u003cfieldName>`})}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tip: Global vs. Product Meters?`}),` Note that Global Meters - those not associated with a Product - cannot resolve Product-scoped Custom Fields, therefore the default will be used. Meters that are associated to a Product can use the Product-specific Custom Field value if it is defined.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tip: See Also?`}),` For creating Custom Fields in the Console, see `,_jsx(_components.a,{href:`/guides/organization-and-access-management/viewing-and-editing-organization`,children:`Managing your Organization`}),`. You can use the Create/Edit Console pages for individual entities to set up Custom Fields. For API calls, see the `,_jsx(_components.a,{href:`/api/customfield/introduction`,children:`CustomField`}),` section of our API Ref Docs. For more background on Custom Fields, see `,_jsx(_components.a,{href:`/guides/creating-and-managing-products/working-with-custom-fields`,children:`Working with Custom Fields`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`referencing-timestamp-fields`,children:`Referencing Timestamp Fields`}),`\n`,_jsx(_components.p,{children:`You can reference system variable Timestamp Fields in your Derived Field calculations. All timestamps are numeric values representing the appropriate date/times in Epoch milliseconds:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ts`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ts.startOfMonth`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ts.endOfMonth`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ts.startOfMonthUTC`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ts.endOfMonthUTC`})}),`\n`]}),`\n`,_jsx(_components.p,{children:`If the “ets” field - End Timestamp - is specified in the measurement, the following are also available:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ets`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ets.startOfMonth`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ets.endOfMonth`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ets.startOfMonthUTC`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`ets.endOfMonthUTC`})}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`derived-field-examples`,children:`Derived Field Examples`}),`\n`,_jsx(_components.p,{children:`Please run through the first example as a starter, which shows both the Console setup for the field and the JSON body schema to create the field using a Create Meter API call. Other examples simply give the calculation for the Derived Field:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-1-gigabytes/second-measure`,children:`Example 1 - Gigabytes/second measure`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-2-convert-gb-to-mb-measure`,children:`Example 2 - Convert GB to MB measure`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-3-convert-gb-and-kb-to-mb-measure`,children:`Example 3 - Convert GB and KB to MB measure`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-4-mb-mins-measure`,children:`Example 4 - MB-mins measure`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-5-string-derived-field-operations`,children:`Example 5 - String Derived Field operations`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-6-derived-fields-for-product-add-ons`,children:`Example 6 - Derived Fields for Product Add-Ons`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://m3ter.mintlify.app/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-7-derived-field-for-seat-based-pricing`,children:`Example 7 - Derived Field for Seat-Based Pricing`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`In addition to concrete examples, the `,_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#derived-field-calculations-supported-syntax-and-referencing-fields`,children:`final section`}),` in this topic:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Links you out to a topic on supported syntax and functions for your Derived Field calculations.`}),`\n`,_jsx(_components.li,{children:`Explains how to reference Custom Fields and system timestamp fields in your Derived Field calculations.`}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tip: String Derived Fields?`}),` Yes, you can also create non-numeric, string Derived Fields which reference Data Fields. See `,_jsx(_components.a,{href:`/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#example-5-string-derived-field-operations`,children:`Example 5`}),` below for some examples of operations to create string Derived Fields.`]})}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important: Updating the Calculation?`}),` When you use a Derived Field, the calculation is performed at the time the data is ingested and is persisted in the platform at the resultant values. This means that if you update the calculation at a later date:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Any calculated values for data ingested `,_jsx(_components.em,{children:`before the update`}),` remain the same.`]}),`\n`,_jsxs(_components.li,{children:[`Any calculated values for data ingested `,_jsx(_components.em,{children:`after the update`}),` will be the result of the new calculation.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-1-gigabytes/second-measure`,children:`Example 1 - Gigabytes/second measure`}),`\n`,_jsx(Heading,{level:`4`,id:`description-and-console-setup`,children:`Description and Console Setup`}),`\n`,_jsxs(_components.p,{children:[`Suppose you run a cloud service which offers your end customers computing capabilities. To implement this service, you want to charge for Products that your end customers consume on the basis of a usage measure in Gigabyte-seconds of processing. To set this up, you can first create two Data Fields of type `,_jsx(_components.strong,{children:`Measure`}),` on a Product Meter that ingest raw data measures:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.strong,{children:`Memory MB`}),` field, which represents the amount of memory in megabytes allocated to the compute function.`]}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.strong,{children:`Duration`}),` field, which represents the length of time the compute function ran for in milliseconds.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`You can then create a Derived Field of type `,_jsx(_components.strong,{children:`Measure`}),` on your Product Meter that:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Converts the input to `,_jsx(_components.strong,{children:`Memory MB`}),`, which is in Megabytes (unit: MiBy), to Gigabytes simply by dividing by 1024.`]}),`\n`,_jsxs(_components.li,{children:[`Converts the input to `,_jsx(_components.strong,{children:`Duration,`}),` which is in milliseconds (unit: ms), to seconds simply by dividing by 1000.`]}),`\n`,_jsx(_components.li,{children:`Multiplies the memory allocation in GiBy by the duration value in secs to give a measure in Gigabyte-seconds (unit: GiBy.s):`}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=0c9e20f4d096b1a9e285ea49b62e7c9b`,style:{maxWidth:`min(750px, 100%)`},\"data-og-width\":`1012`,width:`1012`,\"data-og-height\":`891`,height:`891`,\"data-path\":`images/1726065737-createmeter45.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?w=280\u0026fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=d29083b7cd87eb539edc8024dbadb41f 280w, https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?w=560\u0026fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=1f5f0d1fc59e974145f7aef47cce3094 560w, https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?w=840\u0026fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=8d11e19ba88847f4688fc2054b2e071c 840w, https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?w=1100\u0026fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=0f52fdb8a7a7e366d344b8bacc1080c7 1100w, https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?w=1650\u0026fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=ae1e66455800ecc0c34a72fe3bba15f1 1650w, https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1726065737-createmeter45.png?w=2500\u0026fit=max\u0026auto=format\u0026n=4PA7eaLaMtaA6FQv\u0026q=85\u0026s=f7b338fcfbd8856ce4a9b47d830d0432 2500w`}),`\n`,_jsxs(_components.p,{children:[`You can now use this Meter’s `,_jsx(_components.strong,{children:`GB Second`}),` Derived Field as the basis for setting up an Aggregation for pricing your Product Plans.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important!`}),` Note that when you reference Data Fields in a Derived Field calculation, you must use the `,_jsx(_components.strong,{children:`Code`}),` of the referenced fields.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`setup-using-api-call`,children:`Setup using API Call`}),`\n`,_jsxs(_components.p,{children:[`If you want to create this Meter with the same Data and Derived Fields using an API call, please see our API Reference `,_jsx(_components.a,{href:`/api/meter/create-meter`,children:`Create Meter`}),` page. Here’s the JSON using this call for the example:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`34`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3ddfea4b-XXXX-467d-XXXX-b6YYYYYYYYYf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1b364e59-e32b-4fbf-bc1e-91b5fc4872e5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Compute Execution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"compute_execution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dataFields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MEASURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"memory_mb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Memory MB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MiBy\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MEASURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"duration_ms\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ms\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"derivedFields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MEASURE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gb_second\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GB second\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GiBy.s\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"calculation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"(memory_mb/1024)*(duration_ms/1000)\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example-2-convert-gb-to-mb-measure`,children:`Example 2 - Convert GB to MB measure`}),`\n`,_jsxs(_components.p,{children:[`If you have a Data Field on your Meter that measures gigabytes stored - field code is `,_jsx(_components.code,{children:`gigabytes_stored`}),` - and you require a megabytes stored measure, then you can create a `,_jsx(_components.strong,{children:`Measure`}),` Derived Field and use:`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation:`}),` `,_jsx(_components.code,{children:`gigabytes_stored*1024`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-3-convert-gb-and-kb-to-mb-measure`,children:`Example 3 - Convert GB and KB to MB measure`}),`\n`,_jsxs(_components.p,{children:[`Suppose you have a Meter with two `,_jsx(_components.strong,{children:`Measure`}),` Data Fields for:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Gigabytes stored: `,_jsx(_components.code,{children:`gigabytes_stored`})]}),`\n`,_jsxs(_components.li,{children:[`Kilobytes stored: `,_jsx(_components.code,{children:`kilobytes_stored`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If you require a megabytes stored measure that combines these two, then you can create a `,_jsx(_components.strong,{children:`Measure`}),` Derived Field and use:`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation:`}),` `,_jsx(_components.code,{children:`(gigabytes_stored*1024) + (kilobytes_stored/1024)`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-4-mb-mins-measure`,children:`Example 4 - MB-mins measure`}),`\n`,_jsx(_components.p,{children:`Suppose you have a Meter with two Measure Data Fields for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Stored volume of data in megabytes at point of last backup: `,_jsx(_components.code,{children:`lastbackup_size`})]}),`\n`,_jsxs(_components.li,{children:[`Duration since last backup was made in minutes: `,_jsx(_components.code,{children:`lastbackup_duration`})]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If you require a MB-mins measure, you can create a `,_jsx(_components.strong,{children:`Measure`}),` Derived Field and use:`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation:`}),` `,_jsx(_components.code,{children:`lastbackup_size * lastbackup_duration`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-5-string-derived-field-operations`,children:`Example 5 - String Derived Field Operations`}),`\n`,_jsx(_components.p,{children:`You can create string Derived Fields which reference Data Fields. Here’s some examples.`}),`\n`,_jsx(Heading,{level:`4`,id:`concatenation`,children:`Concatenation`}),`\n`,_jsx(_components.p,{children:`Suppose you have two string Data Fields on a Meter:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Location`}),`, which is a `,_jsx(_components.strong,{children:`Where`}),` field used to identify the country of residence of your customers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Type`}),`, which is a `,_jsx(_components.strong,{children:`What`}),` field used to identify the type of data check you are performing on your customers.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`However, you want a field that combines both these string data types - `,_jsx(_components.strong,{children:`Location Type`}),`. To do this, you can use the `,_jsx(_components.code,{children:`+`}),` operator in a Derived Field calculation to concatenate the two string fields:`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=30ce75d8a89a3bd6e06b962a7084c9be`,style:{maxWidth:`min(800px, 100%)`},\"data-og-width\":`1097`,width:`1097`,\"data-og-height\":`218`,height:`218`,\"data-path\":`images/1662715170-derivedfield1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?w=280\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=19c2054f69b8743698ee0b126d48948e 280w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?w=560\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=9545f96485bc1481e7c196b494e32981 560w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?w=840\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=ecc8c51f18296b2624e96f85fd67400b 840w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=2798ff4d90bb42fd7da9498b606b110a 1100w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=7fa7541d2310b0e1317ca9a23feb98ac 1650w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715170-derivedfield1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=e872a56d59f5ab5710903583e8e3ceef 2500w`}),`\n`,_jsx(Heading,{level:`4`,id:`cast-numeric-to-string`,children:`Cast Numeric to String`}),`\n`,_jsx(_components.p,{children:`If you need to cast a numeric Data Field as a string to give a string Derived field, you can do this:`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=e16e8eb76fbcedcc5c3f7662f55527c8`,style:{maxWidth:`min(800px, 100%)`},\"data-og-width\":`1116`,width:`1116`,\"data-og-height\":`236`,height:`236`,\"data-path\":`images/1662715778-derivedfield2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?w=280\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=2f3f25ad63569fbb6f88564dd2d49399 280w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?w=560\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=fda687355c1c0d5b78ef557292d16ff5 560w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?w=840\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=3a7a6d67c5264e0a6028658e8d09c1d9 840w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=c3ae1c38c26fcbf2b89f80e675fe397d 1100w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=29f1267e6c3f56edda00a9f389c1a8a2 1650w, https://mintcdn.com/m3ter/Vo1TZsYmBMDUxOdH/images/1662715778-derivedfield2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Vo1TZsYmBMDUxOdH\u0026q=85\u0026s=c1bcd8716415297d7af7b76e5c5e77bf 2500w`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tip: String Manipulation Functions?`}),` You can also use String functions in your Derived Field calculations - see `,_jsx(_components.a,{href:`/guides/m3ter-calculation-engine#string-functions`,children:`String Functions`}),` for a listing and explanations.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`example-6-derived-fields-for-product-add-ons`,children:`Example 6 - Derived Fields for Product Add-Ons`}),`\n`,_jsx(_components.p,{children:`Suppose you offer a service to manage and process orders and deliveries for online retailers. Your basic pricing model uses a tiered structure on number of orders/deliveries you handle per billing period. You also want to include some product add-ons, which customers can select for on an order-by-order basis. Pricing for an add-on will use a simple unit price model - each billing period customers are charged a fixed price per add-on consumed.`}),`\n`,_jsxs(_components.p,{children:[`To meet this pricing use case, you can create a Derived Field that uses the 3-argument `,_jsx(_components.code,{children:`? :`}),` ternary operator. This operator evaluates a boolean statement as first argument and yields one value if the statement is `,_jsx(_components.code,{children:`TRUE`}),`, another value if the statement is `,_jsx(_components.code,{children:`FALSE`}),`.`]}),`\n`,_jsx(_components.p,{children:`In this example:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`We have a string Data Field on a Meter of type `,_jsx(_components.strong,{children:`What`}),` called `,_jsx(_components.code,{children:`packaging_design.`})]}),`\n`,_jsxs(_components.li,{children:[`We then create a Derived Field called `,_jsx(_components.code,{children:`package_addon`}),` of type `,_jsx(_components.strong,{children:`Measure`}),`, which uses a calculation that references this Data Field:`]}),`\n`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation:`}),` `,_jsx(_components.code,{children:`packaging_design==\"yes\"?1:0`})]}),`\n`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`When an order is placed for processing that takes the add-on, `,_jsx(_components.code,{children:`yes`}),` is entered in the `,_jsx(_components.code,{children:\"packaging``*_*``design\"}),` field.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The calculation evaluates the first argument to return `,_jsx(_components.code,{children:`TRUE`}),` or `,_jsx(_components.code,{children:`FALSE`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If the value of `,_jsx(_components.code,{children:`packaging_design`}),` is `,_jsx(_components.code,{children:`yes`}),`, then the statement is `,_jsx(_components.code,{children:`TRUE`}),` and the value of `,_jsx(_components.code,{children:`package_addon`}),` is `,_jsx(_components.code,{children:`1`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If the value of `,_jsx(_components.code,{children:`packaging_design`}),` is not `,_jsx(_components.code,{children:`yes`}),`, then the statement is `,_jsx(_components.code,{children:`FALSE`}),` and the value of the `,_jsx(_components.code,{children:`package_addon`}),` is `,_jsx(_components.code,{children:`0`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`For pricing, we can now set up an Aggregation that uses the `,_jsx(_components.code,{children:`package_addon`}),` Derived Field as its target field, and then select `,_jsx(_components.strong,{children:`SUM`}),` for the Aggregation method.`]}),`\n`,_jsxs(_components.p,{children:[`We can extend this example to show how Derived Fields can be used for use cases where you want to price for a combination of product add-ons. Suppose you want to price when an order you process has opted for an express package delivery and gift packaging as a combined product add-on. You can set up two string Data Fields on a Meter of type `,_jsx(_components.strong,{children:`What`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`packaging_express`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`packaging_gift`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`You can then use a calculation for a Derived Field of type `,_jsx(_components.strong,{children:`Measure`}),` called `,_jsx(_components.code,{children:`package_addon2`}),` that references these two Data Fields and employs a nested ternary operator:`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation:`}),` `,_jsx(_components.code,{children:`packaging_express==\"yes\"?(packaging_gift==\"yes\"?1:0):0`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`How does this work?`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The nested expression in brackets is evaluated, which will result in `,_jsx(_components.code,{children:`1`}),` only if `,_jsx(_components.code,{children:`packaging_gift`}),` has a value of `,_jsx(_components.code,{children:`yes`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`The main expression is then evaluated and results in `,_jsx(_components.code,{children:`1`}),` only if `,_jsx(_components.code,{children:`packaging_express`}),` has a value of `,_jsx(_components.code,{children:`yes`}),` and the nested expression has returned a value of `,_jsx(_components.code,{children:`1`}),`. If the nested expression has returned `,_jsx(_components.code,{children:`0`}),`, then the main expression will return `,_jsx(_components.code,{children:`0`}),`, regardless of whether `,_jsx(_components.code,{children:`packaging_express`}),` has a value of `,_jsx(_components.code,{children:`yes`}),` or any other value - that is, is either `,_jsx(_components.code,{children:`TRUE`}),` or `,_jsx(_components.code,{children:`FALSE`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`We can therefore see how this form of calculation is useful when we want to price for multiple product add-ons as a bundled add-on - only if all referenced Data Fields have a value of `,_jsx(_components.code,{children:`yes`}),` does the Derived Field have a value of `,_jsx(_components.code,{children:`1`}),` returned.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-7-derived-field-for-seat-based-pricing`,children:`Example 7 - Derived Field for Seat-Based Pricing`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note: Using the m3ter Recurring Charges for Counters feature!`}),` You can also implement seat-based pricing for your products and services out-of-the-box using m3ter’s Recurring Charges for Counters feature. See `,_jsx(_components.a,{href:`/guides/recurring-charges-counters`,children:`Recurring Charges: Counters`}),` for more details.`]})}),`\n`,_jsx(_components.p,{children:`Suppose you want to implement usage-based pricing against an end-customer Account which accommodates changes in the number of users on that Account during the billing period. This kind of billing use case is often referred to as “seat-based pricing” and can adjust billing charges in the following way:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`If members are added to the Account at any time within the billing cycle, the Account will be charged a prorated amount based on the percentage of the billing cycle left at the time each member was added.`}),`\n`,_jsx(_components.li,{children:`If members are removed from the Account at any time within the billing cycle, the Account will be credited in a similar, prorated way.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`You can implement seat-based pricing using a Derived Field calculation that uses the 3-argument `,_jsx(_components.code,{children:`? : `}),`ternary operator. This operator evaluates a boolean statement as first argument and yields one value if the statement is `,_jsx(_components.code,{children:`TRUE`}),` , another value if the statement is `,_jsx(_components.code,{children:`FALSE`}),`.`]}),`\n`,_jsx(_components.p,{children:`Taking a worked example to illustrate how this calculation works, let’s suppose you’ve put an end-customer Account on a Product Plan for monthly billing and you want to charge for seat-based pricing for September, a 30-day month:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The Account starts the month at 30 seats.`}),`\n`,_jsx(_components.li,{children:`1 seat is removed after 8 days.`}),`\n`,_jsx(_components.li,{children:`1 seat was added back in after 20 days.`}),`\n`,_jsx(_components.li,{children:`This means the seat count is back at 30 at the end of the month.`}),`\n`,_jsx(_components.li,{children:`The charge rate is $10 per month per seat on the Account.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`For this example:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`seat-adjustments`}),` Data Field is used to log either the removal or addition of a single seat and sends in an appropriate value for these events throughout the billing period:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A value of -1 when a seat is removed.`}),`\n`,_jsx(_components.li,{children:`A value of +1 when a seat is added.`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`We then create a Derived Field called `,_jsx(_components.code,{children:`seat_proration`}),` of type Measure that references the `,_jsx(_components.code,{children:`seat_adjustments`}),` field and exploits system `,_jsx(_components.code,{children:`ts`}),` (timestamp) fields:`]}),`\n`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation`}),`: `,_jsx(_components.code,{children:`seat_adjustments * ((ts \u003c= ts.startOfMonth) ? 1 : (ts \u003c= ts.endOfMonth) ? 1 * (((ts.endOfMonth - ts))/(ts.endOfMonth - ts.startOfMonth)) : 0)`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:`For our worked example, we can first manually calculate what the charge amount should be:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`We have an unchanged seat count of 29 for the full month that results in a charge due of: 29 x $10 = $290`}),`\n`,_jsxs(_components.li,{children:[`We have a seat count of one that will be charged at the prorate of $10/30 per day for:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`8 days worth: 8 x $10/30 = $2.67`}),`\n`,_jsx(_components.li,{children:`10 days worth: 10 x $10/30 = $3.33`}),`\n`,_jsx(_components.li,{children:`Total charge: $290 + $2.67 + $3.33 = $296.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`We can now breakdown the `,_jsx(_components.code,{children:`seat_proration`}),` Derived Field calculation in the context of the worked example and see how the calculation is evaluated to give a correct prorated seat count value for the month:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`(ts \u003c= ts.startOfMonth) ? 1`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If the `,_jsx(_components.code,{children:`ts`}),` (timestamp) for the `,_jsx(_components.code,{children:`seat_adjustments`}),` event is less than or equal to the start of the month `,_jsx(_components.code,{children:`(ts.startOfMonth)`}),`, the result is 1.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`(ts \u003c= ts.endOfMonth) ? 1 * (((ts.endOfMonth - ts))/(ts.endOfMonth - ts.startOfMonth)) : 0`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`In our example, the first `,_jsx(_components.code,{children:`seat_adjustments`}),` event was sent at the end of the 8th day of the Month and this expression checks whether `,_jsx(_components.code,{children:`ts`}),` is less than or equal to the end of the month `,_jsx(_components.code,{children:`(ts.endOfMonth)`}),` which it is. If true, it calculates a weighted value based on the position of `,_jsx(_components.code,{children:`ts`}),` within the month:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`For the first `,_jsx(_components.code,{children:`seat_adjustment`}),` event, -1 was sent at the end of the 8th day so the prorated value returned would be -0.73, which represents the reduction in charge due for the 22 days of the month remaining with one seat removed.`]}),`\n`,_jsxs(_components.li,{children:[`For the second `,_jsx(_components.code,{children:`seat_adjustment`}),` event, +1 was sent at the start of the 21st day so the prorated value returned would be 0.33, which represents the additional charge due for the 10 days of the month remaining with one seat added back in.`]}),`\n`,_jsx(_components.li,{children:`This results in a net adjustment of: -0.73 + 0.33 = -0.4`}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`To implement pricing on the Account, we create another Data Field on another Meter: `,_jsx(_components.code,{children:`start_seatcount`}),`. This sends a measure of the number of seats registered for the Account at the start of each billing period - in our example, the start of each month. With these two Data Fields in place, we can now add Aggregations to arrive at a pricing metric that accommodates seat count adjustments:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A simple SUM Aggregation targeting the `,_jsx(_components.code,{children:`start_seatcount`}),` Data Field.`]}),`\n`,_jsxs(_components.li,{children:[`A simple SUM Aggregation targeting the `,_jsx(_components.code,{children:`seat_proration`}),` Derived Field.`]}),`\n`,_jsxs(_components.li,{children:[`A Compound Aggregation: `,_jsx(_components.code,{children:`adjusted_seatcount`}),`, that references these two fields and adds them together them using the following calculation:`]}),`\n`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Calculation:`}),` `,_jsx(_components.code,{children:\"(aggregation.start``*_*``seatcount`` ``+ aggregation.seat_proration)\"})]}),`\n`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`We can now use the `,_jsx(_components.code,{children:`adjusted_seatcount`}),` Compound Aggregation to price up Product Plans for those Accounts to which we want to apply seat-based pricing.`]}),`\n`,_jsxs(_components.li,{children:[`In our concrete example, the result of the calculation used for the `,_jsx(_components.code,{children:`adjusted_seatcount`}),` Compound Aggregation will be: 30 - 0.4 = 29.60. Therefore the charges for the Account will be: $10 x 29.60 = $296, which agrees with what we calculated manually.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`In summary, the Derived Field for implementing seat-base pricing calculates a prorated value based on the position of a timestamp (ts) within a month provided by the remove/add usage event.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Working with Meter Derived Fields and Examples","description":null,"href":"/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Referencing Fields in Derived Field Calculations","slug":"referencing-fields-in-derived-field-calculations","depth":2,"children":[{"title":"Referencing Data Fields","slug":"referencing-data-fields","depth":3,"children":[]},{"title":"Referencing Custom Fields","slug":"referencing-custom-fields","depth":3,"children":[]},{"title":"Example - Custom Fields for Accounts","slug":"example-custom-fields-for-accounts","depth":4,"children":[]},{"title":"Format for Referencing Custom Fields","slug":"format-for-referencing-custom-fields","depth":4,"children":[]},{"title":"Referencing Timestamp Fields","slug":"referencing-timestamp-fields","depth":3,"children":[]}]},{"title":"Derived Field Examples","slug":"derived-field-examples","depth":2,"children":[]},{"title":"Example 1 - Gigabytes/second measure","slug":"example-1-gigabytes/second-measure","depth":2,"children":[{"title":"Description and Console Setup","slug":"description-and-console-setup","depth":4,"children":[]},{"title":"Setup using API Call","slug":"setup-using-api-call","depth":4,"children":[]}]},{"title":"Example 2 - Convert GB to MB measure","slug":"example-2-convert-gb-to-mb-measure","depth":2,"children":[]},{"title":"Example 3 - Convert GB and KB to MB measure","slug":"example-3-convert-gb-and-kb-to-mb-measure","depth":2,"children":[]},{"title":"Example 4 - MB-mins measure","slug":"example-4-mb-mins-measure","depth":2,"children":[]},{"title":"Example 5 - String Derived Field Operations","slug":"example-5-string-derived-field-operations","depth":2,"children":[{"title":"Concatenation","slug":"concatenation","depth":4,"children":[]},{"title":"Cast Numeric to String","slug":"cast-numeric-to-string","depth":4,"children":[]}]},{"title":"Example 6 - Derived Fields for Product Add-Ons","slug":"example-6-derived-fields-for-product-add-ons","depth":2,"children":[]},{"title":"Example 7 - Derived Field for Seat-Based Pricing","slug":"example-7-derived-field-for-seat-based-pricing","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"m3ter","siteName":"m3ter Documentation","title":"Working with Meter Derived Fields and Examples - m3ter Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T15:11:25.086Z","originalFileLocation":"guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"m3ter Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Working with Meter Derived Fields and Examples - m3ter Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"m3ter Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://m3ter.mintlify.app/_mintlify/api/og/v2?division=Usage+Data%3A+Meters\u0026amp;title=Working+with+Meter+Derived+Fields+and+Examples\u0026amp;theme=a12cf6d8598fbb808e7ba8a7\u0026amp;signature=729a08d76aaeabc69d8b9a834f7ff008e540c0bf85062bcd9b0abb6aa8c46b21\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Working with Meter Derived Fields and Examples - m3ter Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://m3ter.mintlify.app/_mintlify/api/og/v2?division=Usage+Data%3A+Meters\u0026amp;title=Working+with+Meter+Derived+Fields+and+Examples\u0026amp;theme=a12cf6d8598fbb808e7ba8a7\u0026amp;signature=729a08d76aaeabc69d8b9a834f7ff008e540c0bf85062bcd9b0abb6aa8c46b21\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/m3ter/zwvZvZyvpa8TKV7c/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"m3ter Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4caf4c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.m3ter.com/#organization\",\"name\":\"m3ter Documentation\",\"url\":\"https://docs.m3ter.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/m3ter/t6C65JBQiQOFtjBy/images/m3ter-logo-blue-sf.svg?fit=max\u0026auto=format\u0026n=t6C65JBQiQOFtjBy\u0026q=85\u0026s=3928db28c84ec6950e43caf96e635d80\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.m3ter.com#website\",\"name\":\"m3ter Documentation\",\"url\":\"https://docs.m3ter.com\",\"publisher\":{\"@id\":\"https://docs.m3ter.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#webpage\",\"url\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax\",\"name\":\"Working with Meter Derived Fields and Examples\",\"dateModified\":\"2026-10-30T15:11:25.086Z\",\"isPartOf\":{\"@id\":\"https://docs.m3ter.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.m3ter.com/guides/getting-started/quick-start-worked-example\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Usage Data: Meters\",\"item\":\"https://docs.m3ter.com/guides/usage-data-meters\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Working with Meter Derived Fields and Examples\",\"item\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#article\",\"headline\":\"Working with Meter Derived Fields and Examples\",\"name\":\"Working with Meter Derived Fields and Examples\",\"url\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax\",\"mainEntityOfPage\":{\"@id\":\"https://docs.m3ter.com/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax#webpage\"},\"dateModified\":\"2026-10-30T15:11:25.086Z\",\"publisher\":{\"@id\":\"https://docs.m3ter.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.m3ter.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"m3ter Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"m3ter Documentation","nav":{"global":null,"tabs":[{"tab":"Exploring m3ter","pages":[{"title":"Exploring m3ter","href":""}]},{"tab":"Guides","pages":[{"group":"Guides","pages":[{"group":"Getting Started","root":{"title":"Getting Started","href":"/guides/getting-started"},"expanded":false,"pages":[{"title":"Quick Start","href":"/guides/getting-started/quick-start-worked-example"},{"title":"m3ter Console","href":"/guides/getting-started/working-in-the-m3ter-console"},{"title":"Configuration Workflow","href":"/guides/getting-started/previewing-main-configuration-steps"},{"group":"Worked Examples","expanded":false,"pages":[{"title":"Worked Examples","href":"/guides/getting-started/metering-for-production-worked-examples"},{"title":"Example 1: Cloud Storage and File Cleanup","href":"/guides/getting-started/metering-for-production-worked-examples/worked-example-1-cloud-storage-and-file-cleanup"},{"title":"Example 2: Compound Aggregation for Sign-Up Bonus","href":"/guides/getting-started/metering-for-production-worked-examples/example-2-compound-aggregation-for-sign-up-bonus"},{"title":"Example 3: Segmented Aggregation on Single Meter Usage","href":"/guides/getting-started/metering-for-production-worked-examples/example-3-segmented-aggregation-on-single-meter-usage"}]},{"title":"Dates in m3ter - Quick Reference Starter","href":"/guides/getting-started/working-with-dates-in-m3ter-easy-reference"},{"title":"Feature Release Stages","href":"/guides/getting-started/feature-release-stages"},{"title":"Knowledge Index","href":"/guides/getting-started/knowledge-index"},{"title":"Contacting m3ter Support","href":"/guides/getting-started/contacting-m3ter-support"}]},{"group":"Authentication","root":{"title":"Authentication","href":"/guides/authenticating-with-the-platform"},"expanded":false,"pages":[{"title":"User/Password Authentication","href":"/guides/authenticating-with-the-platform/user-password-authentication"},{"title":"m3ter Single Sign-On","href":"/guides/authenticating-with-the-platform/m3ter-single-sign-on"},{"title":"Service Authentication","href":"/guides/authenticating-with-the-platform/service-authentication"}]},{"group":"Creating, Managing, and Reviewing Products","root":{"title":"Creating, Managing, and Reviewing Products","href":"/guides/creating-and-managing-products"},"expanded":false,"pages":[{"title":"Working with Custom Fields","href":"/guides/creating-and-managing-products/working-with-custom-fields"}]},{"group":"Usage Data: Meters","root":{"title":"Usage Data: Meters","href":"/guides/usage-data-meters"},"expanded":false,"pages":[{"title":"Reviewing Meter Options","mode":"default","href":"/guides/usage-data-meters/reviewing-meter-options"},{"title":"Creating Product Meters","href":"/guides/usage-data-meters/creating-meters"},{"title":"Creating Global Meters","href":"/guides/usage-data-meters/creating-global-meters"},{"title":"Working in Meter Details","description":null,"href":"/guides/usage-data-meters/working-in-meter-details"},{"title":"Working with Meter Derived Fields and Examples","href":"/guides/usage-data-meters/derived-fields-for-meters-examples-and-supported-syntax"}]},{"group":"Pricing Metrics: Aggregations","root":{"title":"Pricing Metrics: Aggregations","description":"Discover how to implement usage-based pricing and billing for your products by defining Aggregations of usage data to use as pricing metrics.","href":"/guides/usage-data-aggregations"},"expanded":false,"pages":[{"title":"Reviewing Aggregation Options","href":"/guides/usage-data-aggregations/reviewing-aggregation-options"},{"title":"Creating Product Aggregations","href":"/guides/usage-data-aggregations/creating-aggregations"},{"title":"Creating Global Aggregations","href":"/guides/usage-data-aggregations/creating-global-aggregations"},{"title":"Compound Aggregations","href":"/guides/usage-data-aggregations/compound-aggregations"},{"title":"Working with Compound Aggregation Calculations","href":"/guides/usage-data-aggregations/compound-aggregation-calculations"},{"title":"Compound Aggregations - Examples","href":"/guides/usage-data-aggregations/compound-aggregations-examples"},{"title":"Segmented Aggregations","href":"/guides/usage-data-aggregations/segmented-aggregations"},{"title":"Custom SQL Aggregations","href":"/guides/usage-data-aggregations/custom-sql-aggregations"},{"title":"Reviewing Aggregation Details","href":"/guides/usage-data-aggregations/reviewing-aggregation-details"}]},{"group":"Recurring Charges: Counters","root":{"title":"Recurring Charges: Counters","href":"/guides/recurring-charges-counters"},"expanded":false,"pages":[{"title":"Creating Counters and Pricing Plans","href":"/guides/recurring-charges-counters/creating-counters"},{"title":"Understanding and Creating Counter Adjustments for Accounts","href":"/guides/recurring-charges-counters/creating-counter-adjustments-for-accounts"},{"title":"Recurring Charges Billing: Seat-Based Pricing","href":"/guides/recurring-charges-counters/reviewing-bills-for-recurring-charges"},{"title":"Recurring Charges Billing: Hybrid Pricing","href":"/guides/recurring-charges-counters/recurring-charges-example-2-hybrid-pricing"}]},{"group":"Plans and Pricing","root":{"title":"Plans and Pricing","href":"/guides/plans-and-pricing"},"expanded":false,"pages":[{"group":"Creating and Working with Plan Templates, Plans, and Plan Groups","root":{"title":"Creating and Working with Plan Templates, Plans, and Plan Groups","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans"},"expanded":false,"pages":[{"title":"Reviewing Options for Plans and Plan Templates","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/reviewing-configuration-options-for-plans-and-plan-templates"},{"title":"Understanding Billing Options for Plan Templates/Plans","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/understanding-billing-options-for-plan-templates-plans"},{"title":"Creating Plan Templates","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/creating-plan-templates"},{"title":"Creating Plans","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/creating-plans"},{"title":"Working in Plan Template and Plan Details","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/working-in-plan-details"},{"title":"Editing and Deleting Plan Templates and Plans","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/editing-plan-templates-and-plans"},{"title":"Working with Plan Groups","href":"/guides/plans-and-pricing/working-with-plan-templates-and-plans/working-with-plan-groups"}]},{"group":"Pricing and Managing Plans and Plan Templates","root":{"title":"Pricing and Managing Plans and Plan Templates","href":"/guides/plans-and-pricing/pricing-plans"},"expanded":false,"pages":[{"title":"Reviewing Pricing Options for Plans and Plan Templates","href":"/guides/plans-and-pricing/pricing-plans/reviewing-pricing-options-and-pricing-plans"},{"title":"Pricing Plans and Plan Templates","href":"/guides/plans-and-pricing/pricing-plans/pricing-plans"},{"title":"Pricing Plans Using Segmented Aggregations","href":"/guides/plans-and-pricing/pricing-plans/pricing-plans-using-segmented-aggregations"},{"title":"Managing and Editing Priced Plans and Plan Templates","href":"/guides/plans-and-pricing/pricing-plans/managing-and-editing-priced-plans-or-plan-templates"},{"title":"Duplicating Priced Plans and Plan Templates","href":"/guides/plans-and-pricing/pricing-plans/duplicating-priced-plans-or-plan-templates"}]}]},{"group":"End-Customer Accounts","root":{"title":"End-Customer Accounts","href":"/guides/end-customer-accounts"},"expanded":false,"pages":[{"title":"Managing Accounts - Best Practices","href":"/guides/end-customer-accounts/managing-accounts-best-practices"},{"title":"Creating and Managing Accounts","href":"/guides/end-customer-accounts/creating-an-account"},{"title":"Attaching Plans to an Account","href":"/guides/end-customer-accounts/attaching-plans-to-an-account"},{"title":"Creating Custom Plans for Accounts","href":"/guides/end-customer-accounts/creating-custom-account-plans"},{"title":"Attaching Plan Groups to an Account","href":"/guides/end-customer-accounts/attaching-plan-groups-to-an-account"},{"title":"Creating Custom Plan Groups for Accounts","href":"/guides/end-customer-accounts/creating-custom-plan-groups-for-accounts"},{"title":"Creating Prepayments for Accounts","href":"/guides/end-customer-accounts/creating-prepayments-for-accounts"},{"group":"Working with Contracts for Accounts","root":{"title":"Working with Contracts for Accounts","href":"/guides/end-customer-accounts/creating-contracts-for-accounts"},"expanded":false,"pages":[{"title":"Creating and Managing Contracts","href":"/guides/end-customer-accounts/creating-contracts-for-accounts/creating-and-managing-contracts"},{"title":"Setting Up Contract Billing","href":"/guides/end-customer-accounts/creating-contracts-for-accounts/setting-up-contract-billing"},{"title":"Reviewing Organization Contracts","href":"/guides/end-customer-accounts/creating-contracts-for-accounts/reviewing-organization-contracts"}]},{"group":"Working with Balances for Accounts","root":{"title":"Working with Balances for Accounts","href":"/guides/end-customer-accounts/creating-balances-for-accounts"},"expanded":false,"pages":[{"title":"Understanding and Managing Billing for Balances","href":"/guides/end-customer-accounts/creating-balances-for-accounts/understanding-billing-for-balances"},{"title":"Creating and Managing Account Balances","href":"/guides/end-customer-accounts/creating-balances-for-accounts/creating-and-managing-account-balances"},{"title":"Creating and Managing Transactions for Balances","href":"/guides/end-customer-accounts/creating-balances-for-accounts/creating-and-managing-transactions-for-balances"},{"title":"Setting Up Transaction Schedules for Balances","href":"/guides/end-customer-accounts/creating-balances-for-accounts/setting-transaction-schedules-for-balances"},{"title":"Creating Charges for Balances","href":"/guides/end-customer-accounts/creating-balances-for-accounts/creating-charges-for-balances"},{"title":"Setting Up Charge Schedules for Balances","href":"/guides/end-customer-accounts/creating-balances-for-accounts/setting-charge-schedules-for-balances"},{"title":"Running and Viewing Bills for Balance Charges","href":"/guides/end-customer-accounts/creating-balances-for-accounts/runnning-viewing-bill-for-balance-charges"},{"title":"Reviewing Account Balances Summary","href":"/guides/end-customer-accounts/creating-balances-for-accounts/reviewing-account-balances-summary"},{"title":"Grants","href":"/guides/end-customer-accounts/creating-balances-for-accounts/balance-grants"}]},{"title":"Creating Charges for Accounts","href":"/guides/end-customer-accounts/creating-charges-for-accounts"},{"title":"Creating Counter Adjustments for Accounts","href":"/guides/end-customer-accounts/creating-counter-adjustments-for-accounts"},{"title":"Submitting Usage Data for an Account","href":"/guides/end-customer-accounts/submitting-usage-data-for-an-account"},{"title":"Working in Account Overview","href":"/guides/end-customer-accounts/working-in-account-overview"},{"title":"Reviewing and Recalculating Bills for an Account","href":"/guides/end-customer-accounts/reviewing-bills-for-an-account"},{"group":"Working with Parent/Child Accounts","root":{"title":"Working with Parent/Child Accounts","href":"/guides/end-customer-accounts/creating-and-working-with-child-accounts"},"expanded":false,"pages":[{"title":"Billing Hierarchy Modes for Parent/Child Accounts","href":"/guides/end-customer-accounts/creating-and-working-with-child-accounts/billing-for-parent-child-accounts"}]},{"title":"End Dating Account Billing Entities","href":"/guides/end-customer-accounts/end-dating-account-billing-entities"},{"title":"Creating and Managing External Mappings for Accounts","href":"/guides/end-customer-accounts/creating-and-managing-external-mappings-for-accounts"}]},{"group":"Billing and Usage Data","root":{"title":"Billing and Usage Data","href":"/guides/billing-and-usage-data"},"expanded":false,"pages":[{"group":"Submitting Usage Data","root":{"title":"Submitting Usage Data","href":"/guides/billing-and-usage-data/submitting-usage-data"},"expanded":false,"pages":[{"title":"API Calls for Data Ingest","href":"/guides/billing-and-usage-data/submitting-usage-data/api-calls-for-data-ingest"},{"title":"File Upload Service API","href":"/guides/billing-and-usage-data/submitting-usage-data/file-upload-service-api"},{"title":"Submitting and Checking Test Usage Data","href":"/guides/billing-and-usage-data/submitting-usage-data/submitting-test-usage-data"},{"title":"File Uploads for Usage Data by Meter","href":"/guides/billing-and-usage-data/submitting-usage-data/file-uploads-for-usage-data-by-meter"},{"title":"Submitting Usage Data Adjustments Using Timestamp","href":"/guides/billing-and-usage-data/submitting-usage-data/submitting-usage-data-adjustments-using-timestamp"},{"title":"Submitting Usage Data for Non-Existent Accounts","href":"/guides/billing-and-usage-data/submitting-usage-data/submitting-usage-data-for-non-existent-accounts"},{"title":"Reviewing and Resolving Ingest Events","href":"/guides/billing-and-usage-data/submitting-usage-data/reviewing-and-resolving-ingest-events"}]},{"group":"Running, Viewing, and Managing Bills","root":{"title":"Running, Viewing, and Managing Bills","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills"},"expanded":false,"pages":[{"title":"Running Bills and Viewing Bill Details","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/running-bills-and-viewing-bill-details"},{"title":"Working with Bills in Bill Management","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/managing-bills"},{"title":"Approving and Locking Bills - Managing Bill Lifecycle","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/approving-and-locking-bills-managing-bill-lifecycle"},{"title":"Adding Credit Line Items to Bills","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/adding-credit-line-items-to-bills"},{"title":"Adding Debit Line Items to Bills","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/adding-debit-line-items-to-bills"},{"title":"Viewing Bill History","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/viewing-bill-history"},{"title":"Scheduling Billing","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/scheduling-billing"},{"title":"Working with Bill Statements","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/working-with-bill-statements"},{"title":"Bill Line Item Types","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/bill-line-item-types"},{"title":"Bill Line Items - Default Descriptions","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/bill-line-items-default-descriptions"},{"title":"Bill Line Items - Mapping to Accounting Products","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/bill-line-items-mapping-accounting-products"},{"title":"Troubleshooting Bills","href":"/guides/billing-and-usage-data/running-viewing-and-managing-bills/troubleshooting-bills"}]}]},{"group":"m3sh","root":{"title":"m3sh","href":"/guides/m3sh-automation"},"expanded":false,"pages":[{"group":"m3sh Workflows","root":{"title":"m3sh Workflows","href":"/guides/m3sh-workflows/m3sh-workflows"},"pages":[{"title":"m3sh Workflows - Key Concepts and Options","href":"/guides/m3sh-workflows/m3sh-workflows-key-concepts-and-options"},{"title":"Exploring m3sh Workflows","href":"/guides/m3sh-automation/exploring-m3sh-workflows"},{"title":"Reviewing m3sh Workflow Runs","href":"/guides/m3sh-automation/reviewing-m3sh-workflow-runs"},{"title":"Getting to Know the Workflow Builder","href":"/guides/m3sh-workflows/getting-to-know-the-workflow-builder"},{"title":"Creating Event Notification Workflows","href":"/guides/m3sh-workflows/creating-event-notification-workflows"},{"title":"Creating Incoming Webhook Workflows","href":"/guides/m3sh-workflows/creating-incoming-webhook-workflows"},{"title":"Working with Global Parameters","href":"/guides/m3sh-workflows/working-with-global-parameters"},{"title":"Utilizing Workflow Managed Templates","href":"/guides/m3sh-workflows/utilizing-workflow-managed-templates"},{"title":"Testing and Troubleshooting Workflows","href":"/guides/m3sh-workflows/testing-and-troubleshooting-workflows"},{"title":"Exporting and Importing Workflows","href":"/guides/m3sh-workflows/exporting-and-importing-workflows"}]},{"group":"Utilizing Events and Notifications","root":{"title":"Utilizing Events and Notifications","href":"/guides/alerts-events-and-notifications/utilizing-events-and-notifications"},"expanded":false,"pages":[{"title":"Key Concepts and Relationships","href":"/guides/alerts-events-and-notifications/utilizing-events-and-notifications/key-concepts-and-relationships"},{"title":"Object Definitions and API Calls","href":"/guides/alerts-events-and-notifications/utilizing-events-and-notifications/object-definitions-and-api-calls"},{"title":"Creating, Managing, and Reviewing Notifications","href":"/guides/alerts-events-and-notifications/utilizing-events-and-notifications/creating-managing-and-reviewing-notifications"},{"title":"Example - Notification Setup for Commitment Updated Event","href":"/guides/alerts-events-and-notifications/utilizing-events-and-notifications/example-1-commitment-updated-event"},{"title":"Working with Scheduled Events","href":"/guides/alerts-events-and-notifications/utilizing-events-and-notifications/working-with-scheduled-events"}]},{"group":"Creating and Managing Credentials","root":{"title":"Creating and Managing Credentials","href":"/guides/integrations/setting-up-integrations/managing-integration-credentials"},"expanded":false,"pages":[{"title":"Creating Stripe Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-stripe-integration-credentials"},{"title":"Creating NetSuite Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-netsuite-integration-credentials"},{"title":"Creating Paddle Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-paddle-integration-credentials"},{"title":"Creating Chargebee Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-chargebee-integration-credentials"},{"title":"Creating QuickBooks Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-quickbooks-integration-credentials"},{"title":"Creating Xero Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-xero-integration-credentials"},{"title":"Creating Salesforce Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-salesforce-integration-credentials"},{"title":"Creating AWS Marketplace Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-aws-marketplace-integration-credentials"},{"title":"Creating Azure Marketplace Integration Credentials","href":"/guides/integrations/setting-up-integrations/_managing-integration-credentials-legacy/creating-azure-marketplace-integration-credentials"}]},{"group":"Integrations","root":{"title":"Integrations","href":"/guides/integrations"},"expanded":false,"pages":[{"title":"m3ter Integrations - Overview","sidebarTitle":"m3ter Integrations","href":"/guides/integrations/m3ter-integrations"},{"group":"Setting Up and Managing Integrations","root":{"title":"Setting Up and Managing Integrations","href":"/guides/integrations/setting-up-integrations"},"expanded":false,"pages":[{"title":"Creating and Managing Integrations","href":"/guides/integrations/setting-up-integrations/creating-and-managing-integration-configurations"},{"title":"Configuring Stripe Integrations","href":"/guides/integrations/setting-up-integrations/configuring-stripe-integrations"},{"title":"Configuring NetSuite Integrations","href":"/guides/integrations/setting-up-integrations/configuring-netsuite-integrations"},{"title":"Configuring Paddle Integrations","href":"/guides/integrations/setting-up-integrations/configuring-paddle-integrations"},{"title":"Configuring Chargebee Integrations","href":"/guides/integrations/setting-up-integrations/configuring-chargebee-integrations"},{"title":"Configuring QuickBooks Integrations","href":"/guides/integrations/setting-up-integrations/configuring-quickbooks-integrations"},{"title":"Configuring Xero Integrations","href":"/guides/integrations/setting-up-integrations/configuring-xero-integrations"},{"title":"Configuring Salesforce Entity Data Sync Integrations","href":"/guides/integrations/setting-up-integrations/configuring-sf-entity-data-integrations"},{"title":"Configuring AWS Marketplace Integrations","href":"/guides/integrations/setting-up-integrations/configuring-aws-integrations"},{"title":"AWS Marketplace Integrations - Reconciliation Features","href":"/guides/integrations/setting-up-integrations/aws-marketplace-integrations-reconciliation-features"},{"title":"Configuring Azure Marketplace Integrations","href":"/guides/integrations/setting-up-integrations/configuring-azure-marketplace-integrations"},{"title":"Azure Marketplace Integrations - Reconciliation Features","href":"/guides/integrations/setting-up-integrations/azure-marketplace-integrations-reconciliation-features"},{"title":"Managing Multiple Third Party Destinations for Integrations","href":"/guides/integrations/setting-up-integrations/managing-multiple-destinations-for-integrations"},{"title":"Reviewing Integration Run Details","href":"/guides/integrations/setting-up-integrations/reviewing-integration-run-details"}]}]},{"title":"Creating and Managing Outgoing Webhooks","href":"/guides/integrations/setting-up-integrations/creating-and-managing-destinations"},{"title":"Reviewing and Resolving Integration Events","href":"/guides/integrations/setting-up-integrations/reviewing-and-resolving-integration-events"},{"title":"Creating and Managing External Mappings","href":"/guides/integrations/setting-up-integrations/creating-and-managing-external-mappings"},{"title":"Creating and Managing Transformations","href":"/guides/m3sh-workflows/creating-and-managing-transformations"}]},{"group":"m3ter APIs","root":{"title":"m3ter APIs","href":"/guides/m3ter-apis"},"expanded":false,"pages":[{"title":"Config API Limits","href":"/guides/m3ter-apis/config-api-limits"},{"title":"Ingest API Limits and Optimizing Measurement Submissions","href":"/guides/m3ter-apis/ingest-api-limits"},{"title":"WAF Rules for HTTP Requests","href":"/guides/m3ter-apis/waf-rules-for-http-requests"},{"title":"Getting Started with API Calls","href":"/guides/m3ter-apis/getting-started-with-api-calls"},{"title":"HTTP Error Codes","href":"/guides/m3ter-apis/http-error-codes"}]},{"title":"m3ter Calculation Engine","href":"/guides/m3ter-calculation-engine"},{"group":"Lookup Tables","root":{"title":"Lookup Tables (Beta)","href":"/guides/lookup-tables"},"tag":"Beta","expanded":false,"pages":[{"title":"Creating and Managing Lookup Tables","href":"/guides/lookup-tables/creating-and-managing-lookup-tables"},{"title":"Adding Data to, Publishing, and Managing Lookup Table Revisions","href":"/guides/lookup-tables/adding-data-to-and-publishing-table-revisions"},{"title":"Worked Example - Variable Usage Discounting","href":"/guides/lookup-tables/worked-example-variable-usage-discounting"},{"title":"Worked Example - Variable Usage Discounting by Account","href":"/guides/lookup-tables/worked-example-variable-usage-discouting-by-account"},{"title":"Lookup Functions","href":"/guides/lookup-tables/lookup-functions"}]},{"title":"System Alerts","href":"/guides/alerts-events-and-notifications/viewing-and-managing-alerts"},{"group":"Organization and Access Management","root":{"title":"Organization and Access Management","href":"/guides/organization-and-access-management"},"expanded":false,"pages":[{"group":"Managing your Organization","root":{"title":"Managing your Organization","href":"/guides/organization-and-access-management/viewing-and-editing-organization"},"expanded":false,"pages":[{"title":"Viewing and Editing Organization Configuration","href":"/guides/organization-and-access-management/viewing-and-editing-organization/viewing-and-editing-organization-configuration"},{"title":"Timezone Settings - Notes and Recommendations","href":"/guides/organization-and-access-management/viewing-and-editing-organization/timezone-settings-notes-and-recommendations"},{"title":"Creating and Managing Currencies","href":"/guides/organization-and-access-management/viewing-and-editing-organization/creating-and-managing-currencies"},{"title":"Creating Credit Reasons","href":"/guides/organization-and-access-management/viewing-and-editing-organization/creating-credit-reasons"},{"title":"Creating Debit Reasons","href":"/guides/organization-and-access-management/viewing-and-editing-organization/creating-debit-reasons"},{"title":"Creating Transaction Types","href":"/guides/organization-and-access-management/viewing-and-editing-organization/creating-transaction-types"},{"title":"Adding and Editing Custom Fields","href":"/guides/organization-and-access-management/viewing-and-editing-organization/adding-and-editing-custom-fields"}]},{"title":"Understanding, Creating, and Managing Permission Policies","href":"/guides/organization-and-access-management/creating-and-managing-permissions"},{"group":"Managing Access and Users","root":{"title":"Managing Access and Users","href":"/guides/organization-and-access-management/managing-users"},"expanded":false,"pages":[{"title":"Managing Users and Assigning Permission Policies","href":"/guides/organization-and-access-management/managing-users/managing-users-and-assigning-permission-policies"},{"title":"Creating and Configuring Service Users","href":"/guides/organization-and-access-management/managing-users/creating-and-configuring-service-users"},{"title":"Creating and Managing User Groups","href":"/guides/organization-and-access-management/managing-users/creating-and-managing-user-groups"},{"title":"Inviting Users to Organization","href":"/guides/organization-and-access-management/managing-users/inviting-users-to-organization"},{"title":"Tracking User Activity in Organization","href":"/guides/organization-and-access-management/managing-users/tracking-user-activity-in-organization"},{"title":"Granting m3ter Support Access to Organization","href":"/guides/organization-and-access-management/managing-users/granting-m3ter-support-access-to-organization"},{"title":"Viewing and Managing Permission Policies","href":"/guides/organization-and-access-management/managing-users/viewing-and-managing-permission-policies"}]}]},{"group":"m3ter Connector for Salesforce","root":{"title":"m3ter Connector for Salesforce","href":"/guides/m3ter-connector-for-salesforce"},"expanded":false,"pages":[{"title":"Overview - Functional Scope and Limitations","href":"/guides/m3ter-connector-for-salesforce/overview-functional-scope-and-limitations"},{"title":"Configuring the m3ter Connector for Salesforce","href":"/guides/m3ter-connector-for-salesforce/configuring-m3ter-salesforce-connector"},{"title":"Reviewing and Managing Metadata Mappings","href":"/guides/m3ter-connector-for-salesforce/reviewing-and-managing-metadata-mappings"},{"title":"Creating Custom Metadata Mappings","href":"/guides/m3ter-connector-for-salesforce/creating-metadata-mappings"},{"title":"Testing Sync Setup from Salesforce to m3ter","href":"/guides/m3ter-connector-for-salesforce/testing-sync-setup-from-salesforce-to-m3ter"},{"title":"Setting Up and Using Sync to m3ter Invocable Action","href":"/guides/m3ter-connector-for-salesforce/setting-up-invocable-action-for-event-driven-sync"},{"title":"Setting Up Sync for End Dating m3ter Account Billing Entities","href":"/guides/m3ter-connector-for-salesforce/setting-up-sync-for-end-dating-m3ter-account-billing-entities"},{"title":"Enabling Two-Way Automated Sync for m3ter Objects","href":"/guides/m3ter-connector-for-salesforce/enabling-two-way-automated-sync-for-m3ter-objects"},{"title":"Mapping Custom Fields on m3ter Entities","href":"/guides/m3ter-connector-for-salesforce/mapping-custom-fields-on-m3ter-entities"},{"title":"Mapping Segment Attributes for Pricing","href":"/guides/m3ter-connector-for-salesforce/mapping-segment-attributes-for-pricing"},{"title":"Setting Up m3sh Webhook Triggers","href":"/guides/m3ter-connector-for-salesforce/setting-up-m3sh-webhook-triggers"},{"title":"CRUD for Metering Entities","href":"/guides/m3ter-connector-for-salesforce/crud-for-metering-entities"},{"title":"Usage Design Targets","href":"/guides/m3ter-connector-for-salesforce/usage-design-targets"},{"title":"Generic m3ter API Invocable Action","href":"/guides/m3ter-connector-for-salesforce/generic-m3ter-api-invocable-action"},{"title":"Product Mapping Resolution","href":"/guides/m3ter-connector-for-salesforce/product-mapping-resolution"},{"title":"Checking Sync Logs and Troubleshooting","href":"/guides/m3ter-connector-for-salesforce/checking-sync-logs-and-troubleshooting"},{"group":"m3ter Connector - Sample Mappings","root":{"title":"m3ter Connector - Sample Mappings","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings"},"expanded":false,"pages":[{"title":"Sample Mappings 1 - Account","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mapping-1-account"},{"title":"Sample Mappings 2 - Commitment","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mappings-2-commitment"},{"title":"Sample Mappings 3 - Contract","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mappings-3-contract"},{"title":"Sample Mappings 4 - AccountPlan","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mappings-4-accountplan"},{"title":"Sample Mappings 5 - Plan","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mappings-5-plan"},{"title":"Sample Mappings 6 - Pricing","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mappings-6-pricing"},{"title":"Sample Mappings 7 - Pricing Bands","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings/sample-mappings-7-pricing-bands"}]},{"title":"m3ter Connector for Salesforce - Changelog","href":"/guides/m3ter-connector-for-salesforce/m3ter-connector-for-salesforce-changelog"}]},{"group":"Data Explorers","root":{"title":"Data Explorers","href":"/guides/data-explorer"},"expanded":false,"pages":[{"title":"Usage Data Explorer","href":"/guides/data-explorer/performing-usage-queries-and-reviewing-results"},{"title":"Usage Data Explorer (v2)","href":"/guides/data-explorer/usage-data-explorer-v2"},{"title":"Billing Data Explorer","href":"/guides/data-explorer/performing-billing-queries-and-reviewing-results"},{"title":"Prepayments Data Explorer","href":"/guides/data-explorer/performing-commitments-queries-and-reviewing-results"},{"title":"Data Explorers: Saving, Updating, and Re-Using Queries","href":"/guides/data-explorer/saving-queries"},{"title":"Data Explorers: Exporting Query Results","href":"/guides/data-explorer/exporting-usage-query-results"}]},{"group":"Data Exports","root":{"title":"Data Exports (Preview)","href":"/guides/data-exports"},"tag":"Preview","expanded":false,"pages":[{"title":"Creating and Managing Export Destinations","href":"/guides/data-exports/creating-data-export-destinations"},{"group":"Creating Usage Data Export Schedules","root":{"title":"Creating Usage Data Export Schedules","href":"/guides/data-exports/creating-export-schedules"},"expanded":false,"pages":[{"title":"Creating Legacy Usage Data Export Schedules","href":"/guides/data-exports/creating-export-schedules/creating-legacy-usage-export-schedules"}]},{"title":"Creating Operational Data Export Schedules","href":"/guides/data-exports/creating-operational-data-export-schedules"},{"title":"Reviewing and Managing Export Schedules","href":"/guides/data-exports/reviewing-and-managing-export-schedules"},{"group":"Running Ad-Hoc Usage Data Exports","root":{"title":"Running Ad-Hoc Usage Data Exports","href":"/guides/data-exports/running-ad-hoc-data-exports"},"expanded":false,"pages":[{"title":"Running Ad-Hoc Legacy Usage Data Exports","href":"/guides/data-exports/running-ad-hoc-data-exports/running-ad-hoc-legacy-data-exports"}]},{"title":"Running Ad-Hoc Operational Data Exports","href":"/guides/data-exports/running-ad-hoc-operational-data-exports"},{"title":"Downloading Data Export Files Locally","href":"/guides/data-exports/downloading-data-export-files-locally"},{"title":"Reviewing Export Jobs","href":"/guides/data-exports/reviewing-export-jobs"},{"title":"Data Export - Entity Schema and Relationship Diagram","href":"/guides/data-exports/data-export-object-relationship-diagram"}]}]}]},{"tab":"Glossary","pages":[{"title":"Glossary","href":"/glossary-of-terms"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/introduction"}]},{"tab":"m3sh Function Reference","pages":[{"title":"m3sh Function Reference","href":"/m3sh-function-reference/m3ter/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Working with Meter Derived Fields and Examples - m3ter Documentation","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-eHyQ0tlO.js","lightbox-handle-r17bVUz3.js"]}