setPropertyValue
Synopsis
string setPropertyValue(SessionId sessionId,
BItemId itemId,
string propClass,
string propName,
string value
SetPropertyValueOptions? options)
throws BasketServiceFault;
See also: SessionId, BItemId, SetPropertyValueOptions, BasketServiceFault
The setPropertyValue operation is used to assign a new value to an editable property of an article.
The itemId parameter must identify an article item that is part of the basket item tree maintained by the basket service for the session identified by the sessionId parameter.
The propClass and propName parameters must identify an editable property of the article.
The value parameter contains the new property value.
If argument options is missing the operation behaves as before (all options controlling computation of change flags are effectively true).
For string properties that do not allow additional values the value must be equal to one of the values from the choice list.
For numeric properties and length properties, the string must consist of an optional minus sign (-) , followed by a sequence of one or more decimal digits, and, if the precision1 of the property is greater than zero, followed by a decimal point and one or more decimal digits, but no more than specified by the precision2. If the property does not allow additional values and has no intervals then the value must be numerically identical to one of the values from the choice list. If the property has at least one interval then the value must be within one of the intervals, or, for OCD 4.0 and later, a member of the choice list.
Setting a property value usually involves the evaluation of the product data’s relation knowledge. The setPropertyValue operation has no effect if, for whatever reason, evaluation of the relation knowledge fails.
The setPropertyValue operation returns a string consisting of zero or more characters, each character indicating a particular side effect of the assignment of the new property value. The following characters are defined:
S property Shown
An additional property became visible.
H property Hidden
A property that has been visible before has been hidden, i.e. became invisible.
V other property Value changed
Assignment of the new property value caused a change of the value of another visible property.
v invisible property value changed
Assignment of the new property value caused a change of the value of an invisible property.
U property value Unchanged
Assignment of the new property value did not result in a change of the value of this property. One reason may be that the property was set to the original value. Another reason may be that the change was rejected.
A property value Adjusted
Assignment of the new property value resulted in a change of the value of this property, but the new value is different from the assigned one. One reason may be that a numeric property value has been rounded to the precision of the property as specified by the product data.
C Choice list changed
At least one of the property choice lists has changed.
I Interval changed
At least one of the interval lists has changed.
a position added
Assignment of the new property value resulted in at least one position to be added to the basket item hierarchy.
r position removed
Assignment of the new property value resulted in the removal of at least one position from the basket item hierarchy.
u other position needs update
Assignment of the new property value resulted in a change to at least one other position (in addition to the currently configured position).
In case of the ‘a’, ‘r’ and ‘u’ flags, the other position or positions affected always belong to the same hierarchy of composite articles (§BasketItem for more information). Other than that there are no guarantees, in particular there is no guarantee that the other position or positions are immediate sub-articles of the modified position.
A BasketServiceFault is returned if any of the following conditions occurs:
-
The
sessionIdparameter is not a valid string representation of an UUID or does not represent an open session. -
The
itemIdparameter does not represent an UUID. -
The
itemIdparameter does not identify an article item. -
The
propClassandpropNameparameters do not identify an editable property. -
The property is a numeric or length property, but the new property value cannot be parsed as a decimal number.
-
The property has a choice list and no intervals, does not allow additional values, and the new value is not a member of the choice list.
-
The property has a choice list and at least one interval, the value is not within one of the intervals, and, for OCD 4.0 and later, the value is not a member of the choice list.
-
Evaluation of relation knowledge failed due to invalid relation knowledge or a database access error.