When you install the m3ter Connector managed package into your Salesforce org, a set of Custom Metadata Types are included. Custom Metadata Types:
Are a key part of the package and define mappings that control which fields on Salesforce data objects are synced with which fields on counterpart m3ter data objects.
Act as starter or standard preconfigured mapping definitions for known Salesforce objects, such as Opportunities.
In your Salesforce org, you can review the Custom Metadata Types installed for the m3ter Connector. You might also want to edit these metadata types to ensure the sync actions you perform maps Salesforce objects and fields into m3ter objects and fields in a way that meets your specific business process requirements.
This topic explains how to review and manage the m3ter Connector standard Custom Metadata Types in your Salesforce org. A notes and tips section is also included, which we hope will help you when working with Custom Metadata Types:
Important!
Other Custom Metadata Types? The Custom Metadata Types installed with the m3ter Connector for Salesforce package can be used for syncing Salesforce Opportunities with your m3ter Organization. However, if you want to sync other Salesforce objects and fields to m3ter, then you must create new Custom Metadata Types to suit your specific Sales process. See Creating Custom Metadata Mappings.
Installed Seeded Mappings? Secondly, you must not remove the mappings installed with the m3ter Connector.
Tip: Sample Mappings? You can review sample mappings for use with the Connector in the m3ter Connector - Sample Mappings section.
This section explains how to review and edit the Custom Metadata Types installed in your Salesforce org for the m3ter Connector.
Note: The following section offers some notes and tips designed to help you when working with Custom Metadata Types.
To review and edit Custom Metadata Types:
1. At top-right, select the gear icon and on the drop-down menu, select Setup. The SETUP>Home pages opens.
2. In the Quick Find field at top-left, start to type "metadata" - the SETUP navigation list is filtered and you'll see Custom Code>Custom Metadata Types returned.
3. Select Custom Metadata Types in the SETUP list. The Custom Metadata Types page opens:
The m3ter Connector metadata types are listed with Namespace Prefix as m3.
4. To review the mappings defined by one of the Custom Metadata Types, select the Manage Records link for the type:
The page for the selected type opens:
In this example, we've opened the AccountMappings Custom Metadata Type, and in the m3ter Connector package this type contains a single mappings definition called New Account Mapping
5. Select the Label link of the specific mappings definition you want to review. The Detail page opens:
The Mappings section shows which Salesforce Account fields are mapped into which m3ter Account fields for a sync action that creates a new Account, such as:
m3ter Account AddressLine1 < syncs to > Salesforce BillingStreet
m3ter Account Region < syncs to > Salesforce BillingState
m3ter Account PostCode < syncs to > Salesforce BillingPostalCode
Note: Using hardcoded for Mappings?
In this example of a managed set of mappings shipped with the Connector, there is an emailAddress
field on the m3ter side, and for this an actual value has been entered (example@example.com). This means that the hardcoded
entry must define the field (or fields) where instead of mapping by identifying a field on the Salesforce side, we want to be able to enter an actual value in this way, and therefore we enter emailAddress
for hardcoded
.
If there are multiple fields used in this way for mapping, then enter a comma-separated list for hardcoded
- for example: emailAddress
,locality
,adddressLine2
.
6. If you want to edit the mappings definition, select Edit. The page adjusts:
Warning! If you want to change the object source - in this example the AccountObject - please create a new custom metadata mapping.
You can now edit the mappings definition and change which Salesforce Account object fields are mapped to the m3ter Account object fields.
Note the warning that because this is a managed package not all mapping attributes are editable - to view more details, select Display More Information:
Editable items are listed.
7. If you have made any changes, select Save.
This section offers guidance on working with Custom Metadata Types to set up the precise sync of Salesforce objects and fields with m3ter objects and fields.
Please note that Salesforce typographical conventions require the use of double-underscore characters:
For example, single-underscore: _c is not valid as a suffix and double-underscore: __c must be used.
Here are some pointers to note when creating relationships to mapped objects and fields.
You can always optionally prefix with the current object (custom or standard) name.
If the field you want is on the current object, you don't need a relationship (__r).
If the field you want is on a related object, you have to use the standard Salesforce Object Query Language (SOQL) relationship rules, such as:
someLookupField__r.someOtherField
The following examples illustrate how relationship mappings are set up.
When mapping the accountMapping_m3Id:
When the AccountPlanObject = SBQQ__Subscription__c the account field (accountMapping_m3Id ) relationship is related to the Contract object which is the SBQQ__Contract__r.Account field.
When mapping the accountPlan from Salesforce CPQ using the Quotes objects:
The related accountMapping_m3Id field is SBQQ__Account__r
You don't need to reference the quote because that's the object you are on but the account field in this case is the relationship:
SBQQ__Quote__c.SBQQ__Account__r == correct
Note: The SBQQ__Quote__c part is optional here. Omitting it won't break the relationship, however it may be easier to understand the relationship when left as SBQQ__Quote__c.SBQQ__Account__r
How are suffixes on custom objects and fields used in Salesforce? That is, those objects and fields suffixed with __c or __r in Salesforce:
The __c suffix is used for Custom objects and fields. For example: Custom_Object__c.
Used for referencing custom objects in Apex or visualforce pages, formula fields and so on internally.
This suffix is automatically added to the API name of the custom object/field by Salesforce upon creation.
The __r suffix is used is for Custom objects reference. For example: Custom_Field__r.
Used for referencing a custom lookup or master-detail relationship name in Apex or visualforce page, formula field, and so on.
When used as a suffix, __r refers to the object being referenced via the lookup or master-detail in order to help you 'get' or 'navigate' to the parent from a child or vice versa. This allows you to reference a different field on the linked object.
This is required Salesforce Object Query Language (SOQL) syntax when referencing fields in a lookup relationship.
Standard lookups/master-details do not have this suffix, but can still be referenced in a similar fashion.
The standard object Opportunity has a standard lookup to the Account and Contract objects. Fields on these objects can be referenced by:
Account.Type
This is the apiname of the lookup field on the Opportunity, and the apiname of the desired field on the account.
We now need to reference a custom field on this account:
Account.CustomField__c
Let’s say we add a second Account lookup to Opportunity. This second lookup field has the API name CustomAccount__c
We now need to reference the type of this second account:
CustomAccount__r.Type
We now need to reference a custom field on this second account:
CustomAccount__r.CustomField__c
Let’s say we’re querying from the Salesforce CPQ Quote object:
This has an API name of SBQQ__Quote__c
We want to get the account type for the account associated to this Quote. We are querying from the Quote object.
SBQQ__Quote__c.SBQQ__Account__r.Type
Login to the Support portal for additional help and to send questions to our Support team.