Update_WCS_ProductPrice message

The Update_WCS_ProductPrice message is an inbound message that contains price information for a product. A back-end application generates this message and sends it to the WebSphere Commerce inbound message queue. When the WebSphere Commerce system receives the message, it runs a controller command. The controller command that is run depends on the type of message. The following table shows the two types of messages that can be sent, along with their associated controller commands.

Product Price Message Type Controller Command
OfferPrice Update ProductOfferPriceUpdate
ListPrice Update ProductListPriceUpdate

The Update_WCS_ProductPrice message uses the XML message format and follows Update_WCS_ProductPrice_20.dtd.

OfferPrice Update

The following table describes the format of the OfferPrice Update variant of the Update_WCS_ProductPrice message. For a description of the database column, follow the link to its associated table. All fields are optional unless otherwise noted. The tag value length in the XML message for database fields of type INT, BIGINT and DOUBLE should be CHAR (10), CHAR(19), and CHAR(16) respectively.

Level XML Element Comment Table Name Column Name
1 OfferPriceInfo N/A N/A
1.1 ProductNumberByMerchant Mandatory CATENTRY PARTNUMBER
1.2 MerchantID Mandatory CATENTRY MEMBER_ID
1.2.A1 type Attribute N/A N/A
1.3 Precedence OFFER PRECEDENCE
1.4 TradingPositionContainerID OFFER TRADEPOSCN_ID
1.5 Currency Mandatory OFFERPRICE CURRENCY
1.6 ItemUnitPrice OFFERPRICE PRICE
1.7 StartTimeStamp OFFER STARTDATE
1.8 EndTimeStamp OFFER ENDDATE
1.9 MinimumQuantity OFFER MINIMUMQUANTITY
1.10 MaximumQuantity OFFER MAXIMUMQUANTITY
1.11 QuantityUnit OFFER QTYUNIT_ID
1.12 Published OFFER PUBLISHED
1.13 PriceCustomField First occurrence OFFER FIELD1
1.13 PriceCustomField Second occurrence OFFER FIELD2
1.14 UserData N/A N/A

Behavior for OfferPrice Update:

  • The currency type (which references CURRENCY in the OFFERPRICE table) is mandatory and must be specified in ISO 4217 format.
  • The combination of the part number (which references PARTNUMBER in the CATENTRY table) and the member id (which references MEMBER_ID in the CATENTRY table) will be used to obtain a catalog entry (CATENTRY_ID). This value, along with either the precedence (PRECEDENCE) or the trade position container (TRADEPOSCN_ID), will be used to obtain a product price reference number (OFFER_ID). The product price reference number, along with the currency type, will be used as the key to update a row in the OFFERPRICE table.
  • If the product price reference number (OFFER_ID) matches an existing one in the database, but the currency type does not match a currency type for any record with that product price reference number, a new record will be created in the OFFERPRICE table. This allows you to specify prices in different currencies for the same offer.
  • If the precedence (PRECEDENCE) is not specified, then the ProductOfferPriceUpdate command locates all previous records that match the values given without the precedence. The maximum of these values is taken and incremented by one. If a previous record does not exist, then the precedence value is set to 1. A new row is inserted in the table OFFERPRICE with the new precedence value. The precedence value must be less than10>. If the maximum value has been reached, then the new update will be rejected.

ListPrice Update

The following table describes the format of the ListPrice Update variant of the Update_WCS_ProductPrice message. For a description of the database column, follow the link to its associated table. All fields are optional unless otherwise noted. The tag value length in the XML message for database fields of type INT, BIGINT and DOUBLE should be CHAR (10), CHAR(19), and CHAR(16) respectively.

Level XML Element Comment Table Name Column Name
1 ListPriceInfo N/A N/A
1.1 ProductNumberByMerchant CATENTRY PARTNUMBER
1.2 MerchantID CATENTRY MEMBER_ID
1.2.A1 type Attribute N/A N/A
1.3 Currency LISTPRICE CURRENCY
1.4 ItemUnitPrice LISTPRICE LISTPRICE
1.5 UserData N/A N/A

Behavior for ListPrice Update:

  • The command updates a record in the LISTPRICE table.
  • The partNumber, together with memberId are used to get the catalog entry key (CATENTRY_ID in table CATENTRY).
  • If the catalog entry matches an existing one in the LISTPRICE table, but the currency type does not match a currency type for any record for that catalog entry, a new record is created in the LISTPRICE table. This allows you to specify prices in different currencies for the same catalog entry.