Newer Version Available
CommerceWishlist Class
Namespace
CommerceWishlist Methods
addItemToWishlist(webstoreId, wishlistId, wishlistItemInput)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistItem addItemToWishlist(String webstoreId, String wishlistId, ConnectApi.WishlistItemInput wishlistItemInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- wishlistId
- Type: String
- ID of the wishlist.
- wishlistItemInput
- Type: ConnectApi.WishlistItemInput
- A ConnectApi.WishlistItemInput body with the item to add to the wishlist.
Return Value
Type: ConnectApi.WishlistItem
Usage
This method respects buyer View Product entitlements and only users entitled to view product data can access it.
addItemToWishlist(webstoreId, effectiveAccountId, wishlistId, wishlistItemInput)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistItem addItemToWishlist(String webstoreId, String effectiveAccountId, String wishlistId, ConnectApi.WishlistItemInput wishlistItemInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistId
- Type: String
- ID of the wishlist.
- wishlistItemInput
- Type: ConnectApi.WishlistItemInput
- A ConnectApi.WishlistItemInput body with the item to add to the wishlist.
Return Value
Type: ConnectApi.WishlistItem
Usage
This method respects buyer View Product entitlements and only users entitled to view product data can access it.
addWishlistToCart(webstoreId, wishlistId)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistToCartResult addWishlistToCart(String webstoreId, String wishlistId)
Return Value
Usage
This method respects buyer View Product entitlements and only users entitled to view product data can access it.
addWishlistToCart(webstoreId, wishlistId, effectiveAccountId)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistToCartResult addWishlistToCart(String webstoreId, String wishlistId, String effectiveAccountId)
Parameters
Return Value
Usage
This method respects buyer View Product entitlements and only users entitled to view product data can access it.
addWishlistToCartWithCartId(webstoreId, wishlistId, cartId)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistToCartResult addWishlistToCartWithCartId(String webstoreId, String wishlistId, String cartId)
Parameters
Return Value
Usage
This method respects buyer View Product entitlements and only users entitled to view product data can access it.
addWishlistToCartWithCartId(webstoreId, wishlistId, cartId, effectiveAccountId)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistToCartResult addWishlistToCartWithCartId(String webstoreId, String wishlistId, String cartId, String effectiveAccountId)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- wishlistId
- Type: String
- ID of the wishlist.
- cartId
- Type: String
- ID of the cart. If null, wishlist items are added to the active cart.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
Return Value
Usage
This method respects buyer View Product entitlements and only users entitled to view product data can access it.
createWishlist(webstoreId, wishlistInput)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.Wishlist createWishlist(String webstoreId, ConnectApi.WishlistInput wishlistInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- wishlistInput
- Type: ConnectApi.WishlistInput
- A ConnectApi.WishlistInput body that includes the wishlist name and items.
Return Value
Type: ConnectApi.Wishlist
createWishlist(webstoreId, effectiveAccountId, wishlistInput)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.Wishlist createWishlist(String webstoreId, String effectiveAccountId, ConnectApi.WishlistInput wishlistInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistInput
- Type: ConnectApi.WishlistInput
- A ConnectApi.WishlistInput body that includes the wishlist name and items.
Return Value
Type: ConnectApi.Wishlist
deleteWishlist(webstoreId, effectiveAccountId, wishlistId)
API Version
51.0
Requires Chatter
No
Signature
public static Void deleteWishlist(String webstoreId, String effectiveAccountId, String wishlistId)
Parameters
Return Value
Type: Void
getWishlist(webstoreId, effectiveAccountId, wishlistId, productFields, sortItemsBy)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.Wishlist getWishlist(String webstoreId, String effectiveAccountId, String wishlistId, String productFields, ConnectApi.WishlistItemSortOrder sortItemsBy)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistId
- Type: String
- ID of the wishlist.
- productFields
- Type: String
- Comma-separated list of custom product fields. Fields aren’t case-sensitive. For example, ProductCode and productcode return the same results.
- sortItemsBy
- Type: ConnectApi.WishlistItemSortOrder
- Sort order for wishlist items.
Values are:
- CreatedDateAsc—Sorts by oldest creation date.
- CreatedDateDesc—Sorts by most recent creation date.
The default sort order is CreatedDateDesc.
Return Value
Type: ConnectApi.Wishlist
getWishlist(webstoreId, effectiveAccountId, wishlistId, productFields, pageSize, sortItemsBy)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.Wishlist getWishlist(String webstoreId, String effectiveAccountId, String wishlistId, String productFields, Integer pageSize, ConnectApi.WishlistItemSortOrder sortItemsBy)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistId
- Type: String
- ID of the wishlist.
- productFields
- Type: String
- Comma-separated list of custom product fields. Fields aren’t case-sensitive. For example, ProductCode and productcode return the same results.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default size is 25.
- sortItemsBy
- Type: ConnectApi.WishlistItemSortOrder
- Sort order for wishlist items.
Values are:
- CreatedDateAsc—Sorts by oldest creation date.
- CreatedDateDesc—Sorts by most recent creation date.
The default sort order is CreatedDateDesc.
Return Value
Type: ConnectApi.Wishlist
getWishlistItems(webstoreId, effectiveAccountId, wishlistId, productFields, pageParam, sortItemsBy)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistItemCollection getWishlistItems(String webstoreId, String effectiveAccountId, String wishlistId, String productFields, String pageParam, ConnectApi.WishlistItemSortOrder sortItemsBy)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistId
- Type: String
- ID of the wishlist.
- productFields
- Type: String
- Comma-separated list of custom product fields. Fields aren’t case-sensitive. For example, ProductCode and productcode return the same results.
- pageParam
- Type: String
- Specifies the page token to use to view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.
- sortItemsBy
- Type: ConnectApi.WishlistItemSortOrder
- Sort order for wishlist items.
Values are:
- CreatedDateAsc—Sorts by oldest creation date.
- CreatedDateDesc—Sorts by most recent creation date.
The default sort order is CreatedDateDesc.
Return Value
getWishlistItems(webstoreId, effectiveAccountId, wishlistId, productFields, pageParam, pageSize, sortItemsBy)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistItemCollection getWishlistItems(String webstoreId, String effectiveAccountId, String wishlistId, String productFields, String pageParam, Integer pageSize, ConnectApi.WishlistItemSortOrder sortItemsBy)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistId
- Type: String
- ID of the wishlist.
- productFields
- Type: String
- Comma-separated list of custom product fields. Fields aren’t case-sensitive. For example, ProductCode and productcode return the same results.
- pageParam
- Type: String
- Specifies the page token to use to view a page of information. Page tokens are returned as part of the response class, such as currentPageToken or nextPageToken. If you pass in null, the first page is returned.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 200. If you pass in null, the default size is 25.
- sortItemsBy
- Type: ConnectApi.WishlistItemSortOrder
- Sort order for wishlist items.
Values are:
- CreatedDateAsc—Sorts by oldest creation date.
- CreatedDateDesc—Sorts by most recent creation date.
The default sort order is CreatedDateDesc.
Return Value
getWishlistSummaries(webstoreId, effectiveAccountId, includeDisplayedList)
API Version
49.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistsSummary getWishlistSummaries(String webstoreId, String effectiveAccountId, Boolean includeDisplayedList)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- includeDisplayedList
- Type: Boolean
- Specifies whether to include the displayed list (true) or not (false). If null, defaults to false.
Return Value
getWishlistSummaries(webstoreId, effectiveAccountId, includeDisplayedList, productFields, sortItemsBy)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistsSummary getWishlistSummaries(String webstoreId, String effectiveAccountId, Boolean includeDisplayedList, String productFields, ConnectApi.WishlistItemSortOrder sortItemsBy)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- includeDisplayedList
- Type: Boolean
- Specifies whether to include the displayed list (true) or not (false).
- productFields
- Type: String
- Comma-separated list of custom product fields. Fields aren’t case-sensitive. For example, ProductCode and productcode return the same results.
- sortItemsBy
- Type: ConnectApi.WishlistItemSortOrder
- Sort order for wishlist items.
Values are:
- CreatedDateAsc—Sorts by oldest creation date.
- CreatedDateDesc—Sorts by most recent creation date.
Return Value
getWishlistSummaries(webstoreId, effectiveAccountId, includeDisplayedList, productFields, pageSize, sortItemsBy)
API Version
51.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistsSummary getWishlistSummaries(String webstoreId, String effectiveAccountId, Boolean includeDisplayedList, Integer pageSize, String productFields, pageSize, ConnectApi.WishlistItemSortOrder sortItemsBy)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- includeDisplayedList
- Type: Boolean
- Specifies whether to include the displayed list (true) or not (false).
- productFields
- Type: String
- Comma-separated list of custom product fields. Fields aren’t
case-sensitive. For example, ProductCode and
productcode return the same
results.
If includeDisplayedList is false, productFields is ignored.
- pageSize
- Type: Integer
- Specifies the number of items per page. Valid values are from 1 through 100. If you pass in null, the default size is 25.
- sortItemsBy
- Type: ConnectApi.WishlistItemSortOrder
- Sort order for wishlist items.
Values are:
- CreatedDateAsc—Sorts by oldest creation date.
- CreatedDateDesc—Sorts by most recent creation date.
The default sort order is CreatedDateDesc.
If includeDisplayedList is false, sortItemsBy is ignored.
Return Value
removeWishlistItem(webstoreId, effectiveAccountId, wishlistId, wishlistItemId)
API Version
49.0
Requires Chatter
No
Signature
public static Void removeWishlistItem(String webstoreId, String effectiveAccountId, String wishlistId, String wishlistItemId)
Parameters
Return Value
Type: Void
updateWishlist(webstoreId, wishlistId, wishlistUpdateInput)
API Version
50.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistSummary updateWishlist(String webstoreId, String wishlistId, ConnectApi.WishlistUpdateInput wishlistUpdateInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- wishlistId
- Type: String
- ID of the wishlist.
- wishlistUpdateInput
- Type: ConnectApi.WishlistUpdateInput
- A ConnectApi.WishlistUpdateInput body with the wishlist name to update.
Return Value
updateWishlist(webstoreId, effectiveAccountId, wishlistId, wishlistUpdateInput)
API Version
50.0
Requires Chatter
No
Signature
public static ConnectApi.WishlistSummary updateWishlist(String webstoreId, String effectiveAccountId, String wishlistId, ConnectApi.WishlistUpdateInput wishlistUpdateInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the account for which the request is made. If null, defaults to the account ID for the context user.
- wishlistId
- Type: String
- ID of the wishlist.
- wishlistUpdateInput
- Type: ConnectApi.WishlistUpdateInput
- A ConnectApi.WishlistUpdateInput body with the wishlist name to update.