@salesforce/plugin-omnistudio-migration-tool 2.0.0-rc.6 → 2.0.0-rc.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +165 -73
- package/lib/commands/omnistudio/migration/assess.d.ts +23 -15
- package/lib/commands/omnistudio/migration/assess.js +250 -89
- package/lib/commands/omnistudio/migration/assess.js.map +1 -1
- package/lib/commands/omnistudio/migration/clean.d.ts +13 -0
- package/lib/commands/omnistudio/migration/clean.js +162 -0
- package/lib/commands/omnistudio/migration/clean.js.map +1 -0
- package/lib/commands/omnistudio/migration/info.d.ts +10 -16
- package/lib/commands/omnistudio/migration/info.js +53 -35
- package/lib/commands/omnistudio/migration/info.js.map +1 -1
- package/lib/commands/omnistudio/migration/migrate.d.ts +78 -18
- package/lib/commands/omnistudio/migration/migrate.js +461 -175
- package/lib/commands/omnistudio/migration/migrate.js.map +1 -1
- package/lib/error/deploymentErrors.d.ts +15 -0
- package/lib/error/deploymentErrors.js +35 -0
- package/lib/error/deploymentErrors.js.map +1 -0
- package/lib/error/errorInterfaces.d.ts +5 -0
- package/lib/error/errorInterfaces.js +9 -1
- package/lib/error/errorInterfaces.js.map +1 -1
- package/lib/javascripts/reportGeneratorUtility.js +585 -22
- package/lib/migration/ApexNamespaceRegistry.d.ts +49 -0
- package/lib/migration/ApexNamespaceRegistry.js +130 -0
- package/lib/migration/ApexNamespaceRegistry.js.map +1 -0
- package/lib/migration/CustomCssRegistry.d.ts +117 -0
- package/lib/migration/CustomCssRegistry.js +234 -0
- package/lib/migration/CustomCssRegistry.js.map +1 -0
- package/lib/migration/NameMappingRegistry.d.ts +134 -0
- package/lib/migration/NameMappingRegistry.js +411 -0
- package/lib/migration/NameMappingRegistry.js.map +1 -0
- package/lib/migration/base.d.ts +8 -6
- package/lib/migration/base.js +25 -8
- package/lib/migration/base.js.map +1 -1
- package/lib/migration/customLabels.d.ts +70 -0
- package/lib/migration/customLabels.js +177 -0
- package/lib/migration/customLabels.js.map +1 -0
- package/lib/migration/dataraptor.d.ts +13 -0
- package/lib/migration/dataraptor.js +205 -80
- package/lib/migration/dataraptor.js.map +1 -1
- package/lib/migration/deployer.d.ts +14 -0
- package/lib/migration/deployer.js +105 -0
- package/lib/migration/deployer.js.map +1 -0
- package/lib/migration/flexcard.d.ts +256 -6
- package/lib/migration/flexcard.js +1808 -268
- package/lib/migration/flexcard.js.map +1 -1
- package/lib/migration/globalautonumber.d.ts +8 -8
- package/lib/migration/globalautonumber.js +49 -24
- package/lib/migration/globalautonumber.js.map +1 -1
- package/lib/migration/interfaces.d.ts +14 -0
- package/lib/migration/interfaces.js.map +1 -1
- package/lib/migration/metadataobjnamecheck.js.map +1 -1
- package/lib/migration/omniscript.d.ts +218 -4
- package/lib/migration/omniscript.js +1709 -247
- package/lib/migration/omniscript.js.map +1 -1
- package/lib/migration/omniscriptInstance.d.ts +90 -0
- package/lib/migration/omniscriptInstance.js +755 -0
- package/lib/migration/omniscriptInstance.js.map +1 -0
- package/lib/migration/postMigrate.d.ts +20 -4
- package/lib/migration/postMigrate.js +199 -12
- package/lib/migration/postMigrate.js.map +1 -1
- package/lib/migration/premigrate.d.ts +51 -0
- package/lib/migration/premigrate.js +325 -0
- package/lib/migration/premigrate.js.map +1 -0
- package/lib/migration/related/ApexMigration.d.ts +3 -0
- package/lib/migration/related/ApexMigration.js +222 -56
- package/lib/migration/related/ApexMigration.js.map +1 -1
- package/lib/migration/related/ExperienceSiteMigration.d.ts +30 -5
- package/lib/migration/related/ExperienceSiteMigration.js +263 -73
- package/lib/migration/related/ExperienceSiteMigration.js.map +1 -1
- package/lib/migration/related/FlexipageMigration.d.ts +5 -5
- package/lib/migration/related/FlexipageMigration.js +60 -38
- package/lib/migration/related/FlexipageMigration.js.map +1 -1
- package/lib/migration/related/LwcMigration.js +45 -26
- package/lib/migration/related/LwcMigration.js.map +1 -1
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js +48 -32
- package/lib/migration/related/OmnistudioRelatedObjectMigrationFacade.js.map +1 -1
- package/lib/styles/reportGenerator.css +241 -16
- package/lib/templates/assessmentReport.template +78 -8
- package/lib/templates/dashboard.template +86 -57
- package/lib/templates/migrationReport.template +151 -0
- package/lib/utils/OmnistudioSettingsPrefManager.d.ts +14 -0
- package/lib/utils/OmnistudioSettingsPrefManager.js +112 -0
- package/lib/utils/OmnistudioSettingsPrefManager.js.map +1 -0
- package/lib/utils/XMLUtil.js +2 -1
- package/lib/utils/XMLUtil.js.map +1 -1
- package/lib/utils/apex/executor/AnonymousApexRunner.d.ts +1 -1
- package/lib/utils/apex/parser/apexparser.d.ts +8 -1
- package/lib/utils/apex/parser/apexparser.js +79 -13
- package/lib/utils/apex/parser/apexparser.js.map +1 -1
- package/lib/utils/config/ExistingRecordCleanupService.d.ts +30 -0
- package/lib/utils/config/ExistingRecordCleanupService.js +266 -0
- package/lib/utils/config/ExistingRecordCleanupService.js.map +1 -0
- package/lib/utils/config/OmniStudioMetadataCleanupService.d.ts +36 -0
- package/lib/utils/config/OmniStudioMetadataCleanupService.js +123 -0
- package/lib/utils/config/OmniStudioMetadataCleanupService.js.map +1 -0
- package/lib/utils/config/SpecialCharacterRecordCleanupService.d.ts +17 -0
- package/lib/utils/config/SpecialCharacterRecordCleanupService.js +186 -0
- package/lib/utils/config/SpecialCharacterRecordCleanupService.js.map +1 -0
- package/lib/utils/constants/documentRegistry.d.ts +9 -17
- package/lib/utils/constants/documentRegistry.js +9 -17
- package/lib/utils/constants/documentRegistry.js.map +1 -1
- package/lib/utils/constants/stringContants.d.ts +78 -0
- package/lib/utils/constants/stringContants.js +91 -4
- package/lib/utils/constants/stringContants.js.map +1 -1
- package/lib/utils/customLabels.d.ts +35 -0
- package/lib/utils/customLabels.js +100 -0
- package/lib/utils/customLabels.js.map +1 -0
- package/lib/utils/dataModelService.d.ts +18 -0
- package/lib/utils/dataModelService.js +72 -0
- package/lib/utils/dataModelService.js.map +1 -0
- package/lib/utils/file/fileUtil.d.ts +3 -1
- package/lib/utils/file/fileUtil.js +30 -13
- package/lib/utils/file/fileUtil.js.map +1 -1
- package/lib/utils/flexipage/flexiPageTransformer.js +119 -23
- package/lib/utils/flexipage/flexiPageTransformer.js.map +1 -1
- package/lib/utils/formula/FormulaUtil.d.ts +1 -1
- package/lib/utils/formula/FormulaUtil.js +17 -9
- package/lib/utils/formula/FormulaUtil.js.map +1 -1
- package/lib/utils/formula/Stack.js.map +1 -1
- package/lib/utils/generatePackageXml.d.ts +6 -2
- package/lib/utils/generatePackageXml.js +73 -33
- package/lib/utils/generatePackageXml.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/interfaces.d.ts +69 -8
- package/lib/utils/json/jsonutil.js.map +1 -1
- package/lib/utils/logger/fileLogger.js +17 -7
- package/lib/utils/logger/fileLogger.js.map +1 -1
- package/lib/utils/logger.d.ts +3 -3
- package/lib/utils/logger.js +10 -6
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/logging/debugtimer.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js +30 -22
- package/lib/utils/lwcparser/fileutils/FileDiffUtil.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/FileProcessorFactory.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/HtmlFileProcessor.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/JavascriptFileProcessor.js.map +1 -1
- package/lib/utils/lwcparser/fileutils/XmlFileProcessor.js.map +1 -1
- package/lib/utils/lwcparser/htmlParser/HTMLParser.js +29 -10
- package/lib/utils/lwcparser/htmlParser/HTMLParser.js.map +1 -1
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.js +29 -11
- package/lib/utils/lwcparser/jsParser/JavaScriptParser.js.map +1 -1
- package/lib/utils/lwcparser/xmlParser/XmlParser.js +19 -8
- package/lib/utils/lwcparser/xmlParser/XmlParser.js.map +1 -1
- package/lib/utils/net/index.d.ts +5 -0
- package/lib/utils/net/index.js +40 -2
- package/lib/utils/net/index.js.map +1 -1
- package/lib/utils/omniscriptPackageManager.d.ts +31 -0
- package/lib/utils/omniscriptPackageManager.js +215 -0
- package/lib/utils/omniscriptPackageManager.js.map +1 -0
- package/lib/utils/orgPreferences.d.ts +25 -0
- package/lib/utils/orgPreferences.js +124 -8
- package/lib/utils/orgPreferences.js.map +1 -1
- package/lib/utils/orgUtils/index.d.ts +12 -5
- package/lib/utils/orgUtils/index.js +52 -22
- package/lib/utils/orgUtils/index.js.map +1 -1
- package/lib/utils/projectPathUtil.d.ts +1 -1
- package/lib/utils/projectPathUtil.js +27 -10
- package/lib/utils/projectPathUtil.js.map +1 -1
- package/lib/utils/promptUtil.d.ts +11 -1
- package/lib/utils/promptUtil.js +92 -0
- package/lib/utils/promptUtil.js.map +1 -1
- package/lib/utils/query/index.d.ts +1 -0
- package/lib/utils/query/index.js +18 -1
- package/lib/utils/query/index.js.map +1 -1
- package/lib/utils/recordPrioritization.d.ts +44 -0
- package/lib/utils/recordPrioritization.js +69 -0
- package/lib/utils/recordPrioritization.js.map +1 -0
- package/lib/utils/reportGenerator/reportInterfaces.d.ts +12 -0
- package/lib/utils/reportGenerator/reportUtil.d.ts +6 -1
- package/lib/utils/reportGenerator/reportUtil.js +22 -7
- package/lib/utils/reportGenerator/reportUtil.js.map +1 -1
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.d.ts +1 -0
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js +40 -17
- package/lib/utils/resultsbuilder/ApexAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.d.ts +13 -0
- package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.js +179 -0
- package/lib/utils/resultsbuilder/CustomLabelAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.d.ts +27 -0
- package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.js +262 -0
- package/lib/utils/resultsbuilder/CustomLabelMigrationReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js +38 -70
- package/lib/utils/resultsbuilder/DRAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.d.ts +14 -0
- package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.js +143 -0
- package/lib/utils/resultsbuilder/ExperienceSiteAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js +46 -85
- package/lib/utils/resultsbuilder/FlexcardAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.d.ts +1 -0
- package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.js +37 -19
- package/lib/utils/resultsbuilder/FlexipageAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/GlobalAutoNumberAssessmentReporter.js +22 -14
- package/lib/utils/resultsbuilder/GlobalAutoNumberAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js +38 -71
- package/lib/utils/resultsbuilder/IPAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.d.ts +14 -0
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js +143 -139
- package/lib/utils/resultsbuilder/LWCAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js +41 -88
- package/lib/utils/resultsbuilder/OSAssessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.d.ts +12 -0
- package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.js +109 -0
- package/lib/utils/resultsbuilder/SaveForLaterAssessmentReporter.js.map +1 -0
- package/lib/utils/resultsbuilder/assessmentReporter.d.ts +16 -6
- package/lib/utils/resultsbuilder/assessmentReporter.js +96 -152
- package/lib/utils/resultsbuilder/assessmentReporter.js.map +1 -1
- package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.d.ts +104 -0
- package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.js +380 -0
- package/lib/utils/resultsbuilder/helpers/AssessmentReportHelper.js.map +1 -0
- package/lib/utils/resultsbuilder/index.d.ts +37 -1
- package/lib/utils/resultsbuilder/index.js +582 -151
- package/lib/utils/resultsbuilder/index.js.map +1 -1
- package/lib/utils/resultsbuilder/reportingHelper.d.ts +2 -7
- package/lib/utils/resultsbuilder/reportingHelper.js +0 -43
- package/lib/utils/resultsbuilder/reportingHelper.js.map +1 -1
- package/lib/utils/sfcli/project/sfProject.d.ts +29 -0
- package/lib/utils/sfcli/project/sfProject.js +220 -2
- package/lib/utils/sfcli/project/sfProject.js.map +1 -1
- package/lib/utils/shell/cli.js +20 -14
- package/lib/utils/shell/cli.js.map +1 -1
- package/lib/utils/storageUtil.d.ts +14 -1
- package/lib/utils/storageUtil.js +31 -1
- package/lib/utils/storageUtil.js.map +1 -1
- package/lib/utils/stringUtils.d.ts +24 -0
- package/lib/utils/stringUtils.js +76 -9
- package/lib/utils/stringUtils.js.map +1 -1
- package/lib/utils/templateParser/__tests__/test.js +1 -2
- package/lib/utils/templateParser/__tests__/test.js.map +1 -1
- package/lib/utils/templateParser/generate.d.ts +1 -1
- package/lib/utils/templateParser/generate.js.map +1 -1
- package/lib/utils/templateParser/model/elementNode.d.ts +2 -2
- package/lib/utils/templateParser/model/elementNode.js +11 -2
- package/lib/utils/templateParser/model/elementNode.js.map +1 -1
- package/lib/utils/templateParser/model/nodeTypes.js +1 -1
- package/lib/utils/templateParser/model/nodeTypes.js.map +1 -1
- package/lib/utils/templateParser/util.d.ts +2 -2
- package/lib/utils/templateParser/util.js.map +1 -1
- package/lib/utils/validatorService.d.ts +14 -0
- package/lib/utils/validatorService.js +136 -0
- package/lib/utils/validatorService.js.map +1 -0
- package/messages/assess.json +220 -103
- package/messages/clean.json +40 -0
- package/messages/info.json +2 -1
- package/messages/migrate.json +314 -102
- package/oclif.manifest.json +1 -1
- package/package.json +49 -13
- package/lib/commands/basecommand.d.ts +0 -8
- package/lib/commands/basecommand.js +0 -13
- package/lib/commands/basecommand.js.map +0 -1
- package/lib/utils/OmniGlobalAutoNumberPrefManager.d.ts +0 -40
- package/lib/utils/OmniGlobalAutoNumberPrefManager.js +0 -65
- package/lib/utils/OmniGlobalAutoNumberPrefManager.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Omnistudio Migration Assistant
|
|
2
2
|
|
|
3
|
-
The Omnistudio Migration Assistant is a
|
|
3
|
+
The Omnistudio Migration Assistant is a Salesforce CLI plugin that automates the migration of Omnistudio components. When run on a custom data model with managed package runtime, it migrates components to the standard data model and switches them to the Omnistudio standard runtime. When run on a standard data model with managed package, it cleans record names, enables the metadata API, and switches to the Omnistudio standard runtime.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🚀 Before You Begin
|
|
6
|
+
|
|
7
|
+
> **Note:** The `sfdx` CLI has been deprecated. Please use `sf` CLI commands instead. The deprecated `sfdx` command aliases (`-u`, `--targetusername`) are still supported.
|
|
8
|
+
|
|
9
|
+
⚠️ IMPORTANT: Before installing and using the Omnistudio Migration Assistant, contact Salesforce support.
|
|
6
10
|
|
|
7
11
|
- Review the migration phases in [Migration Process from Omnistudio for Managed Packages to Omnistudio](https://help.salesforce.com/s/articleView?id=xcloud.os_migrate_omnistudio_custom_objects_to_standard_objects.htm&language=en_US&type=5)
|
|
8
12
|
|
|
9
13
|
- Install Salesforce CLI on your computer. See : [Install Salesforce CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm).
|
|
10
14
|
|
|
15
|
+
- To deploy LWC as part of auto-deployment process, environment variable 'OMA_AUTH_KEY' should be set with requested NPM repository access key from Salesforce Customer Support.
|
|
16
|
+
|
|
17
|
+
- This tool requires Node Version 18+.
|
|
18
|
+
|
|
19
|
+
- LWC migration auto-deployment needs minimum node version of 18.17.1
|
|
20
|
+
|
|
11
21
|
## Install and Run the Omnistudio Migration Assistant
|
|
12
22
|
|
|
13
23
|
1. Install SF cli using the official documentation located [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm).
|
|
@@ -28,60 +38,63 @@ You can also authenticate using a consumer key (client ID) and secret key throug
|
|
|
28
38
|
3. In a new terminal session, Install the Omnistudio Migration Assistant by running the `sf plugins install` command. For example
|
|
29
39
|
|
|
30
40
|
```
|
|
31
|
-
sf plugins install @salesforce/plugin-omnistudio-migration-tool@2.0.0-
|
|
41
|
+
sf plugins install @salesforce/plugin-omnistudio-migration-tool@2.0.0-dev.1
|
|
32
42
|
```
|
|
33
43
|
|
|
34
44
|
4. Run the Omnistudio Migration Assistant from the Salesforce CLI:
|
|
35
45
|
|
|
36
46
|
```
|
|
37
47
|
// To assess everything without migrating
|
|
38
|
-
|
|
48
|
+
sf omnistudio:migration:assess -u YOUR_ORG_USERNAME@DOMAIN.COM
|
|
39
49
|
|
|
40
50
|
// To migrate everything
|
|
41
|
-
|
|
51
|
+
sf omnistudio:migration:migrate -u YOUR_ORG_USERNAME@DOMAIN.COM
|
|
42
52
|
|
|
43
53
|
|
|
44
|
-
// To migrate/assess specific components:
|
|
45
|
-
--only=
|
|
46
|
-
--only=ip
|
|
47
|
-
--only=os
|
|
48
|
-
--only=fc
|
|
49
|
-
--only=autonumber // Global Auto Numbers
|
|
54
|
+
// To migrate/assess specific components: Flexcards, Data Mappers, Integration Procedures, Omniscripts, Omni Global Auto Numbers or Custom Labels, add the following parameters:
|
|
55
|
+
--only=dm // Data Mappers
|
|
56
|
+
--only=ip // Integration Procedures
|
|
57
|
+
--only=os // Omniscripts
|
|
58
|
+
--only=fc // Flexcards
|
|
59
|
+
--only=autonumber // Omni Global Auto Numbers
|
|
60
|
+
--only=cl // Custom Labels
|
|
50
61
|
|
|
51
62
|
// To migrate all versions of the components and not just the active ones:
|
|
52
63
|
--allversions
|
|
53
64
|
|
|
54
|
-
// To assess specific related objects:
|
|
55
|
-
--relatedobjects=apex
|
|
65
|
+
// To assess specific set of related objects:
|
|
66
|
+
--relatedobjects=apex // for Apex classes only
|
|
67
|
+
--relatedobjects=lwc // for Lightning Web Components only
|
|
68
|
+
--relatedobjects=expsites // for Experience Sites only
|
|
69
|
+
--relatedobjects=flexipage // for FlexiPages only
|
|
70
|
+
--relatedobjects=apex,lwc,expsites,flexipage // for all related objects
|
|
56
71
|
|
|
57
|
-
// To specify the Velocity Namespace (Optional)
|
|
58
|
-
--namespace=VLOCITY_PACKAGE_NAMESPACE
|
|
59
72
|
```
|
|
60
73
|
|
|
61
74
|
5. An HTML page will be open in your default browser with the results of your migration/assessment reports.
|
|
62
75
|
|
|
63
|
-
## Global Auto Number Migration
|
|
76
|
+
## Omni Global Auto Number Migration
|
|
64
77
|
|
|
65
|
-
Global Auto Numbers are components that generate sequential numbers across your Omnistudio org. The migration tool supports both assessment and migration of these components.
|
|
78
|
+
Omni Global Auto Numbers are components that generate sequential numbers across your Omnistudio org. The migration tool supports both assessment and migration of these components.
|
|
66
79
|
|
|
67
|
-
### Prerequisites for Global Auto Number Migration
|
|
80
|
+
### Prerequisites for Omni Global Auto Number Migration
|
|
68
81
|
|
|
69
|
-
Before migrating Global Auto Numbers, ensure that:
|
|
82
|
+
Before migrating Omni Global Auto Numbers, ensure that:
|
|
70
83
|
|
|
71
84
|
1. **Org Preference is Disabled**: The `OmniGlobalAutoNumberPref` org preference must be disabled before migration
|
|
72
85
|
2. **Rollback Flags are Disabled**: Both `RollbackIPChanges` and `RollbackDRChanges` flags must be disabled
|
|
73
86
|
3. **Namespace is Specified**: Provide the correct namespace for your OmniStudio package
|
|
74
87
|
|
|
75
|
-
### Global Auto Number Migration Process
|
|
88
|
+
### Omni Global Auto Number Migration Process
|
|
76
89
|
|
|
77
|
-
The migration process for Global Auto Numbers includes:
|
|
90
|
+
The migration process for Omni Global Auto Numbers includes:
|
|
78
91
|
|
|
79
92
|
1. **Pre-migration Checks**: Validates that org preferences and rollback flags are properly configured
|
|
80
|
-
2. **Data Migration**: Transforms Global Auto Number settings from custom objects to standard Business Process Objects (BPO)
|
|
93
|
+
2. **Data Migration**: Transforms Omni Global Auto Number settings from custom objects to standard Business Process Objects (BPO)
|
|
81
94
|
3. **Post-migration Cleanup**: Removes source objects and enables the `OmniGlobalAutoNumberPref` org preference
|
|
82
95
|
4. **Validation**: Ensures all records are successfully migrated before cleanup
|
|
83
96
|
|
|
84
|
-
### Global Auto Number Assessment
|
|
97
|
+
### Omni Global Auto Number Assessment
|
|
85
98
|
|
|
86
99
|
Assessment provides detailed information about:
|
|
87
100
|
|
|
@@ -89,91 +102,170 @@ Assessment provides detailed information about:
|
|
|
89
102
|
- **Migration Readiness**: Determines if components can be automatically migrated or require manual intervention
|
|
90
103
|
- **Warnings**: Highlights potential issues that may affect migration success
|
|
91
104
|
|
|
92
|
-
### Usage Examples for Global Auto Numbers
|
|
105
|
+
### Usage Examples for Omni Global Auto Numbers
|
|
93
106
|
|
|
94
107
|
```bash
|
|
95
|
-
# Assess Global Auto Numbers only
|
|
96
|
-
|
|
108
|
+
# Assess Omni Global Auto Numbers only
|
|
109
|
+
sf omnistudio:migration:assess -u YOUR_ORG_USERNAME@DOMAIN.COM --only=autonumber
|
|
97
110
|
|
|
98
|
-
# Migrate Global Auto Numbers only
|
|
99
|
-
|
|
111
|
+
# Migrate Omni Global Auto Numbers only
|
|
112
|
+
sf omnistudio:migration:migrate -u YOUR_ORG_USERNAME@DOMAIN.COM --only=autonumber
|
|
100
113
|
```
|
|
101
114
|
|
|
102
115
|
5. An HTML page will be open in your default browser with the results of your migration/assessment job.
|
|
103
116
|
|
|
104
|
-
|
|
117
|
+
## Clean Command
|
|
118
|
+
|
|
119
|
+
Deactivates and deletes Omnistudio records (Omniscripts, Integration Procedures, Flexcards, and Data Mappers) that blocks enabling the Omnistudio Metadata API. Removes records with special characters in unique name fields or missing unique names.
|
|
120
|
+
|
|
121
|
+
> ⚠️ **Warning:** This action is permanent. Always run in a testing sandbox first and verify results before running in production.
|
|
122
|
+
|
|
123
|
+
### Prerequisites
|
|
124
|
+
|
|
125
|
+
- ✅ Org uses **standard data model** (not custom data model)
|
|
126
|
+
- ✅ **Metadata API not enabled** in your org
|
|
127
|
+
- ✅ All Omnistudio components **backed up** or deployed to testing sandbox
|
|
128
|
+
- ✅ Run in **testing sandbox first** to verify results
|
|
129
|
+
|
|
130
|
+
### Quick Start
|
|
105
131
|
|
|
132
|
+
```bash
|
|
133
|
+
# Step 1: Preview what would be cleaned (recommended)
|
|
134
|
+
sf omnistudio:migration:clean -u orguser@domain.com --assess
|
|
135
|
+
|
|
136
|
+
# Step 2: Review assessment reports in clean_assessment/ folder
|
|
137
|
+
|
|
138
|
+
# Step 3: Run actual cleanup (requires confirmation)
|
|
139
|
+
sf omnistudio:migration:clean -u orguser@domain.com
|
|
106
140
|
```
|
|
107
|
-
USAGE
|
|
108
|
-
$ sf omnistudio:migration:assess [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
109
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
110
141
|
|
|
111
|
-
|
|
112
|
-
-n, --namespace=namespace the namespace of the vertical package
|
|
142
|
+
### Command Options
|
|
113
143
|
|
|
114
|
-
|
|
115
|
-
|
|
144
|
+
| Option | Description |
|
|
145
|
+
| ----------------------------- | ------------------------------------------------------- |
|
|
146
|
+
| `-u, --target-org=<username>` | (required) Username or alias for target org |
|
|
147
|
+
| `--assess` | Preview records that would be removed (no changes made) |
|
|
116
148
|
|
|
117
|
-
|
|
118
|
-
org; overrides default dev hub org
|
|
149
|
+
### Usage Examples
|
|
119
150
|
|
|
120
|
-
|
|
121
|
-
api requests made by this command
|
|
151
|
+
#### Preview Mode (Assessment)
|
|
122
152
|
|
|
123
|
-
|
|
153
|
+
```bash
|
|
154
|
+
# Preview without making changes
|
|
155
|
+
sf omnistudio:migration:clean -u orguser@domain.com --assess
|
|
156
|
+
```
|
|
124
157
|
|
|
125
|
-
|
|
126
|
-
this command invocation
|
|
158
|
+
**Assessment Output:**
|
|
127
159
|
|
|
128
|
-
|
|
129
|
-
|
|
160
|
+
- Reports saved to `clean_assessment/` folder
|
|
161
|
+
- JSON files for each component type (Omniscripts, Integration Procedures, Flexcards, Data Mappers)
|
|
162
|
+
- Each file contains:
|
|
163
|
+
- `specialCharacterRecords`: Records with special characters in unique names
|
|
164
|
+
- `orphanRecords`: Records without deployment references (missing unique names)
|
|
165
|
+
- `totalToDelete`: Total records that would be removed
|
|
130
166
|
|
|
131
|
-
|
|
132
|
-
dr (DataRaptors), ip (Integration Procedures),
|
|
133
|
-
os (OmniScripts), fc (FlexCards), autonumber (Global Auto Numbers)
|
|
167
|
+
#### Cleanup Mode
|
|
134
168
|
|
|
135
|
-
|
|
136
|
-
|
|
169
|
+
```bash
|
|
170
|
+
# Run cleanup (requires confirmation)
|
|
171
|
+
sf omnistudio:migration:clean -u orguser@domain.com
|
|
137
172
|
```
|
|
138
173
|
|
|
139
|
-
|
|
174
|
+
**What Happens:**
|
|
175
|
+
|
|
176
|
+
1. Validates prerequisites (standard data model, Metadata API not enabled)
|
|
177
|
+
2. Shows warning and prompts for confirmation
|
|
178
|
+
3. **Phase 1**: Deactivates and deletes records with special characters
|
|
179
|
+
4. **Phase 2**: Deactivates and deletes records without unique names
|
|
180
|
+
5. Displays completion message
|
|
181
|
+
|
|
182
|
+
### Cleanup Process
|
|
183
|
+
|
|
184
|
+
The clean command runs in two phases:
|
|
185
|
+
|
|
186
|
+
1. **Phase 1: Special Character Cleanup**
|
|
187
|
+
|
|
188
|
+
- Removes records with special characters in unique name fields
|
|
189
|
+
- These records are incompatible with Metadata API
|
|
190
|
+
|
|
191
|
+
2. **Phase 2: Missing Unique Name Cleanup**
|
|
192
|
+
- Removes records without deployment references (missing unique names)
|
|
193
|
+
- These records blocks enabling Metadata API
|
|
194
|
+
|
|
195
|
+
### Full Command Reference
|
|
140
196
|
|
|
141
197
|
```
|
|
142
198
|
USAGE
|
|
143
|
-
$ sf omnistudio:migration:
|
|
144
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
199
|
+
$ sf omnistudio:migration:clean -u <username> [--assess]
|
|
145
200
|
|
|
146
201
|
OPTIONS
|
|
147
|
-
-
|
|
202
|
+
-u, --target-org=<username> (required) username or alias for the target org
|
|
203
|
+
--assess preview which records would be removed without making changes
|
|
204
|
+
```
|
|
148
205
|
|
|
149
|
-
|
|
150
|
-
org; overrides default target org
|
|
206
|
+
### Assess Usage & parameters
|
|
151
207
|
|
|
152
|
-
|
|
153
|
-
|
|
208
|
+
```
|
|
209
|
+
USAGE
|
|
210
|
+
$ sf omnistudio:migration:assess -u <username> [--only <component>] [--allversions]
|
|
211
|
+
[--relatedobjects <objects>] [--verbose]
|
|
154
212
|
|
|
155
|
-
|
|
156
|
-
|
|
213
|
+
OPTIONS
|
|
214
|
+
-u, --target-org=<username> (required) username or alias for the target org
|
|
215
|
+
(alias: --targetusername - deprecated)
|
|
157
216
|
|
|
158
|
-
--
|
|
217
|
+
-o, --only=<component> specify a single component to assess:
|
|
218
|
+
dm (Data Mappers),
|
|
219
|
+
ip (Integration Procedures),
|
|
220
|
+
os (Omniscripts),
|
|
221
|
+
fc (Flexcards),
|
|
222
|
+
autonumber (Omni Global Auto Numbers),
|
|
223
|
+
cl (Custom Labels)
|
|
159
224
|
|
|
160
|
-
--
|
|
161
|
-
this command invocation
|
|
225
|
+
-a, --allversions assess all versions, not just the active ones
|
|
162
226
|
|
|
163
|
-
-
|
|
164
|
-
|
|
227
|
+
-r, --relatedobjects=<objects> specify one or more related objects to assess (comma separated):
|
|
228
|
+
apex - Apex classes
|
|
229
|
+
lwc - Lightning Web Components
|
|
230
|
+
expsites - Experience Sites
|
|
231
|
+
flexipage - FlexiPages
|
|
165
232
|
|
|
166
|
-
--
|
|
167
|
-
dr (DataRaptors), ip (Integration Procedures),
|
|
168
|
-
os (OmniScripts), fc (FlexCards)
|
|
233
|
+
--verbose enable verbose output
|
|
169
234
|
|
|
170
|
-
--
|
|
171
|
-
'apex' for Apex classes
|
|
235
|
+
--loglevel=<level> (deprecated) use --verbose instead
|
|
172
236
|
```
|
|
173
237
|
|
|
174
|
-
|
|
238
|
+
### Migrate Usage & parameters
|
|
175
239
|
|
|
176
|
-
|
|
240
|
+
```
|
|
241
|
+
USAGE
|
|
242
|
+
$ sf omnistudio:migration:migrate -u <username> [--only <component>] [--allversions]
|
|
243
|
+
[--relatedobjects <objects>] [--verbose]
|
|
244
|
+
|
|
245
|
+
OPTIONS
|
|
246
|
+
-u, --target-org=<username> (required) username or alias for the target org
|
|
247
|
+
(aliases: --targetusername - deprecated)
|
|
248
|
+
|
|
249
|
+
-o, --only=<component> specify a single component to migrate:
|
|
250
|
+
dm (Data Mappers),
|
|
251
|
+
ip (Integration Procedures),
|
|
252
|
+
os (Omniscripts),
|
|
253
|
+
fc (Flexcards),
|
|
254
|
+
autonumber (Omni Global Auto Numbers),
|
|
255
|
+
cl (Custom Labels)
|
|
256
|
+
|
|
257
|
+
-a, --allversions migrate all versions, not just the active ones
|
|
258
|
+
|
|
259
|
+
-r, --relatedobjects=<objects> specify one or more related objects to migrate (comma separated):
|
|
260
|
+
apex - Apex classes
|
|
261
|
+
lwc - Lightning Web Components
|
|
262
|
+
expsites - Experience Sites
|
|
263
|
+
flexipage - FlexiPages
|
|
264
|
+
|
|
265
|
+
--verbose enable verbose output
|
|
266
|
+
|
|
267
|
+
--loglevel=<level> (deprecated) use --verbose instead
|
|
268
|
+
```
|
|
177
269
|
|
|
178
270
|
Terms:
|
|
179
271
|
Notwithstanding anything stated in the terms and conditions agreed between Salesforce (‘SFDC’) and you (‘Customer’), the use of the OmniStudio Migration Assistant (‘Assistant’) is designed to facilitate the migration and it’s going to modify your custom code and by deploying and using the Assistant you hereby provide your consent to automate the migration process and enable a smooth transition. Customer shall access and use the Assistant only as permitted to the Customer and shall not compromise, break or circumvent any technical processes or security measures associated with the services provided by SFDC.
|
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { Org, Logger as CoreLogger } from '@salesforce/core';
|
|
2
|
+
import { SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { AssessmentInfo } from '../../../utils/interfaces';
|
|
4
|
+
interface AssessFlags {
|
|
5
|
+
'target-org'?: Org;
|
|
6
|
+
only?: string;
|
|
7
|
+
allversions?: boolean;
|
|
8
|
+
relatedobjects?: string;
|
|
9
|
+
verbose?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export default class Assess extends SfCommand<AssessmentInfo> {
|
|
4
12
|
static description: string;
|
|
5
13
|
static examples: string[];
|
|
6
|
-
static args:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
namespace: flags.Discriminated<flags.String>;
|
|
11
|
-
only: flags.Discriminated<flags.String>;
|
|
12
|
-
allversions: flags.Discriminated<flags.Boolean<boolean>>;
|
|
13
|
-
relatedobjects: flags.Discriminated<flags.String>;
|
|
14
|
-
verbose: flags.Builtin;
|
|
15
|
-
};
|
|
16
|
-
run(): Promise<any>;
|
|
17
|
-
runAssess(): Promise<any>;
|
|
14
|
+
static args: any;
|
|
15
|
+
static readonly flags: any;
|
|
16
|
+
run(): Promise<AssessmentInfo>;
|
|
17
|
+
runAssess(parsedFlags: AssessFlags, ux: Ux, logger: CoreLogger): Promise<AssessmentInfo>;
|
|
18
18
|
private assessOmniStudioComponents;
|
|
19
19
|
private assessDataRaptors;
|
|
20
20
|
private assessFlexCards;
|
|
21
21
|
private assessOmniScripts;
|
|
22
|
+
private assessSaveForLater;
|
|
22
23
|
private assessGlobalAutoNumbers;
|
|
24
|
+
private assessCustomLabels;
|
|
25
|
+
/**
|
|
26
|
+
* Logs assessment completion with count and completion message if needed
|
|
27
|
+
* Skips logging when standard data model with metadata API is enabled
|
|
28
|
+
*/
|
|
29
|
+
private logAssessmentCompletionIfNeeded;
|
|
23
30
|
}
|
|
31
|
+
export {};
|