Siebel eSales Administration Guide > Shopping Service Methods Reference > Siebel eSales User Action Methods >

AddToFavoriteList Method


This method is invoked to add items to the Favorites list.

Preconditions for Calling the AddToFavoriteList Method

When calling this method, you need to make sure the business components that are shown in Table 21 are in the business object, using the Catalog business object as an example.

Table 21. Necessary Business Components in the Business Object
Business Component
Link
Comment

Internal Product by Price List Optional

 

Product business component used in Siebel eSales.

Internal Product by Price List Optional 2

Catalog Category/Internal Product by Price List Optional 2

Business component used in product list applet.

Favorite List

 

Favorite List business component.

Favorite List Item

Favorite List/Favorite List Item

Favorite List Item business component.

Arguments for the AddToFavoriteList Method

The AddToFavoriteList method has the arguments shown in Table 22.

Table 22. AddToFavoriteList Arguments
Name
Type
Data Type
Optional
Comments

Action

Input

String

Y

Equals AddToFavoriteList.

Product Id

Input

String

Y

If this input is not empty, add the product specified by this ID to the Favorites list.

Otherwise, assume the current record in the current business component is the item to add to the Favorites list.

GotoView

Input

String

Y

If this input is not empty, AddToFavoriteList navigates to this view after completing the AddToFavoriteList action.

ReturnVal

Output

String

Y

Returns Success or Fail. Not used.

Pseudo-Algorithm for AddToFavoriteList

  1. If the user is an anonymous user, End.
  2. Get the Favorite List and Favorite List Item business components.
  3. Query the Favorite List business component with the search specification [Person Id] = LoginId;

    If there is a existing record, go to step 4;

    Else create a new record and set [Person Id] to current login ID.

  4. Query the Favorite List Item business component with the search specification [Product Id] = input product ID;

    If there is an existing record, go to step 5;

    Else create a new record and set [Product Id] to input product ID.

  5. If GotoView input argument is not empty, navigate to the specified view and End;

    Else check the Favorite List View user property in the Shopping Service business service:

    If this value is empty, End;

    Else navigate to this view and End.

Siebel eSales Administration Guide Copyright © 2007, Oracle. All rights reserved.