# Connecting and Syncing Salesforce Orgs

The **Deployment** screen is best viewed when the zoom setting is set to **80%** on your Chrome/Firefox browser.

### About Salesforce org synchronization <a href="#about-salesforce-org-synchronization" id="about-salesforce-org-synchronization"></a>

The org synchronization provides a mechanism to export single data, or all content items, from a source to a target Salesforce org effortlessly, thereby establishing consistency among data.

When you move changes from a source org to a production org, the [metadata](https://www.autorabit.com/blog/6-benefits-of-restoring-your-metadata-in-salesforce-after-an-outage/) types would be the same. But when you make changes in the production org, there would be an inconsistency between the source org and production org. Org synchronization helps you compare the differences between the metadata types, so you can add or delete metadata types and ensure that both the orgs are in sync.

### How can I connect and sync metadata between two Salesforce orgs? <a href="#how-can-i-connect-and-sync-metadata-between-two-salesforce-orgs" id="how-can-i-connect-and-sync-metadata-between-two-salesforce-orgs"></a>

To perform org synchronization, follow the below steps:

1. Log in to your ARM account.
2. Click on the **`Deployment`** tile on the left side of the screen.
3. Go to the **`Org Synchronization History`** tab.
4. Click on the **`Get Org Differences`** call-to-action button.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FqP09NddIGVvnOUif42uq%2Fimage.png?alt=media&#x26;token=0ba2a5fa-0b01-43bb-bf98-4369744973c3" alt=""><figcaption></figcaption></figure>

5. In the **`Org Differences`** dialog box, you will need to:

   * Give the process a **`Name`**.
   * Select your **`Source Org`** and **`Destination Org`**.
   * Select the **`Exclude baseline Managed Package changes`** checkbox if you do not wish to include baseline Managed Package changes during org sync.
   * Select the **`Generate Member Differences`** checkbox to view the metadata member's differences between two Salesforce orgs based on file/data level comparison.
   * Specify the **`Batch size for Profile Components`** and the **`Batch size for other Components`** to retrieve records. So, the default size for the profile is **500**, and for other components is **2000**. You can modify it as per your requirement. The bulk retrieve option helps run large jobs that exceed normal processing limits – you can deploy up to **10000 files** at once or a maximum size of **14Mb**. Using batch size, you can process records in batches to stay within platform limits. If you have a lot of records, processing records through batches is the best option.

   To go to the next screen, click the **`Get Differences`** button. The next screen may take some time, depending on the number of components in your org.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FezusGCxpOlYUVcoPbArV%2Fimage.png?alt=media&#x26;token=ae018024-aca5-4b9e-a7b0-51e63e8bc0fd" alt="" width="436"><figcaption></figcaption></figure>

6. On the next screen, you can:

   * view the metadata list included in both source and target org
   * add or delete metadata components to/from the target org
   * view the metadata member's difference report (if any)

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FKyMMdlitZ2FSiKcfxRc7%2Fimage.png?alt=media&#x26;token=779c5a26-6518-4dec-8043-aee34c242561" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FlZGRJ2kDSJo4nvDCuO2M%2Fimage.png?alt=media&#x26;token=30e60f6f-15cb-4003-b9b2-ebb07153f2e7" alt=""><figcaption></figcaption></figure>
7. Once done with your selection, click on **`Synchronize Orgs`**.
8. On the next screen, check the **`Validate Deployment`** checkbox to verify whether the synchronization process will be successful or get failed. This is optional.
9. Select the **`Apex Test Level`** to validate your deployment. For detailed information on each apex test level, refer to the article: [Apex Unit Tests](https://knowledgebase.autorabit.com/~/revisions/Sxgg9jAjbkdELNi4g1n4/product-guides/arm/arm-features/deployment/apex-unit-tests)

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2Fo5ziA5itZMO23vCBz2Av%2Fimage.png?alt=media&#x26;token=61d9f448-3ab4-474e-ad7c-b04068ea2373" alt="" width="516"><figcaption></figcaption></figure>

10. Click on **`Deploy`**.
11. You'll be navigated to the [**`Deployment History`**](https://knowledgebase.autorabit.com/~/revisions/Sxgg9jAjbkdELNi4g1n4/product-guides/arm/arm-features/deployment/monitor-deployments) page, where the current synchronization progress can be seen.

#### More information on the Org Synchronization Summary page <a href="#more-information-on-the-org-synchronization-summary-page" id="more-information-on-the-org-synchronization-summary-page"></a>

Synchronization summary information such as label name, source org, destination org, and so on.. can be seen on the **`Org Synchronization History`** page.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FTsWKcLowH7zxxlth2H9g%2Fimage.png?alt=media&#x26;token=57481119-4b3d-4694-9c6c-0bd1c0985e93" alt=""><figcaption></figcaption></figure>

1. **`Info:`** Click the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FCQPi9F7V4Pz56LdaLcOk%2Fimage.png?alt=media\&token=2ccf2118-8d10-450c-a1fb-c1189e832fa9)icon to view the detailed synchronization report.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FNyj3qghhb8w6zfglxJMd%2Fimage.png?alt=media&#x26;token=94bc6870-4ebd-4fa5-bd63-c28b7c99521a" alt="" width="503"><figcaption></figcaption></figure>

2. **`Delete:`** Click on the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FHah9OifMb1ZPhuwE46w7%2Fimage.png?alt=media\&token=f9af6ea3-ae2d-4119-8c88-cbf47032c6e8)icon to delete a sync process. A confirmation message is displayed asking whether you want to delete the label. This process cannot be undone.
3. **`Schedule:`** Click the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FbIjB4FTGlLKXO62hZa77%2Fimage.png?alt=media\&token=1e38b27d-f24f-4d99-bc81-2f3ebac944f9)icon to set up when you want to carry out the org synchronization process. On the scheduled date and time, the org synchronization process runs automatically, and voila, you have a repeating schedule.
4. **`Run:`** Click the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FBDUjjRqCX2aHYo8qPqPb%2Fimage.png?alt=media\&token=2b8d0905-1a36-4e6b-9aa0-94604a01d153)icon to rerun the org synchronization process.
5. **`Status:`**&#x53;tatus of the synchronization process, i.e., successful or failed.

   * **Log Report:** Click on the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FCnfy0U1iy5wnwgZ8qoF0%2Fimage.png?alt=media\&token=e2cc3044-1d1b-4105-bcd1-4f8481e43cdb)icon under the **`Status`** column to view the log report for the sync process.

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FHadcIOxkUOABwEdq6cmy%2Fimage.png?alt=media&#x26;token=e2ccd3d8-7c28-431c-9719-186bfdc71244" alt="" width="563"><figcaption></figcaption></figure>
6. **`Report:`**&#x54;here are two options in this column.

   * Click on the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F5u3KmWHxo3CFFIY7rSCQ%2Fimage.png?alt=media\&token=3ab82e12-3a3b-4b72-b2de-2e7f3a5d68d2)icon to view the metadata components difference report between the source and the target org.
   * Click on the![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FpYhIOOFtSIZv8eVtKXQI%2Fimage.png?alt=media\&token=2d9fd628-2a7b-4894-8fad-22095022af69)icon to download the Diff report in your local system (in PDF or CSV format).

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F2U8gQgBRBknxfdMHqF9k%2Fimage.png?alt=media&#x26;token=40876afe-2f02-429f-825b-59a614709816" alt=""><figcaption></figcaption></figure>
