The m3ter platform supports the creation of custom fields for the majority of its core configuration entities in the form of key/value pairs using string or number values. This capability to store data on entities in a free-hand way can prove very useful in fulfilling a wide range of operational business use cases.
The m3ter Connector for Salesforce managed package supports the mapping of custom fields from your Salesforce Org on m3ter entities.
This topic explains how to enable and work with the mapping custom fields on m3ter entities feature:
Important!
Check Version. The mapping custom fields on m3ter entities feature is only available in version 0.8 and above of the m3ter Connector for Salesforce managed package. See m3ter Connector for Salesforce - Changelog for details on how to check your current installed version.
Scope. The mapping custom fields on m3ter entities feature is currently only supported for the Account and Contract m3ter entities.
Working with Custom Fields in m3ter. If you enable and use the mapping custom fields on m3ter entities feature in your Salesforce Connector managed package, note that the values of the custom fields created on individual m3ter entities will only be available for use in Meter Derived Field or Compound Aggregation calculations if you also create custom fields with the same name for those entities with default values at Organization-level. See Working with Custom Fields for more details.
The mapping of custom fields on m3ter entities 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 "Custom Fields". 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.
To enable mapping for objects:
1. In your Salesforce Org, navigate to the m3ter Admin app.
2. Under Setup, select the Custom fields tab:
3. Use the Enable Custom Fields? switch to turn the feature on.
Once the feature is enabled, a set of accordions is displayed with each accordion representing a CMDT type that has the new ‘Custom Fields’ attribute:
Notes:
By default, the mapping custom fields feature is disabled.
For v0.8, the mapping custom fields feature is limited to Account and Contract Metadata Types.
Important! When you enable the mapping custom fields feature, a banner advises that how the application updates this metadata record is unlike almost any other mechanism we would use to update records in Salesforce, because we are dealing with Custom Metadata Types. For more information, please see the Security Considerations page in the Salesforce Apex Developer Guide.
When you have enabled the mapping custom fields feature, you can expand the accordion for the CMDT type you want to add a custom field to for mapping into the corresponding m3ter object:
For a given Metadata Type that has the field ‘Custom Fields’ - the backend will pre-populate the possible options that could be selected in the Field / Value - a drop-down list of valid SFDC field options is shown. This is based on the Salesforce Object that the Metadata Type is referencing:
Here's an example of how the Custom Field mapping is saved on CMDT record:
The following then highlights the custom field being dynamically added to the mapped data:
The custom field is then subsequently mapped into the corresponding m3ter entity under Account metadata:
Support for hardcoded values. The Field Value can accept a ‘hardcoded’ value, however these are currently not sent to m3ter by default.
The workaround would be to create a custom field on the SFDC object with the hardcoded value (that is, Formula field or something similar) then map that field.
Custom field deletion. Custom field definitions that are removed from the mapping after being synced will result in the data being deleted from m3ter if the record is synced again without the previous definitions of the custom field.
Null value fields. Where a mapped custom field does not have a value - that is, the value in SFDC is null - the custom field will not be sent to m3ter and the the custom field will not be displayed on the sync pane.
Login to the Support portal for additional help and to send questions to our Support team.