Siebel eSales Administration Guide > Shopping Service API > Workflow Methods >

MoveToCart


MoveToCart moves a quote record into the Shopping Cart. By doing this, it sets the CurrentQuoteId profile attribute to the quote record ID. It also sets the Price List Id field value of this quote to the current price list for the session as indicated by the PriceListId profile attribute, for users associated with an account that has a default price list, and by DefaultPriceListId for users who are not associated with such an account. This will trigger a reprice if the price list for this quote has been changed.

In addition, if the field value of Quote Type is not Auction Quote, it will change the quote type to Persistent Cart if the application supports persistent Shopping Carts. For applications that do not support Shopping Carts, the Shopping Service will not change the quote type.

Expected Preconditions Before the Method Can Be Called

Arguments

The MoveToCart method has the arguments shown in Table 55.

Table 55. MoveToCart Arguments
Name
Type
Data Type
Optional
Comments
Quote Id
Input
String
Y
Not used.
ReturnVal
Output
String
Y
Returns Success or Fail. Not used.

Pseudo-Algorithm

  1. Set the CurrentQuoteId profile attribute to the quote record ID. As the MoveToCart method is row-sensitive, the current record in the Quote business component is the record to move to the Shopping Cart.
  2. If the PriceListId profile attribute is not empty and if the Price List Id field in this quote record <> PriceListId profile attribute, then change the Price List Id for this quote. This triggers a reprice. Note that you need to use DefaultPriceListId instead of PriceListId if the user is not associated with an account that has a default price list.
  3. If Quote Type is not Persistent Cart or Auction Quote, change it to Persistent Cart.

 Siebel eSales Administration Guide 
 Published: 18 April 2003