Mapping Segment Attributes for Pricing - m3ter Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

The m3ter platform supports Segmented Aggregations, which allow you to segment the usage data collected by a single Meter. Segmented Aggregations are very useful for implementing certain pricing and billing use cases because you can then apply a different pricing to each of the defined segments. The m3ter Connector for Salesforce managed package supports the mapping of Segment Attributes from your Salesforce Org onto m3ter pricing set up for Segmented Aggregations. This topic explains how to enable and work with the mapping segment attributes on pricing feature:

Important!

Overview

The mapping of segment attributes on m3ter pricing feature is built on top of the existing custom metadata framework developed for the m3ter Connector. A new attribute added to the Custom Metadata Types (CMDT) framework supports a “Segments Field” in the PricingMapping_mdt and is designed to reference fields from the PricingObject specified in the metadata definition. This attribute is a Long Text Area and is used to store a JSON representation of key/value pairs that the user defines. Once this data is on the CMDT, the Sync Orchestration logic can make use of these fields and include them in the payload sent to m3ter.

Enabling Mapping Segment Attributes

To enable mapping of segment attributes:

  1. In your Salesforce Org, navigate to the m3ter Admin app.
  2. Under Setup, select the Segments tab:
  1. Expand NewPricing on the Segments tab:

  2. Use the NewPricing panel to define segment attributes that should be sent to m3ter. This configuration set up includes selecting a Salesforce SFDC Field to serve as the source for the attribute’s value:

Notes and Limitations

Field Reference Constraints

The available fields for segment values are constrained by the PricingObject defined in the PricingMapping__mdt record.

PricingObject Context

The PricingObject field - for example OpportunityLineItem in the following screenshot - determines which of the object’s fields can be referenced:

Field Accessibility

Reference Syntax

The format follows these additional rules:

Support for Wildcards

In m3ter, when defining pricing for Segmented Aggregations, you can use wildcards to apply default pricing to unspecified segment combinations. This is achieved by omitting certain fields in the segment object of your API request. In the m3ter Connector for SalesForce, no extra logic with respect to wildcards is needed. The Connector should be acting as a passthru and let the m3ter platform handle wildcards in segments - see Segmented Aggregations - m3ter Documentation for details.