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 20 are in the business object, using the Catalog business object as an example.
Table 20. Necessary Business Components in the Business Object
|
|
|
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 21.
Table 21. AddToFavoriteList Arguments
|
|
|
|
|
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
- If the user is an anonymous user, End.
- Get the Favorite List and Favorite List Item business components.
- 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.
- 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.
- 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.
|