From d602a6d9258f1b1dd26e3430cc1bf42f6661a295 Mon Sep 17 00:00:00 2001 From: Shubham Gupta Date: Tue, 19 Jul 2022 12:57:26 +0530 Subject: [PATCH] Made the changes to add the CustomObjectMap as DataPackType --- .../DRMatchingKey/CustomObjectMap__c.json | 22 ++ .../CustomObjectMap.json | 22 ++ .../Custom-Object-Map-Migration_DataPack.json | 49 ++++ .../Custom-Object-Map-Migration_Mappings.json | 241 ++++++++++++++++++ lib/datapacksexpanddefinition.yaml | 7 +- lib/querydefinition.yaml | 3 + 6 files changed, 343 insertions(+), 1 deletion(-) create mode 100644 DataPackMetadata/latest/DRMatchingKey/CustomObjectMap__c.json create mode 100644 DataPackMetadata/latest/VlocityDataPackConfiguration/CustomObjectMap.json create mode 100644 DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_DataPack.json create mode 100644 DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_Mappings.json diff --git a/DataPackMetadata/latest/DRMatchingKey/CustomObjectMap__c.json b/DataPackMetadata/latest/DRMatchingKey/CustomObjectMap__c.json new file mode 100644 index 00000000..7500e308 --- /dev/null +++ b/DataPackMetadata/latest/DRMatchingKey/CustomObjectMap__c.json @@ -0,0 +1,22 @@ +{ + "fullName": "%vlocity_namespace%__DRMatchingKey__mdt.CustomObjectMap", + "label": "CustomObjectMapCustom", + "values": [ + { + "field": "%vlocity_namespace%__MatchingKeyFields__c", + "value": "Name" + }, + { + "field": "%vlocity_namespace%__MatchingKeyObject__c", + "value": "%vlocity_namespace%__CustomObjectMap__c" + }, + { + "field": "%vlocity_namespace%__ObjectAPIName__c", + "value": "%vlocity_namespace%__CustomObjectMap__c" + }, + { + "field": "%vlocity_namespace%__ReturnKeyField__c", + "value": "Id" + } + ] +} diff --git a/DataPackMetadata/latest/VlocityDataPackConfiguration/CustomObjectMap.json b/DataPackMetadata/latest/VlocityDataPackConfiguration/CustomObjectMap.json new file mode 100644 index 00000000..afa86564 --- /dev/null +++ b/DataPackMetadata/latest/VlocityDataPackConfiguration/CustomObjectMap.json @@ -0,0 +1,22 @@ +{ + "fullName": "%vlocity_namespace%__VlocityDataPackConfiguration__mdt.CustomObjectMap", + "label": "CustomObjectMap", + "values": [ + { + "field": "%vlocity_namespace%__DefaultExportService__c", + "value": "Custom Object Map Migration" + }, + { + "field": "%vlocity_namespace%__DefaultImportService__c", + "value": "Custom Object Map Migration" + }, + { + "field": "%vlocity_namespace%__DefaultExportLimit__c", + "value": 100 + }, + { + "field": "%vlocity_namespace%__DefaultImportLimit__c", + "value": 100 + } + ] +} diff --git a/DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_DataPack.json b/DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_DataPack.json new file mode 100644 index 00000000..89ab0614 --- /dev/null +++ b/DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_DataPack.json @@ -0,0 +1,49 @@ +{ + "%vlocity_namespace%__BatchSize__c": 200, + "%vlocity_namespace%__CheckFieldLevelSecurity__c": false, + "%vlocity_namespace%__CustomInputClass__c": "", + "%vlocity_namespace%__CustomOutputClass__c": "", + "%vlocity_namespace%__DRMapItem__c": "Custom-Object-Map-Migration_Mappings.json", + "%vlocity_namespace%__DRMapName__c": "Custom Object Map Migration", + "%vlocity_namespace%__DeleteOnSuccess__c": false, + "%vlocity_namespace%__Description__c": "", + "%vlocity_namespace%__GlobalKey__c": "Custom Object Map Migration", + "%vlocity_namespace%__IgnoreErrors__c": false, + "%vlocity_namespace%__InputCustom__c": "", + "%vlocity_namespace%__InputJson__c": "", + "%vlocity_namespace%__InputType__c": "", + "%vlocity_namespace%__InputXml__c": "", + "%vlocity_namespace%__InterfaceObject__c": "JSON", + "%vlocity_namespace%__IsDefaultForInterface__c": false, + "%vlocity_namespace%__IsProcessSuperBulk__c": false, + "%vlocity_namespace%__OuboundStagingObjectDataField__c": "", + "%vlocity_namespace%__OutboundConfigurationField__c": "", + "%vlocity_namespace%__OutboundConfigurationName__c": "", + "%vlocity_namespace%__OutboundStagingObjectName__c": "", + "%vlocity_namespace%__OutputType__c": "", + "%vlocity_namespace%__OverwriteAllNullValues__c": false, + "%vlocity_namespace%__PreprocessorClassName__c": "", + "%vlocity_namespace%__ProcessNowThreshold__c": -1, + "%vlocity_namespace%__RequiredPermission__c": "", + "%vlocity_namespace%__RollbackOnError__c": false, + "%vlocity_namespace%__SalesforcePlatformCacheType__c": "", + "%vlocity_namespace%__SampleInputCustom__c": "", + "%vlocity_namespace%__SampleInputJSON__c": "", + "%vlocity_namespace%__SampleInputRows__c": "", + "%vlocity_namespace%__SampleInputXML__c": "", + "%vlocity_namespace%__TargetOutCustom__c": "", + "%vlocity_namespace%__TargetOutDocuSignTemplateId__c": "", + "%vlocity_namespace%__TargetOutJson__c": "", + "%vlocity_namespace%__TargetOutPdfDocName__c": "", + "%vlocity_namespace%__TargetOutXml__c": "", + "%vlocity_namespace%__TimeToLiveMinutes__c": "", + "%vlocity_namespace%__Type__c": "Migration", + "%vlocity_namespace%__UseAssignmentRules__c": false, + "%vlocity_namespace%__UseTranslations__c": false, + "%vlocity_namespace%__XmlOutputSequence__c": "", + "%vlocity_namespace%__XmlRemoveDeclaration__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRBundle__c", + "VlocityRecordSourceKey": "%vlocity_namespace%__DRBundle__c/Custom Object Map Migration" +} \ No newline at end of file diff --git a/DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_Mappings.json b/DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_Mappings.json new file mode 100644 index 00000000..4b2b5dd3 --- /dev/null +++ b/DataPackSettings/latest/DataRaptor/Custom-Object-Map-Migration/Custom-Object-Map-Migration_Mappings.json @@ -0,0 +1,241 @@ +[ + { + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "%vlocity_namespace%__CustomObjectMap__c", + "%vlocity_namespace%__FilterGroup__c": 1, + "%vlocity_namespace%__FilterOperator__c": "=", + "%vlocity_namespace%__FilterValue__c": "Id", + "%vlocity_namespace%__InterfaceFieldAPIName__c": "Id", + "%vlocity_namespace%__InterfaceObjectLookupOrder__c": 1, + "%vlocity_namespace%__InterfaceObjectName__c": "%vlocity_namespace%__CustomObjectMap__c", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration0", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "%vlocity_namespace%__DRBundleName__c", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration11", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "%vlocity_namespace%__DRError__c", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration13", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "%vlocity_namespace%__DRProgressData__c", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration12", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "CreatedById", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration4", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "CreatedDate", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration3", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "IsCustomerPortal", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration7", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "IsDeleted", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration2", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "IsPartner", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration8", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "LastModifiedById", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration9", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "LastModifiedDate", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration5", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "OwnerId", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration1", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "SetupOwnerId", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration10", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + }, + { + "%vlocity_namespace%__ConfigurationAttribute__c": "Global", + "%vlocity_namespace%__ConfigurationCategory__c": "Ignore Field", + "%vlocity_namespace%__ConfigurationProcess__c": "All", + "%vlocity_namespace%__ConfigurationType__c": "Action", + "%vlocity_namespace%__ConfigurationValue__c": "SystemModstamp", + "%vlocity_namespace%__DomainObjectAPIName__c": "JSON", + "%vlocity_namespace%__DomainObjectCreationOrder__c": 0, + "%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration", + "%vlocity_namespace%__IsDisabled__c": false, + "%vlocity_namespace%__IsRequiredForUpsert__c": false, + "%vlocity_namespace%__MapId__c": "Custom Object Map Migration6", + "%vlocity_namespace%__UpsertKey__c": false, + "Name": "Custom Object Map Migration", + "VlocityDataPackType": "SObject", + "VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c" + } +] \ No newline at end of file diff --git a/lib/datapacksexpanddefinition.yaml b/lib/datapacksexpanddefinition.yaml index c94c76d4..e2531113 100644 --- a/lib/datapacksexpanddefinition.yaml +++ b/lib/datapacksexpanddefinition.yaml @@ -565,6 +565,11 @@ SObjects: - Name SourceKeyDefinition: - Name + CustomObjectMap__c: + FolderName: + - Name + SourceKeyDefinition: + - Name DRBundle__c: DeltaQueryChildren: DRMapItem__c: @@ -1757,4 +1762,4 @@ IPActionsConfig: type: ApexClass dataField: - remoteClass - query: SELECT Id FROM ApexClass WHERE Name = '%dataFieldValue%' \ No newline at end of file + query: SELECT Id FROM ApexClass WHERE Name = '%dataFieldValue%' diff --git a/lib/querydefinition.yaml b/lib/querydefinition.yaml index b367aeef..c50b94b3 100644 --- a/lib/querydefinition.yaml +++ b/lib/querydefinition.yaml @@ -49,6 +49,9 @@ CpqConfigurationSetup: CustomFieldMap: VlocityDataPackType: CustomFieldMap query: Select Id, Name from %vlocity_namespace%__CustomFieldMap__c +CustomObjectMap: + VlocityDataPackType: CustomObjectMap + query: Select Id, Name from %vlocity_namespace%__CustomObjectMap__c DecisionMatrix: VlocityDataPackType: DecisionMatrix query: Select Id, Name from CalculationMatrix