You are here:
XLIMergeService
Merge opportunity, order, and quote line items. The XLIMergeService implementation supports mergeRoots, mergeItemsToRoot, mergeFromParent, and mergeRootsInParent.
XLIMergeService is an implementation of VlocityOpenInterface. Even though it is global, it is not published and you cannot modify it. This service takes a list of two line items and merges them using a merge-sort. The implementation performs the following actions:
-
Queries the source list by SourceKeyField.
-
Sorts the items by the SourceLineNumber field.
-
Queries the target list by TargetKeyField.
-
Sorts the target line items by TargetLineNumber.
-
Uses SourceMatchKey in source items to match them with target items using the TargetKeyField.
-
After the merge is complete, the implementation invokes XLIMergeHandler.
Interface
VlocityOpenInterface
Method Names
XLIMergeService implements invokeMethod with these method names.
mergeRootsInParent
The source and target items are part of the same object under a root line item. They differ by ProvisioningStatus (Active or New). The method takes the following arguments:
-
ObjectName
The name of the object
-
ProvisionStatusField
The provisioning field to query
mergeItemsToRoot
Similar to mergeRoots, but on the same object
mergeFromParent
Source and target items are of the same object under different root items. The result is merged to the source. The method takes the following arguments:
-
ObjectName
The name of the object
-
ProvisionStatusField
The provisioning field to query
mergeRoots
The source and target items can be any two different line items.
Common Arguments
All of the methods listed here take the following arguments:
-
SourceKeyField
The field in the source line item to query, usually the header ID
-
SourceMatchKey
The field in the source object to link with the target object
-
SourceLineNumber
The line number field by which to sort in the source object
-
TargetMatchKey
The key in the target line item to query, usually the header ID
-
TargetLineNumber
The line number field by which to sort in the target object
-
TargetKeyField
The field in the target object to link to the source object
Sample Code
None. Although the class is global, the service is for internal use only.
Related Implementations
-
XLIBatchValidationConfiguration
-
DefaultXLIMergeHandlerImplementation

