Skip to content

Commit

Permalink
fix: Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
hknokh2 committed Apr 22, 2024
1 parent 26f103e commit d302cd3
Showing 1 changed file with 55 additions and 19 deletions.
74 changes: 55 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@
[![License](https://img.shields.io/npm/l/sfdmu.svg)](https://github.com/forcedotcom/SFDX-Data-Move-Utility/blob/master/LICENSE.txt)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

The Salesforce Data Move Utility (SFDMU) is an advanced SFDX plugin crafted to streamline data migration within various Salesforce environments, including scratch, development, sandbox, and production orgs. It facilitates the migration from other orgs or from CSV files, efficiently managing various data operations and supporting the migration of multiple related sObjects in a single run.
The Salesforce Data Move Utility (SFDMU) is an advanced SFDX plugin designed to streamline data migration within various Salesforce environments, including scratch, development, sandbox, and production orgs. It supports migration from other orgs or CSV files, efficiently managing various data operations and enabling the migration of multiple related sObjects in a single run.

**Useful Resources:**
- [**SFDMU GUI Application:**](https://github.com/forcedotcom/SFDX-Data-Move-Utility-Desktop-App) Download and easily configure migration jobs.
- [**SFDMU Help Center:**](https://help.sfdmu.com/) Access detailed documentation.
- [**User Support Policy:**](https://help.sfdmu.com/full-documentation/additional-information/support_policy) Understand support guidelines before opening cases.
- [**Contribution Policy:**](https://help.sfdmu.com/full-documentation/additional-information/code_contribution_policy) Guidelines for contributing to the SFDMU project.
- [**SFDMU GUI Application:**](https://github.com/forcedotcom/SFDX-Data-Move-Utility-Desktop-App) Download and configure migration jobs easily.
- [**SFDMU Help Center:**](https://help.sfdmu.com/) Access comprehensive documentation.
- [**User Support Policy:**](https://help.sfdmu.com/full-documentation/additional-information/support_policy) Review support guidelines before opening cases.
- [**Contribution Policy:**](https://help.sfdmu.com/full-documentation/additional-information/code_contribution_policy) Learn how to contribute to the SFDMU project.

## Key Features:
- **Comprehensive Migration Support:** Facilitates direct Org-to-Org data migration, avoiding the need for CSV intermediates, and fully supports CRUD operations: Insert, Upsert, Update, Delete.
- **Comprehensive Migration Support:** Enables direct Org-to-Org data migration, eliminating the need for CSV intermediates, and supports CRUD operations: Insert, Upsert, Update, Delete.
- **Multiple Objects and Relationships:** Manages migrations involving multiple object sets and handles complex relationships, including [circular references](https://help.sfdmu.com/examples/basic-examples#example-1-handling-circular-references).
- **Ease of Use:** Simplifies the configuration process using a [single export.json file](https://help.sfdmu.com/full-configuration).
- **Ease of Use:** Simplifies the configuration process with a [single export.json file](https://help.sfdmu.com/full-configuration).
- **Secure and Local:** Ensures data security as all operations are performed locally without cloud interactions.
- **High Performance:** Optimizes processing by focusing on necessary data subsets.
- **Extended Functionality:** Offers advanced features such as [custom field mapping](https://help.sfdmu.com/full-documentation/advanced-features/fields-mapping), [data anonymization](https://help.sfdmu.com/full-documentation/advanced-features/data-anonymization), and supports [composite external ID keys](https://help.sfdmu.com/full-documentation/advanced-features/composite-external-id-keys).
- **Extended Functionality:** Provides advanced features such as [custom field mapping](https://help.sfdmu.com/full-documentation/advanced-features/fields-mapping), [data anonymization](https://help.sfdmu.com/full-documentation/advanced-features/data-anonymization), and supports [composite external ID keys](https://help.sfdmu.com/full-documentation/advanced-features/composite-external-id-keys) among others.

## Installation Instructions:
1. **Prepare Environment:** Install the Salesforce CLI as per the [official instructions](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm).
1. **Prepare Environment:** Install the Salesforce CLI following the [official instructions](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm).
2. **Plugin Installation:**

```bash
# Uninstall old version, if any:
$ sf plugins uninstall sfdmu
Expand All @@ -36,37 +37,72 @@ The Salesforce Data Move Utility (SFDMU) is an advanced SFDX plugin crafted to s
```

## Detailed Setup for Developers:
For those needing customization or access to the source:
For developers needing customization or access to the source:
```bash
# Clone the repository:
$ git clone https://github.com/forcedotcom/SFDX-Data-Move-Utility

# Navigate to the directory and link it:
$ cd SFDX-Data-Move-Utility
$ npm install
$ sf plugins link
```

**Watch the Demo:**
- Experience the plugin in action [here](https://www.youtube.com/watch?v=KI_1vD93prA).

## Migration Configuration:
For setting up a migration job, create an `export.json` file with specific data models and operations as detailed in the [full export.json format guide](https://help.sfdmu.com/full-documentation/configuration-and-running/full-exportjson-format).

## Running the Migration Job:
Set up a migration job by creating an `export.json` file with specific data models and operations, as detailed in the [Full export.json Format Guide](https://help.sfdmu.com/full-configuration).

Here is a basic `export.json` example for upserting Accounts and their related Contacts, assuming unique Name for Accounts and unique LastName for Contacts across source and target orgs:

```json
{
"objects": [
{
"operation": "Upsert", // Specifies the type of operation: "Update", "Upsert", "Insert", "Delete", etc., as detailed in the full documentation.
"externalId": "LastName", // The unique identifier for Contacts, used for upsert operations.
"query": "SELECT FirstName, LastName, AccountId FROM Contact", // Defines the fields to transfer from the source to the target during the migration.
"master": false // Ensures that SFDMU only processes Contact records related to the specified Accounts.
},
{
"operation": "Upsert", // Specifies the type of operation for Accounts.
"externalId": "Name", // The unique identifier for Accounts, used for upsert operations.
"query": "SELECT Name, Phone FROM Account WHERE Name = 'John Smith'" // Selects specific Accounts by Name for the operation.
}
]
}
```

## Migration Execution:

Execute migrations using commands tailored to your source and target, whether they are Salesforce orgs or CSV files:

```bash
$ sf sfdmu run --sourceusername source@name.com --targetusername target@name.com
# Migrate data from one Salesforce org to another
$ sf sfdmu run --sourceusername source.org.username@name.com --targetusername target.org.username@name.com

# Export data from a Salesforce org to CSV files
$ sf sfdmu run --sourceusername source.org.username@name.com --targetusername csvfile

# Import data from CSV files to a Salesforce org
$ sf sfdmu run --sourceusername csvfile --targetusername target.org.username@name.com
```
For CSV data interactions, modify the usernames as required for your specific scenario.

Note: When importing or exporting from/to CSV files, ensure the files are located in the directory containing the `export.json` file. The files should be named according to the API name of the respective sObject, such as `Account.csv`, `Contact.csv`.

**Watch the Demo:**

- Experience the plugin in action [here](https://www.youtube.com/watch?v=KI_1vD93prA).

**Documentation Links:**
- [**Getting Started**](https://help.sfdmu.com/get-started)
- [**Installation Guide**](https://help.sfdmu.com/installation)
- [**Configuration Tips**](https://help.sfdmu.com/configuration)
- [**How to Run Migrations**](https://help.sfdmu.com/running)

- [**Debugging Steps**](https://help.sfdmu.com/debugging)
- [**Detailed export.json Format**](https://help.sfdmu.com/full-configuration)

**Note:** If you encounter permission issues on MacOS, prepend your commands with `sudo`. Adjust CLI command syntax if using the older SFDX CLI platform.
**Notes:**

- If you encounter permission issues on MacOS, prepend your commands with `sudo`. Adjust CLI command syntax if using the older SFDX CLI platform.
- To allow SFDMU to connect to your source and target orgs, ensure you have established a local connection to these orgs using the standard `sf org login web` commands, as detailed in the [Authorize an Org Using a Browser](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm) documentation.

0 comments on commit d302cd3

Please sign in to comment.