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

SaveCartAsQuote Method


SaveCartAsQuote saves the Shopping Cart (current quote record) as a quote.

Preconditions for Calling the SaveCartAsQuote Method

  • This method is invoked in the following workflows:
    • eSales - Save Cart Process
    • eSales - Edit Quote Process
    • eSales - Order Quote Process
    • eSales - Modify Order Process
    • eSales - Reorder Process
  • The field value of Quote Type for the current quote record can be Persistent Cart, Auction Quote, Quotation, or Anonymous Quote. Anonymous users cannot call SaveCartAsQuote, so only the first three quote types can be saved.

    If the quote type is Persistent Cart, SaveCartAsQuote changes the type to Quotation. Otherwise, it does not change the quote type.

Arguments for the SaveCartAsQuote Method

The SaveCartAsQuote method has the arguments shown in Table 29.

Table 29. SaveCartAsQuote Arguments
Name
Type
Data Type
Optional
Comments

Quote Name

Input

String

Y

Saves the Shopping Cart as a quote with this name.

Quote Name Field

Input

String

Y

Tells the Shopping Service which field is the quote name.

By default, it is Name if this input argument is not used.

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. To avoid stopping the workflow, you can set this input to N. This way the Shopping Service will not return an error, but instead save the error message in the output argument Error Message. You can then handle the error message as you want.

Error Message

Output

String

Y

Stores error messages.

ReturnVal

Output

String

Y

Returns Success or Fail. Not used.

Pseudo-Algorithm for SaveCartAsQuote

  1. Get the Quote business component.
  2. Get the Id of the current record in the Quote business component:

    If Id <> CurrentQuoteId profile attribute, go to step 3;

    Else go to step 4.

  3. SaveCartAsQuote is being invoked from the eSales - Edit Quote Process,
    eSales - Order Quote Process, eSales - Modify Order Process, or eSales - Reorder Process workflow. The current record in the Quote business component is the quote being acted upon, and it is not the current quote in the Shopping Cart.

    Get another instance of the Catalog business object and the Quote business component, and position the second instance of the Quote business component on the quote record as indicated by the CurrentQuoteId profile attribute. As the first instance of the Quote business component is not being acted upon, from now on Quote means the second instance of the Quote business component.

  4. Check the Quote Name input argument. Query the Quote business component to see if there is an existing record with the same name:

    If there is, go to step 5;

    Else go to step 6.

  5. Set the Error Message output argument to indicate that there is a duplicate name. Check the Return Error Code input argument:

    If Return Error Code = N, do not return an error;

    Else return an error.

  6. Set the Name field with the Quote Name input argument. Check the field value of [Quote Type]:

    If it is Persistent Cart, then change it to Quotation.

Siebel eSales Administration Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.