Skip to content
pCon.configurator onlineDocumentation
Esc
↑↓navigate↵open⌘Jpreview
On this page

SplitUpCompositeArticles

Synopsis

BitemId[] splitUpCompositeArticles(SessionId sessionId,
    BitemId[]            itemIds,
    ItemSelectionOptions?    Options)
throws BasketServiceFault;

See also: B, BItemId, SessionId, ItemSelectionOptions, BasketServiceFault

The operation splitUpCompositeArticles splits up a composite article (usually a meta type) into individual ordinary articles and folders (in case the composite article contained partial plannings).

The operation first determines a set of selected items based on the specified item IDs and optional item selection options (as of now, option viewId is not supported).

For each main article item (root of a composite article) that is part of the set of selected items, the operation then performs the following, starting with the main article item:

  1. If the original item is a partial planning, create a folder as predecessor of the original item. The item’s short text is used as the folder’s label.

  2. If the original item is an article, create an ordinary article item as predecessor of the original item, and initialize it with the original article’s OFML data, quantity, custom texts and field values, changes to item calculations (added manual conditions, removed conditions, manually specified condition values), tax information, packaging information, and alternative position state.

  3. If the original item is part of a set-article, make the new item a part of the same set-article.

  4. Move all children (sub-positions, not sub-articles) of the original item to the new item, preserving their order.

  5. Recursively iterate over all sub-article items, repeating above steps until all sub-article items have been converted.

  6. Delete the original main article item.

If conversion fails for whatever reason (not expected to happen), items newly created for the current partially converted composit article are deleted. This may result in structural changes (items that had been sub-positions of the main article item may become siblings of the main article item).

The operation returns a sequence of basket item IDs with the same number of elements as passed to the itemsId parameter. If the N-th parameter is the ID of an item that was part of a composite article that has been split up, then the N-th return value is the ID of the ordinary article item or folder that represents the original article now. Otherwise, the N-th return value is equal to the N-th parameter if the item still exists, or the NIL-ID if the item has been deleted for whatever reason (should not happen).