Skip to main content

Migrating Records between Countries

The InCountry Data Residency for Salesforce package supports the migration of records between countries.

The package supports two scenarios for data migration:

  1. Migration of a record from one country to another on the InCountry platform.

  2. Removal of the record from the InCountry platform in a specific country and its migration to Salesforce along with its protected fields.

Prerequisites

  1. Migration of records works only at the record restriction level.

  2. At the record restriction level, you need to have multiple countries registered.

  3. For each country, you need to have a dedicated endpoint registered in the package.

InCountry Sync Schedule

Migrating a record from one country to another

note

This functionality is supported in the legacy package and in the three-model package for all models.

note

When you want to migrate a record between countries, please avoid modifying other fields within this record. After changing the field storing the country where the record is retained, the package initiates the migration process. All other values that you change within the same edit operation will not be applied. Please modify the record’s values only after completion of the cross-country record migration.

  1. Open the record that you want to migrate between countries.

  2. Locate the field which regulates the country where the record is stored.

  3. Click the pencil icon to edit this field.

    Record - country field

  4. In the field, enter the country to which the record is migrated.

    Record - country field changed

  5. Click Save.

    Record migration form - between

  6. The package will prompt you to confirm the migration of the record. Click Change country.

  7. The record migration starts. Wait for a while as migration may take some time.

    Record migration form - in progress

  8. Upon the successful migration, you will see a screen similar to the following one.

    Record migration form - completed

  9. To close the Record migration form, click OK.

The record with regulated data will be migrated from the source country to the destination country.

During migration, the record goes through the following stages:

  • Record validation: Apex Code checks the input parameters, validates the current record policy, checks the new record policy, and if everything is fine initiates the migration between countries.

  • Find Record in InCountry: a record is checked on the InCountry platform in the country where it is currently stored.

  • Write to InCountry: a record is being written to the InCountry platform in the destination country.

  • Delete from InCountry: a record is deleted from the country where it was initially stored only after the successful migration to the destination country.

  • Migrated: the successful response is received from the Apex Code side.

Restoring the record in Salesforce and deleting it from the InCountry platform

note

This functionality is supported in the three-model package for all models.

note

This scenario will be executed automatically in the following situations:

  • You enter the country which is not registered at the record restriction level.

  • You clear the country in the field which regulates the country for record retention.

  1. Open the record that you want to delete from the InCountry platform and restore it in Salesforce.

  2. Locate the field which regulates the country where the record is stored.

  3. Click the pencil icon to edit the field.

    Record - country field 2

  4. In the field, enter the country to which the record is migrated or clear the field.

    Record - country field changed 2

  5. Click Save.

    Record migration form - back

  6. The package will prompt you to confirm the removal of the record. Click Change country.

  7. The record migration starts. Wait for a while as it may take some time.

    Record migration form - in progress 2

  8. Upon the successful removal from the InCountry platform and record recovery in Salesforce, you will see a screen similar to the following one.

    Record migration form - in progress 2

  9. To close the form, click OK.

Regulated data of the record will be restored in Salesforce.

During migration, the record goes through the following stages:

  • Record validation: Apex Code checks the input parameters, validates the current record policy, checks the new record policy, and if everything is fine initiates the migration between countries.

  • Find Record in InCountry: a record is checked on the InCountry platform in the country where it is currently stored.

  • Delete from InCountry: a record is deleted from the InCountry platform in the country where it was initially stored.

  • Restore in Salesforce: all the values in protected fields are restored in Salesforce on the basis of values stored on the InCountry platform.

  • Migrated: the successful response is received from the Apex Code side.

Migrating multiple records

  1. On the list view, select multiple records.

  2. Update the field that regulates the country where the record is stored.

  3. Follow the steps described above.

Record migration bulk