# Migration Record Mapping Tools

The Record Mapping Rule tool is used to create rules telling CopyStorm/Restore how to map between records in the CopyStorm backup to records in the target Salesforce. This is very useful for migration in mapping Salesforce users and a variety of core Salesforce configuration records.

For example:

* Mapping Salesforce Users by their email address.
* Map Record Types based on record type (where the names are not the same in CopyStorm and the target Salesforce).

CopyStorm/Restore includes default mapping rules for a few common tables. However, these rules do nothing by default because no specific mappings are supplied.

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-98291453dbdd21a5c83cf368ac07118c709d13c9%2Fc98443ea-MigrationRecordMappingPicture1.png?alt=media)

Additional tables can be added by clicking on the “Add Record Mapping Rule…” button at the bottom of the tool.

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-c27eeabf83dc40730c519f288e6045641025f9be%2F6168f2a4-MigrationRecordMappingPicture2.png?alt=media)

To add or modify the mappings for a specific table, click on the “Edit” button next to its name. A dialog will appear showing existing mappings allow them to be edited or removed and allowing additional mappings to be imported from a CSV file.

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-8ab9c3757f920b8ea282147e443a549337a45ba0%2F6865e929-MigrationRecordMappingPicture3.png?alt=media)

When the *Save Changes* button is clicked, CopyStorm/Restore will validate the mapping rules looking for entries that are missing in either the CopyStorm database or in Salesforce. Though missing entries will be silently ignore during the restore process, cleaning them up is almost always the right choice.

![](https://2924009365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5FyPmqVkPxhj2oT8fbgB%2Fuploads%2Fgit-blob-432f2881f265e0be6e69df9722a6f1494c18436f%2Fd69d9c29-MigrationRecordMappingPicture4.png?alt=media)

## Built in Mapping Rules

In addition to mapping rules provided on the Migration Setup tab, CopyStorm/Restore will always map records using a handful of built-in mapping rules. Mappings on the Migration Setup tab will override the default mappings.

| Object       | Mapping Rule                                                                                                                                                                                                    |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| User         | Field matching on Email                                                                                                                                                                                         |
| Profile      | Field matching on Name                                                                                                                                                                                          |
| UserRole     | Field matching on Name                                                                                                                                                                                          |
| Group        | Field matching on DeveloperName and Type                                                                                                                                                                        |
| RecordType   | Field matching on Name and SObjectType                                                                                                                                                                          |
| Pricebook2   | First map the Standard Pricebook in CopyStorm to the Standard Pricebook in Salesforce, then use field matching on Name                                                                                          |
| Organization | If the CopyStorm database contains 1 Organization, map it to the current User’s Organization. If this does not map, the CopyStorm database contains conflicting information from multiple Salesforce instances. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/copystorm-restore/reference/migration-setup-tab/migration-record-mapping-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
