Migrating SRR config between orgs

Use this SFDX plugin for seamless migration of SRR data

Last published at: 2024-08-01 08:15:41 UTC

Many companies use change processes that involve making changes on Sandbox or Dev orgs for testing and QA before pushing the changes to production. However as SRR config is held in Salesforce object records, it isn't possible to use Change Sets to manage the changes.

Instead, the settings have to be either created manually or exported/imported. This article describes the use of an SFDX plugin that enables one-command migration of all SRR config data from one org to another.

Pre-requisite: SFDX

SFDX is a set of tools and environments for development in Salesforce. It is typically employed as a set of plugins in Visual Studio Code, and setup of this is outside the scope of this guide. However there are many resources detailing how to set up Visual Studio Code and SFDX:
Trailhead: Setting up Visual Studio Code
Trailhead: App Development with Salesforce DX

Salesforce Data Move Utility (SFDMU)

If you use SFDX then using SFDMU to migrate your SRR config will be simple.
See the full readme for more information here, or just dive right in by issuing this command to install SFDMU:

1 $ sf plugins install sfdmu

After SFDMU has installed, all you need are three things to do your SRR migration:

  1. The source org username
  2. The target org username
  3. The export.json file that contains all the SRR objects that need migrating (provided below)
1 {
2 "objects": [
3 {
4 "query": "select Id, leadassist__Active__c, leadassist__Sales_Cadence__c, leadassist__AdjustCapacityDuringBulkTransactions__c, leadassist__Assignment_Field__c, leadassist__Check_Existing_Records__c, leadassist__Custom_Email_Template__c, leadassist__Custom_MatchRule_Logic__c, leadassist__Description__c, Name, leadassist__Advanced_MatchRule_Logic__c, leadassist__Object_Type__c, leadassist__Operational_Mode__c, OwnerId, leadassist__Priority__c, leadassist__Queue_User__c, leadassist__Rejects_User__c, leadassist__Update_Fields_On_Assignment__c from leadassist__MatchGroup__c",
5 "operation": "Upsert",
6 "externalId": “”
7 },
8 {
9 "query": "select Id, leadassist__Active__c, leadassist__CaseSensitive__c, leadassist__LookupField__c, leadassist__MatchGroup__c, leadassist__MatchField__c, leadassist__Object_Type__c, leadassist__MatchingValueXL__c, Name, leadassist__NOT__c, leadassist__Notes__c, leadassist__Object__c, leadassist__Operator__c, leadassist__Rule_Number_Value__c from leadassist__MatchRule__c",
10 "operation": "Upsert",
11 "externalId": “”
12 },
13 {
14 "query": "select Id, leadassist__Active__c, Name, leadassist__CapacityThreshold__c, leadassist__CC_Email_Address__c, leadassist__Distribution_Ratio__c, leadassist__Do_Not_Assign_When_Calendar_Busy__c, leadassist__Do_Not_Assign_When_Omni_Away__c, leadassist__Do_Not_Assign_When_OOO__c, leadassist__MatchGroup__c, leadassist__Send_Email_Notifications__c,leadassist__Send_SMS_Notifications__c,leadassist__SMS_Email__c, leadassist__User__c from leadassist__Assignee__c",
15 "operation": "Upsert",
16 "externalId": “”
17 },
18 {
19 "query": "select Id, leadassist__CapacityModel__c, leadassist__MatchGroup__c, Name from leadassist__MatchGroupCapacityModel__c",
20 "operation": "Upsert",
21 "externalId": “”
22 },
23 {
24 "query": "select Id, leadassist__Assignment_Field__c, Name, leadassist__Criteria_Logic__c, leadassist__Description__c, leadassist__Object_Type__c from leadassist__CapacityModel__c",
25 "operation": "Upsert",
26 "externalId": “”
27 },
28 {
29 "query": "select Id, leadassist__CapacityModel__c, Name, leadassist__Criteria_Logic_Number__c, leadassist__Date_Keyword__c, leadassist__Date_Keyword_Number__c, leadassist__Field__c, leadassist__FieldType__c, leadassist__Operator__c, leadassist__Value__c from leadassist__CapacityModelCriteria__c",
30 "operation": "Upsert",
31 "externalId": “”
32 },
33 {
34 "query": "select Id, leadassist__SLA__c, leadassist__MatchGroup__c, Name, leadassist__SLA_Minutes__c from leadassist__MatchGroup_SLA__c",
35 "operation": "Upsert",
36 "externalId": “”
37 },
38 {
39 "query": "select Id, leadassist__Reassign_If_SLA_Missed__c, Name, leadassist__Criteria_Logic__c, leadassist__SLA_Minutes__c, leadassist__Object_Type__c from leadassist__SLA__c",
40 "operation": "Upsert",
41 "externalId": “”
42 },
43 {
44 "query": "select Id, Name, leadassist__Criteria_Logic_Number__c, leadassist__Date_Keyword__c, leadassist__Date_Keyword_Number__c, leadassist__Field__c, leadassist__FieldType__c, leadassist__Operator__c, leadassist__SLA__c, leadassist__Value__c from leadassist__SLACriteria__c",
45 "operation": "Upsert",
46 "externalId": “”
47 },
48 {
49 "query": "select Id, leadassist__Active__c, leadassist__Assignee__c, leadassist__Friday_End_Time__c, leadassist__Friday_Start_Time__c, leadassist__Monday_End_Time__c, leadassist__Monday_Start_Time__c, leadassist__Saturday_End_Time__c, leadassist__Saturday_Start_Time__c, leadassist__Sunday_End_Time__c, leadassist__Sunday_Start_Time__c, leadassist__Thursday_End_Time__c, leadassist__Thursday_Start_Time__c, leadassist__Tuesday_End_Time__c, leadassist__Tuesday_Start_Time__c, leadassist__Wednesday_End_Time__c, leadassist__Wednesday_Start_Time__c from leadassist__AssigneeWorkingHours__c",
50 "operation": "Upsert",
51 "externalId": “”
52 }
53 ]
54}

Copy the above and save it into a file called export.json - you can save it into the root of your sfdx project.

The source org and the target org have to already be authorised (connected) in SFDX (they normally will be if you are using SFDX).

Then to perform the migration, simply issue this command:

1 % sf sfdmu run --sourceusername source@example.com --targetusername target@example.com

SFDMU will then use the export.json file to migrate all the SRR records from your source org to your target org.

Note: only config is migrated - it does not migrate MatchLogs.