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

updateBasketArticles

Synopsis

UpdateBasketArticleResult[] updateBasketArticles(
    SessionId sessionId,
    BItemId[]             itemId,
    string[]                catalogIds,
    UpdateBasketArticleOptions options)
throws BasketServiceFault;

See also: UpdateBasketArticleResult, SessionId, BItemId, UpdateBasketArticleOptions, BasketServiceFault

The specified item IDs must reference existing items, but Ids of items other than basket article items are ignored.

The operation determines a set of basket main article items based on the set of specified item IDs and the wholeComposite attribute of the options argument. If no options are specified, or the wholeComposite attribute has not been specified, then whole-composite defaults to false. If whole-composite is true, then a sub-article item specified by one of the item IDs results in the selection of its main article item.

(The attributes subItems and parentItems of complex type ItemSelectionOptions are ignored.)

Once all basket main article items have been determined, the operation determines the update state for each article item, possibly using the set of specified catalog IDs to restrict the set of OFML catalogs as described above in the documentation of UpdateState.

If the update state is Updatable, and the effective value of the update option is true, the article is updated. If the update state is Migratable, and the effective value of the migrate option is true, the article is migrated.

If the article is updated or migrated, and update or migration succeeded, the returned update state for this article will be UpToDate. If update or migration failed, the returned update state will be Invalid. In all other cases, the returned update state will be the update state originally determined for this article.

The order of returned elements of complex type UpdateBasketArticleResult is undefined and not guaranteed to be reproducible (two subsequent calls of updateBasketArticles do not necessarily return the elements in the same order, even if both update and migrate options are false).

Basically, update and migration mean the instantiation of an OFML article based on the installed OFML (product) data and the configuration (base article number, variant code, …) of a basket article item read from a BSK/OBX file, followed by the transfer of the current article data from the OFML article item to the basket article item, replacing the old data read from the BSK/OBX file.

In case of an update, the configuration of the article item read from the BSK/OBX file and the configuration of the OFML article are supposed to be identical. In case of migration, the base article number of the OFML article should be the same, but other properties may be different.

(Subsequently, the term ‘OFML catalog’ is used as a synonym for a catalog profile and all OFML packages referenced from the catalog profile, or for a subset of the OFML packages referenced from a package profile (If the OFML and commercial manufacturer IDs of all referenced packages as well as the set of manufacturer display names are identical, the subset consists of all referenced packages. As this is usually the case, a package profile usually results in a single OFML catalog.))

The support for update and migration results in or affects the following four use cases:

  • Update of an article. To update an article, EAIWS must first determine an OFML catalog that contains the article, followed by the re-instantiation of the OFML article, followed by the transfer of the article data from the OFML article to the basket article item.

    In case of multiple registered catalogs that contain different versions and/or distribution regions for the same article, it may be necessary to specify a subset of catalogs to allow EAIWS the selection of a single OFML catalog.

  • Migration of an article. This is basically the same as the update of an article, except that the configuration of the migrated article is not identical with the original article.

  • Determination of the update state. This determines whether a basket article item can be updated or migrated with respect to a certain set of OFML catalogs.

  • Reconfiguration of an article. This is done when a user selects an article, displays the property editor, and changes a property. The web service operations involved are (at least) ‘getArticleData’ and ‘setPropertyValue’. The first operation re-instantiates the OFML article, the second operations sets the new property value and copies the article data from the OFML article into the basket article item.

    For the first operation (re-instantiation of the OFML article) to succeed, the article item must be ‘Updatable’ with respect to all registered OFML catalogs. If this is not the case, it must be updated or migrated first, possibly with a subset of OFML catalogs specified.

Changes to the OFML article type

Product data may change an OFML article’s implementation between a simple article and a meta type, or change whether an article is an aggregate or partial planning. In EAIWS 4.20, a mismatch between the stored main article type and the type determined from the current OFML article is no longer treated as a failure by itself. When current OFML article data is transferred to the basket, the basket item’s type is updated to match. Sub-article handling also follows the current OFML article type rather than the stored type.

If a former meta type is now implemented as a simple OFML article, configuration restoration does not require the CompositeArticle interface when the basket item has no sub-articles. If the basket item still has sub-articles and the current OFML article does not implement CompositeArticle, enabling migration suppresses the corresponding NoSuchInterfaceException. Migration then silently drops the former meta type’s basket sub-article items. Transferring article data with a new simple-article type also disposes of existing sub-article items. A successful migration therefore does not imply that the previous sub-article structure has been preserved.

If a former simple article is now implemented as a meta type, its stored add-state codes are restored on the main child rather than on the meta type itself.

See also: UpdateBasketArticleOptions and BasketItemType.