---
title: "changeAlternativePositionState"
slug: "api/basket/operations/changealternativepositionstate"
sidebar:
  order: 445
---

<a id="ref-ce93611930a3"></a>
<a id="ref-74389106741c"></a>
<a id="ref-640a4d355d6d"></a>

## Synopsis

```text
boolean changeAlternativePositionState(SessionId sessionId,
    BItemId[]          itemIds,
    ItemSelectionOptions options,
    string ppName,
    boolean altPos)
throws BasketServiceFault;
```

See also: [SessionId](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [BItemId](/pCon/configuratorOnline/specs/api/basket/types/bitemid#ref-bccb6c926e5b), [ItemSelectionOptions](/pCon/configuratorOnline/specs/api/basket/types/itemselectionoptions#ref-96d714d65dbc), [ItemSelectionOptions](/pCon/configuratorOnline/specs/api/basket/types/itemselectionoptions#ref-acc83e092416), [BasketServiceFault](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b)

This operation can be used to modify the excluded calculation set of zero or more article items.

The `itemIds` and `options` parameters are used to compute an initial set of selected items. Items other than basket main article items, user article items or set article items are removed from this set. The excluded calculation sets of the remaining items are updated as follows:

If the `altPos` parameter is `true`:

- If the current excluded calculation set is the universal set, it is left unchanged.

- Otherwise, if the value of the `ppName` parameter is an empty string, the excluded calculation set is set to the universal set.

- Otherwise, the value of the `ppName` parameter is added to the excluded calculation set.

If the `altPos` parameter is `false`:

- If the value of the `ppName` parameter is an empty string, the excluded calculation set is set to the empty set.

- Otherwise, if the excluded calculation set is the universal set, it is first replaced with a set containing the names of all price calculations currently used by the basket. Then, the entry equal to the value of `ppName` is removed from the excluded calculation set.

The operation fails if the session ID or one of the item IDs is invalid, or the specified calculation (pricing procedure) name is neither empty nor equal to the name of one of the price calculations currently used by the basket.
