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

# Salesforce

> The Salesforce Org Management tab is available for Salesforce type projects. This page helps to compare the changes, review, and commit the changes to

The **Salesforce** **Org Management** tab is available for Salesforce type projects. This page helps to compare the changes, review, and commit the changes to your Source Control System.

> [!NOTE]
>
> Check [Salesforce Tutorial](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-tutorials/salesforce-tutorial.md) to configure and start using FlexDeploy for Salesforce deployments.

![SF-11.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910437.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=d986d1dcbbf9b9bc3ad9e153b8ca9faf)

To manage Salesforce Orgs, view changes, and commit to Git, click on the **Salesforce Org Management** tab within your project.

This tab can be used to compare as following and view changes:

> [!NOTE]
>
> ### Prerequisites
>
> Make sure the following items are completed before using this screen:
>
> 1. Configure a Salesforce Account to connect to your Org in [Cloud Accounts](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-users-guide/integrations/cloud-account-and-provider.md).
>
> 2. Select the Salesforce Cloud Account(s) in the [Target](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-users-guide/topology/target-groups/target-endpoints-and-properties.md) properties for the Build target group.
>
> 3. Complete the SCM, General, and Properties configurations on the [Project Configuration](https://docs.flexagon.com/flexdeploy-10-0-documentation/flexdeploy-users-guide/projects/general-project-configuration/project-source-control.md) tab.
>
> 4. Whitelist/allow the required [domains](https://help.salesforce.com/s/articleView?id=sf.setup_domains.htm\&type=5)/[IP addresses](https://help.salesforce.com/s/articleView?id=000321501\&type=1) in your firewall configuration.

# Initiating a Comparison

### Compare from Popup

The Configure Package XML popup can be launched by clicking the left side of the **Compare** button on the **Salesforce** tab. This popup will retrieve all files in the selected Salesforce Org(s) and allow you to choose a specific set of objects to compare. Files can be filtered and selected to control what needs to be pulled from Salesforce and include in the package. Verify the package contents by toggling the Show XML button from the bottom of the popup. Enable the **Include Profiles and Permission Sets** option on the bottom of the popup to identify all associated changes in Profiles and Permissions in the selected files and include them in the comparison results.

![image-20250312-143939.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910416.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=7ae95e85cf1f7c50d6531df961950ab9)

### Compare by Type

Select the down arrow on the Compare button, then the **Object Type** option, to initiate a comparison of all objects matching the selected type(s) in your Salesforce Org. Check the Compare Multiple Object Types option to initiate a comparison for more than one file type in a single comparison.

![image-20260113-174711.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910440.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=b2a379dd513364fbc30278fd92e9f827)

### Full Compare

Select the down arrow on the Compare button, then the **Full Compare** option to initiate a comparison of all objects in your branch (SCM to Org), Salesforce Org (Org to Org), or Package (Package to Org) against the selected Salesforce Org.

# SCM to Org Compare

This option will help you identify the changes done in your Salesforce Org by comparing the files against your source control systems like Git. You can view the line-by-line difference of the files, and review and commit the changes to your source control system. 

![SF-3.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910443.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=1714fe5c797a71189e95c73e1c0876f5)

1. Open the **SCM to Org** tab

2. Select your SCM branch. It defaults to the main branch from the Project’s configuration.

3. Select the Salesforce Org.

4. Click **Compare** to view all the files available in the org. Select the files that you want to compare.

   1. Click the downward arrow on the **Compare** button, then the **Object Type** option to select and quickly compare based on object type(s) like Apex Class, Custom Object, etc.

   2. Optionally, you can click on **Full Compare** button that is available from the drop-down arrow to compare all the files in your org.

The results table shows all the files that were added or modified in your Salesforce Org.

![SF-4.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910434.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=2be06391c4be38a74bd3a41eddb3475a)

Clicking on the downward arrow icon displays the file content. If the file is modified, it displays both the file that is in the Git repo and the file that is in the Salesforce Org/Sandbox. It also highlights the diff between the two file copies for easy review.

![SF-5.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910431.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=68fcd8554b3e2e9e452c5027a74820aa)

## Commit Files to SCM

### Commit All

You can select **Commit All** to easily commit all changes from this compare into your configured Git repository. This will open a popup where you can select the branch and enter the commit message. Optionally, you can select a new or existing Package in your Project to add the files to a Package after committing them.

![c869aa66-46dd-4a67-b5a5-374bafe2e9ef.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910446.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=4b5741a6c8140b660ccd85c36818c7f6)

### Commit Selected Files

To commit a subset of the files from the comparison, you can select individual files and click on **Commit** to review the changes and commit the selected files into your configured Git repository.

![image-20260114-164257.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910449.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=43245bb685c680190d8a48a0f73b4f9d)

Clicking **Commit** will open a popup where you can enter commit details, optionally add the selected files to a new or existing Package, and choose exactly what changes should be committed.

Select the **Files To Commit** tab to choose what changes to stage/unstage. All changes are staged initially. Entire files can be staged/unstaged by clicking the +/- icons on the file rows. For modified files, select a portion of code in the right diff editor and right click to stage or unstage lines in the selected code block. Added files cannot be partially staged. Use the up and down arrows above the code editor to easily navigate through all the changes in the file.

![image-20260114-203929.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910461.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=6795bf03161935ebf5878fac4f741171)

# Salesforce Org to Salesforce Org Compare

This option will help you to compare changes between two Salesforce Orgs. You can view the list of files that are different (added, modified, or deleted), and review the line-by-line differences. 

![SF-8.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910419.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=5a5ea856abdb9191a12a5ab2705b7c11)

1. Open the **Org to Org** tab

2. Select the Source Org to compare

3. Select the Target Org to compare

4. Click **Compare** to view all files in both orgs and select a subset of files to compare.

   1. Click the downward arrow on the **Compare** button, then the **Object Type** option to select and quickly compare based on object type(s) like Apex Class, Custom Object, etc.

   2. Optionally, you can click on **Full Compare** button that is available from the drop-down arrow to compare all the files in your orgs.

5. The results table will display all the files that are different between the two orgs (added, modified, or deleted). From here, you can select files, add them to a Package, and build and deploy them to either org.

![image-20260114-165553.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910452.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=f3d13b278598a646bdef560797510b6a)

# Package to Salesforce Org Compare

This option will help you to identify the changes done in your Salesforce Org by comparing against the current files in a Package or a Package version. You can review the line-by-line difference of the resulting files. This option can be used to view the changes that will be applied to your target Salesforce Org before deploying or approving the deployment.

![SF-9.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910422.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=914500821a56e390a302400f7d36db4f)

1. Open the **Package to Org** tab

2. Select the **Package Name**. If you don't see the package in the list, go to the Packages tab and create one as needed.

3. Select a **Package Version** or **Latest Source** to compare with the latest files in a branch within your Source Control System.

4. Select the Salesforce Org to compare.

5. Optionally, click **Compare** to view and select a subset of files within the Package to compare. Click the downward arrow on the Compare button and select **Full Compare** to compare all files within your Package.

6. The results table will display all the files that are different (added or modified).

![image-20260114-175323.png](https://mintcdn.com/flexagon-llc-ce77a95c/NkeZh5D-Nf8j_WaD/images/fd111/12590910458.png?fit=max\&auto=format\&n=NkeZh5D-Nf8j_WaD\&q=85\&s=5e5490bbbe284c5e6480272aa4be823b)
