Get List of Products

The getCartsProducts API provides a flexible and efficient way to retrieve a tailored list of products for a specific cart, based on the cart’s Price List and business context. It supports advanced filtering, pagination, localization, and the inclusion of product attachments.

Key Parameters:

  • Pagination Controls: pagesize and offsetSize work together to navigate large catalogs efficiently, while lastRecordId enables cursor-based pagination for better performance.
  • Filtering Options: query, attributes, filters, and category allow for precise product selection based on text search, attribute values, field values, and product categories.
  • Response Customization: includeIneligible, includeAttachments, includeAttributes, and fields let you control what data is included in the response.
  • Performance Optimization: maxRecords and eaCacheKey enable efficient caching for faster repeated queries.
  • Business Rules: eaCheck and filterByPriceListOnly apply eligibility rules and price list restrictions to the returned products.

Caching Enhancement:

  • Optimized caching is available using maxRecords (max 1000) and eaCacheKey parameters, improving response times for recurring queries.
  • Both parameters must be present to enable caching.

This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the UserSecurity class with this API. See Guest User Technical Details.

For additional information, ​see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.

  • If a Simple Offer Specification is associated with a Simple Product Specification, the API returns the Min, Max, and Default cardinality from the Simple Product Specification.
  • This applies only to the response. When adding items to the cart (postCartsItems), the system enforces the stricter cardinality defined in the Simple Offer Specification, even if the response shows different values.
  • The getCartsProducts API does not support combining filters and query parameters.
  • cartId can be an Order, Opportunity, or Quote ID.

Communication (vlocity_cmt)

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

  • Resource URL: /services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/products
  • Response Format: JSON

The Availability and Eligibility Interface enhancement transforms the Communications Cloud Standard Get List of Products API into a context-aware product discovery engine. By integrating with AvailabilityInterface and EligibilityInterface, the API can dynamically filter products based on customer location, existing services, account status, and other contextual factors.

  • Context-Aware Filtering: Automatically filter products based on customer location, account details, and eligibility criteria
  • Improved User Experience: Present only relevant, actionable product options to customers and sales agents
  • Streamlined Sales Process: Reduce time spent on non-viable product configurations
  • Flexible Implementation: Implement custom business logic for availability and eligibility checks
  • Backward Compatible: Existing API behavior is preserved when context is not provided

The enhanced Get List of Products API processes requests through the following sequence:

  1. Initial Product Fetch: The API retrieves products from the catalog based on standard query parameters
  2. Availability Filtering (optional): If availability context is provided, the AvailabilityInterface filters products based on location or service availability
  3. Eligibility Filtering (optional): If eligibility context is provided, the EligibilityInterface filters products based on account status, existing services, or business rules
  4. Response: The API returns the final, contextually filtered product list