Skip to content

Commit 3dab866

Browse files
author
Adam Rutland
committed
Updates to fix missing products when maxDepth=0. Add more information to status and log. Make the export more consistent while mid-export.
1 parent 249465e commit 3dab866

File tree

16 files changed

+457
-374
lines changed

16 files changed

+457
-374
lines changed

DataPackSettings/DataRaptor/Object-Class-Migration/Object-Class-Migration_Mappings.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,37 @@
9090
"Name": "Object Class Migration",
9191
"VlocityDataPackType": "SObject",
9292
"VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c"
93+
},
94+
{
95+
"%vlocity_namespace%__DomainObjectAPIName__c": "JSON",
96+
"%vlocity_namespace%__DomainObjectCreationOrder__c": 0,
97+
"%vlocity_namespace%__DomainObjectFieldAPIName__c": "%vlocity_namespace%__ObjectClass__c:%vlocity_namespace%__AttributeAssignment__c",
98+
"%vlocity_namespace%__FilterGroup__c": 1,
99+
"%vlocity_namespace%__FilterOperator__c": "!=",
100+
"%vlocity_namespace%__FilterValue__c": "'$Vlocity.NULL'",
101+
"%vlocity_namespace%__InterfaceFieldAPIName__c": "%vlocity_namespace%__AttributeId__c",
102+
"%vlocity_namespace%__InterfaceObjectLookupOrder__c": 4,
103+
"%vlocity_namespace%__InterfaceObjectName__c": "%vlocity_namespace%__AttributeAssignment__c",
104+
"%vlocity_namespace%__MapId__c": "Object Class Migration51",
105+
"Name": "Object Class Migration",
106+
"VlocityDataPackType": "SObject",
107+
"VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c"
108+
},
109+
{
110+
"%vlocity_namespace%__ConfigurationAttribute__c": "%vlocity_namespace%__AttributeAssignment__c",
111+
"%vlocity_namespace%__ConfigurationCategory__c": "Ignore When Null",
112+
"%vlocity_namespace%__ConfigurationProcess__c": "Import",
113+
"%vlocity_namespace%__ConfigurationType__c": "Action",
114+
"%vlocity_namespace%__ConfigurationValue__c": "%vlocity_namespace%__AttributeId__c",
115+
"%vlocity_namespace%__DomainObjectAPIName__c": "Configuration",
116+
"%vlocity_namespace%__DomainObjectCreationOrder__c": 0,
117+
"%vlocity_namespace%__DomainObjectFieldAPIName__c": "Configuration",
118+
"%vlocity_namespace%__InterfaceFieldAPIName__c": "Configuration",
119+
"%vlocity_namespace%__InterfaceObjectLookupOrder__c": 4,
120+
"%vlocity_namespace%__MapId__c": "Object Class Migration50",
121+
"Name": "Object Class Migration",
122+
"VlocityDataPackType": "SObject",
123+
"VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c"
93124
},
94125
{
95126
"%vlocity_namespace%__ConfigurationAttribute__c": "%vlocity_namespace%__AttributeAssignment__c",

DataPackSettings/DataRaptor/OmniScript-Migration/OmniScript-Migration_Mappings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
},
138138
{
139139
"%vlocity_namespace%__ConfigurationAttribute__c": "OmniScript",
140-
"%vlocity_namespace%__ConfigurationCategory__c": "Sibling",
140+
"%vlocity_namespace%__ConfigurationCategory__c": "Parent",
141141
"%vlocity_namespace%__ConfigurationGroup__c": "Reusable Omniscript",
142142
"%vlocity_namespace%__ConfigurationKey__c": "Sub Type",
143143
"%vlocity_namespace%__ConfigurationProcess__c": "Export",
@@ -154,7 +154,7 @@
154154
},
155155
{
156156
"%vlocity_namespace%__ConfigurationAttribute__c": "OmniScript",
157-
"%vlocity_namespace%__ConfigurationCategory__c": "Sibling",
157+
"%vlocity_namespace%__ConfigurationCategory__c": "Parent",
158158
"%vlocity_namespace%__ConfigurationGroup__c": "Reusable Omniscript",
159159
"%vlocity_namespace%__ConfigurationKey__c": "Language",
160160
"%vlocity_namespace%__ConfigurationProcess__c": "Export",
@@ -659,7 +659,7 @@
659659
},
660660
{
661661
"%vlocity_namespace%__ConfigurationAttribute__c": "OmniScript",
662-
"%vlocity_namespace%__ConfigurationCategory__c": "Sibling",
662+
"%vlocity_namespace%__ConfigurationCategory__c": "Parent",
663663
"%vlocity_namespace%__ConfigurationGroup__c": "Reusable Omniscript",
664664
"%vlocity_namespace%__ConfigurationKey__c": "Type",
665665
"%vlocity_namespace%__ConfigurationProcess__c": "Export",

DataPackSettings/DataRaptor/Product2-Migration/Product2-Migration_Mappings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@
5454
"%vlocity_namespace%__InterfaceFieldAPIName__c": "%vlocity_namespace%__ObjectId__c",
5555
"%vlocity_namespace%__InterfaceObjectLookupOrder__c": 3,
5656
"%vlocity_namespace%__InterfaceObjectName__c": "%vlocity_namespace%__AttributeAssignment__c",
57+
"%vlocity_namespace%__MapId__c": "Product2 Migration50",
58+
"Name": "Product2 Migration",
59+
"VlocityDataPackType": "SObject",
60+
"VlocityRecordSObjectType": "%vlocity_namespace%__DRMapItem__c"
61+
},
62+
{
63+
"%vlocity_namespace%__DomainObjectAPIName__c": "JSON",
64+
"%vlocity_namespace%__DomainObjectCreationOrder__c": 0,
65+
"%vlocity_namespace%__DomainObjectFieldAPIName__c": "Product2:%vlocity_namespace%__AttributeAssignment__c",
66+
"%vlocity_namespace%__FilterGroup__c": 1,
67+
"%vlocity_namespace%__FilterOperator__c": "!=",
68+
"%vlocity_namespace%__FilterValue__c": "'$Vlocity.NULL'",
69+
"%vlocity_namespace%__InterfaceFieldAPIName__c": "%vlocity_namespace%__AttributeId__c",
70+
"%vlocity_namespace%__InterfaceObjectLookupOrder__c": 3,
71+
"%vlocity_namespace%__InterfaceObjectName__c": "%vlocity_namespace%__AttributeAssignment__c",
5772
"%vlocity_namespace%__MapId__c": "Product2 Migration3",
5873
"Name": "Product2 Migration",
5974
"VlocityDataPackType": "SObject",

apex/EPCProductJSONUpdate.cls

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,28 @@ for (Map<String, Object> obj : dataPackDataSet)
1010
}
1111
}
1212

13-
Database.executeBatch(new vlocity_namespace.EPCProductAttribJSONBatchJob(productIds), 1);
13+
List<Id> epcProducts = new List<Id>();
14+
List<Id> nonEpcProducts = new List<Id>();
15+
16+
for (Product2 prod : [Select Id, vlocity_namespace__ObjectTypeId__c from Product2 where Id in: productIds])
17+
{
18+
if (prod.vlocity_namespace__ObjectTypeId__c == null)
19+
{
20+
nonEpcProducts.add(prod.Id);
21+
}
22+
else
23+
{
24+
epcProducts.add(prod.Id);
25+
}
26+
}
27+
28+
if (epcProducts.size() > 0)
29+
{
30+
Database.executeBatch(new vlocity_namespace.EPCProductAttribJSONBatchJob(epcProducts), 1);
31+
}
32+
33+
if (nonEpcProducts.size() > 0)
34+
{
35+
vlocity_namespace.ProductAttributeService.createProductAttributeJSON(nonEpcProducts);
36+
}
37+

0 commit comments

Comments
 (0)