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

ValidQuote


ValidQuote is called in the eSales - Checkout Process workflow to validate the line items in the Shopping Cart. Valid line items are those that do not have an empty Base Price field in the Quote Item business component.

ValidQuote sets the Invalid output argument to Y if there are any line items that are invalid, and also sets Invalid Flag field for each line item that is invalid. The Invalid Flag field is a virtual field in the Quote Item business component that is persistent in the session.

Expected Preconditions Before the Method Can Be Called

Arguments

The ValidQuote method has the arguments shown in Table 48.

Table 48. ValidQuote Arguments
Name
Type
Data Type
Optional
Comments
Return Error Code
Input
String
Y
If equal to N, the method will not return errors.
When a method returns an error, the workflow stops. In order not to kill the workflow, you can set this input to N. This way the Shopping Service will not return an error, but instead will save the error message in the output argument Error Message. You can then handle the error message as you wish.
Error Message
Output
String
Y
Stores error messages.
Invalid
Output
String
Y
Returns Y if there are any invalid items in the Shopping, Cart. Else returns N.
Quote Id
Input
String
Y
Not used.
ReturnVal
Output
String
Y
Returns Success or Fail. Not used.

Pseudo-Algorithm

  1. Get the Quote and Quote Item business component. Create a variable invalidFlag=N.
  2. For each record in the Quote Item business component, check the Base Price field:
  3. If this field is empty, set invalidFlag = Y and set the Invalid Flag field = Y for that record.

  4. Set the Invalid output argument = invalidFlag.
  5. Set the Error Message output argument if there is any error;
  6. If Return Error Code = N, do not return an error;

    Else return an error.


 Siebel eSales Administration Guide 
 Published: 18 April 2003