> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reviewing and Managing Metadata Mappings

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:

* [Reviewing and Editing Custom Metadata Types](/guides/m3ter-connector-for-salesforce/reviewing-and-managing-metadata-mappings#reviewing-and-editing-custom-metadata-types)
* [Working with Custom Metadata Types - Notes and Tips](/guides/m3ter-connector-for-salesforce/reviewing-and-managing-metadata-mappings#working-with-custom-metadata-types-notes-and-tips)

<Warning>
  **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](/guides/m3ter-connector-for-salesforce/creating-metadata-mappings).
  * **Installed Seeded Mappings?** Secondly, ***you must not remove*** the mappings installed with the m3ter Connector.
</Warning>

<Tip>
  **Tip: Sample Mappings?** You can review sample mappings for use with the Connector in the [m3ter Connector - Sample Mappings](/guides/m3ter-connector-for-salesforce/m3ter-connector-sample-mappings) section.
</Tip>

## Reviewing and Editing Custom Metadata Types

This section explains how to review and edit the Custom Metadata Types installed in your Salesforce org for the m3ter Connector.

<Tip>
  **Note:** The [following section](/guides/m3ter-connector-for-salesforce/reviewing-and-managing-metadata-mappings#working-with-custom-metadata-types-notes-and-tips) offers some notes and tips designed to help you when working with Custom Metadata Types.
</Tip>

**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:

<img src="https://mintcdn.com/m3ter/r3D0c1hhAuooaNQf/images/1729091210-salesforce32a.png?fit=max&auto=format&n=r3D0c1hhAuooaNQf&q=85&s=9d98a1d7855f4eb7bf47a0584414d8e2" alt="" style={{ maxWidth: 'min(750px, 100%)' }} width="1231" height="753" data-path="images/1729091210-salesforce32a.png" />

* 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:

<img src="https://mintcdn.com/m3ter/r3D0c1hhAuooaNQf/images/1729091889-salesforce34a.png?fit=max&auto=format&n=r3D0c1hhAuooaNQf&q=85&s=209b88b7af5b8ec242f665cf26198bf9" alt="" style={{ maxWidth: 'min(600px, 100%)' }} width="738" height="300" data-path="images/1729091889-salesforce34a.png" />

* The page for the selected type opens:

<img src="https://mintcdn.com/m3ter/r3D0c1hhAuooaNQf/images/1729092087-salesforce35a.png?fit=max&auto=format&n=r3D0c1hhAuooaNQf&q=85&s=63f0941647a8507241e35db6313f7bab" alt="" style={{ maxWidth: 'min(700px, 100%)' }} width="1149" height="302" data-path="images/1729092087-salesforce35a.png" />

* 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:

<img src="https://mintcdn.com/m3ter/r3D0c1hhAuooaNQf/images/1729092323-salesforce36a.png?fit=max&auto=format&n=r3D0c1hhAuooaNQf&q=85&s=f423a0a387a0d4b48c858ed6e2670400" alt="" style={{ maxWidth: 'min(650px, 100%)' }} width="1152" height="597" data-path="images/1729092323-salesforce36a.png" />

* 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**

<Tip>
  **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](mailto: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`.
</Tip>

6. If you want to edit the mappings definition, select **Edit**. The page adjusts:

<Warning>
  **Warning!** If you want to change the object source - in this example the **AccountObject** - please create a new custom metadata mapping.
</Warning>

<img src="https://mintcdn.com/m3ter/r3D0c1hhAuooaNQf/images/1729093368-salesforce37a.png?fit=max&auto=format&n=r3D0c1hhAuooaNQf&q=85&s=adf526903ee29a77101fe46c55e75941" alt="" style={{ maxWidth: 'min(650px, 100%)' }} width="1148" height="663" data-path="images/1729093368-salesforce37a.png" />

* 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**:

<img src="https://mintcdn.com/m3ter/daiiRMWPVUZ0w-iK/images/1716545069-salesforce38.png?fit=max&auto=format&n=daiiRMWPVUZ0w-iK&q=85&s=038ab60874a36de7dede7dee5c1da610" alt="" style={{ maxWidth: 'min(700px, 100%)' }} width="1151" height="440" data-path="images/1716545069-salesforce38.png" />

* Editable items are listed.

7. If you have made any changes, select **Save**.

## Working with Custom Metadata Types - Notes and Tips

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.

### Typographical Note

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.

### Setting Up Relationship Mappings

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.

#### Example 1

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1719582304-salesforce47.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=0dd558584f8f231c720dbe2848130ad5" alt="" style={{ maxWidth: 'min(700px, 100%)' }} width="850" height="480" data-path="images/1719582304-salesforce47.png" />

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.

#### Example 2

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**

<Tip>
  **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**
</Tip>

### Understanding Salesforce Suffixes

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.

#### Examples

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**
