Approaches for building product discovery interfaces

This is for:

Developer

Coveo provides a number of libraries and REST APIs to build your Commerce product discovery solutions. Choosing the right library or REST API depends on your business needs, desired performance, and complexity.

Diagram showing where how the different libraries and REST APIs fit in the Coveo Commerce ecosystem

Headless library

The Coveo Headless library is a Redux-based toolset for developing your own UI component libraries. It provides the underlying functionality of the Atomic library without tying that functionality to a specific UI implementation.

We strongly recommend that you use the Headless library rather than work directly with the REST APIs, as Headless abstracts their complexity and provides a more developer-friendly interface.

For more information, see Headless for commerce.

Atomic library

Important

Atomic for Commerce components are in open beta and remain under active development.

Atomic for Commerce hasn’t yet gone through a formal accessibility review. If you have accessibility needs, contact your Account Manager and we’ll work with you to address them.

The Coveo Atomic library is a collection of pre-built UI components meant to quickly create product discovery interfaces. You can theme and customize the Atomic components to suit your needs. Under the hood, Atomic relies on the Coveo Headless library to interface with Coveo and handle the application state.

For more information, see Use the Atomic Library and Atomic for commerce.

Tip

Create an Atomic search interface project with npm create @coveo/ui. The generated search or commerce interface runs immediately against sample content, with no configuration or authentication required. Then, follow the project-generation instructions and the implementation guide to connect the interface to your own organization and prepare it for production.

The search interface builder, which uses Atomic, is also an ideal codeless alternative for creating simple interfaces for testing or demonstrations.

REST APIs

The Coveo Commerce REST APIs are a set of APIs that allow you to interact with the Coveo Platform.

These APIs offer the most flexibility for interacting with the Coveo Platform, though they require more development effort and can be more challenging to use than Headless or Atomic.

To implement your product discovery solution using the REST APIs, you need to send requests to the following APIs:

  • Commerce API: This API allows you to query the Coveo Platform for products.

  • Event API: This API allows you to log commerce events using the Event Protocol.

Combining libraries

Atomic for commerce and Headless for commerce aren’t mutually exclusive. Atomic components are built on Headless, so both libraries read and write the state of the same commerce engine. A single implementation can use Atomic components for most of a storefront and Headless controllers for the pieces Atomic doesn’t cover, such as a cart or a product detail page. The commerce-hybrid sample demonstrates this approach with a Headless search box, cart, and product page in an Atomic storefront.

Depending on how much control you need over a given part of your interface, you can customize, compose around, extend, or replace individual Atomic components.