--- title: Using Dynamic Navigation Experience (DNE) in Coveo for Commerce slug: m2na0333 canonical_url: https://docs.coveo.com/en/m2na0333/ collection: coveo-for-commerce source_format: adoc --- # Using Dynamic Navigation Experience (DNE) in Coveo for Commerce ![DNE in action](https://docs.coveo.com/en/assets/images/leverage-machine-learning/dynamic-navigation-experience.gif) [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [Dynamic Navigation Experience (DNE)](https://docs.coveo.com/en/2907/) [models](https://docs.coveo.com/en/1012/) leverage [Coveo Analytics events](https://docs.coveo.com/en/260/) to pertinently order [facets](https://docs.coveo.com/en/198/) and [facet](https://docs.coveo.com/en/198/) values. More precisely, DNE [models](https://docs.coveo.com/en/1012/) analyze [queries](https://docs.coveo.com/en/231/) and actions performed by previous users (for example, clicked results and [facet](https://docs.coveo.com/en/198/) selections) to make the most relevant [facets](https://docs.coveo.com/en/198/) appear at the top for a given query. Coveo ML DNE [models](https://docs.coveo.com/en/1012/) also reorder [facet](https://docs.coveo.com/en/198/) values within a given [facet](https://docs.coveo.com/en/198/) to make the most popular values appear at the top. To do so, the models use the actions performed by previous users who have selected certain [facet](https://docs.coveo.com/en/198/) values for a specific query. Furthermore, Coveo ML DNE offers a [facet value autoselection feature](#about-the-autoselection-feature) that improves the user experience by automatically selecting [facet](https://docs.coveo.com/en/198/) values. A Coveo ML DNE [model](https://docs.coveo.com/en/1012/) uses its facet value ranking to boost search results. The model uses the most popular facet values​ for a certain query and applies [query ranking expressions (QREs)](https://docs.coveo.com/en/1472/) to boost the search results whose [field](https://docs.coveo.com/en/200/) values match the values of those [facets](https://docs.coveo.com/en/198/). > **Important** > > A [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [Dynamic Navigation Experience (DNE)](https://docs.coveo.com/en/2907/) [model](https://docs.coveo.com/en/1012/) requires dynamic facets. > If your search interface uses the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/), [DNE](https://docs.coveo.com/en/2907/) doesn't support regular facets. > For more information, see [Configure dynamic facets in your search interface](https://docs.coveo.com/en/2918/). Members with the [required privileges](https://docs.coveo.com/en/3396#required-privileges) can [create, manage](https://docs.coveo.com/en/3396/), and [deploy a DNE model](https://docs.coveo.com/en/2918/). **Example** You're selling smartphones on your site. Before enabling Coveo ML DNE, your search page, powered by the [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187/), displays [facets](https://docs.coveo.com/en/198/) in the following order when customers search for `cellphone`: * Screen size * Storage capacity * Price * Brand You enable a Coveo ML DNE model. When your [search interface](https://docs.coveo.com/en/2741/) sends a query to the Search API to request [facets](https://docs.coveo.com/en/198/), the DNE model modifies that query in the query pipeline. It applies insights gained from the analysis of past customer behavior and determines that users are most likely to sort search results using the **Brand** and **Price** facets. Your search page now displays facets in the following order: * Brand * Price * Screen size * Storage capacity Before enabling Coveo ML DNE, the **Brand** facet displayed its facet values in the following order when customers searched for `cellphone`: * LG * Samsung * Apple You enable a Coveo ML DNE model. When your [search interface](https://docs.coveo.com/en/2741/) sends a query to the Search API to request facets, the DNE model modifies that query in the query pipeline. It applies insights gained from the analysis of past customer behavior and determines that users are most likely to search for **Apple** and **Samsung** smartphones rather than for **LG** devices. The JavaScript Search Framework now displays the facet values within the **Brand** facet in the following order: * Apple * Samsung * LG Since the Coveo ML DNE model determined that customers are more likely to shop for Apple phones, the model modifies the user query to boost Apple phone result list items. ## About the autoselection feature It's possible to activate the [DNE autoselection feature](https://docs.coveo.com/en/3396#facet-autoselect-section) in your Coveo-powered interfaces. To use this feature, you only need to specify which facets to apply the feature on when you create your DNE model. For a given query, the DNE autoselection feature can automatically select the most relevant facet value from the returned facets. To do so, the feature learns from your end-users' behaviors to understand which facet values are the most relevant. **Example** For a Coveo-powered clothing commerce interface, a Coveo administrator created a DNE model and chose to enable the autoselection feature for the `category` and `gender` facets when [configuring the model](https://docs.coveo.com/en/3396/). When accessing the commerce interface, a customer searches for a `skirt`. Based on the current [context](https://docs.coveo.com/en/1345/) and recorded usage analytics [data](https://docs.coveo.com/en/259/), the model determines that the `Skirts and Dresses` value of the `Category` facet and the `Women` value of the `gender` facet are relevant enough to be automatically selected and refine the user query. ![example of DNE autoselection](https://docs.coveo.com/en/assets/images/leverage-machine-learning/dne-autoselect-example.gif) ## About the Facet Generator feature As a complement to your DNE model, the Facet Generator displays the best facets for your [search interface](https://docs.coveo.com/en/2741/). It works right away, without any training, and is ideal for commerce scenarios. See [About the Facet Generator](https://docs.coveo.com/en/n9sd0159/) for details. ## Prerequisites To leverage Coveo ML DNE in your Coveo for Commerce implementation, make sure that: * The search interface where you want to integrate the model logs click events (see [Log commerce events](https://docs.coveo.com/en/3188/)). * If your Coveo for Commerce implementation targets the Search API to handle search queries, the interface where you want to integrate the model [logs search events](https://docs.coveo.com/en/n7o80165/). ** If you're targeting the Commerce API to handle search queries, as well as the [Event Protocol](https://docs.coveo.com/en/o9je0592/) to log events, search events are automatically logged using the information of the API request. ** If you're using the Commerce API to handle search queries, but use the Coveo UA Protocol to log events, the interface where you want to integrate the model must [log search events](https://docs.coveo.com/en/n7o80165/). * You use a [tracking ID](https://docs.coveo.com/en/o8rb0139/) to identify the [storefront](https://docs.coveo.com/en/p33g0410/) where you want to integrate the model. ## Model creation When creating a DNE model for Coveo for Commerce, you must ensure that the model is configured to learn from the data of the [storefront](https://docs.coveo.com/en/p33g0410/) where it's deployed. . [Create a DNE model](https://docs.coveo.com/en/3396/). . Once you created the model, [configure learning filters](#configure-learning-filters) to ensure that the model only uses the data that's relevant to the website on which it's deployed. ### Configure learning filters When using DNE [models](https://docs.coveo.com/en/1012/) for a Coveo for Commerce [organization](https://docs.coveo.com/en/185/), you must configure learning filters to ensure that the model only uses the data that's relevant to the website on which it's deployed. To configure learning filters: . Once you've created your model, access the [**Models**](https://platform.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/ai-and-ml/models/)) page. . Click the desired model, and then click **More** > **Edit JSON** in the Action bar. . In **Edit a Model JSON Configuration**, add the following `commonFilter` object: ```json "commonFilter": "(trackingId=@'')" ``` Where you replace `` with the [tracking ID](https://docs.coveo.com/en/o8rb0139/) (registered as properties in your Coveo organization) defined for the website on which you want to use the model. . Click **Save**. **Example** If you have a model that you want to use on a website for which the registered [tracking ID](https://docs.coveo.com/en/o8rb0139/) is `barca_sports_us`, your JSON configuration should look like this: ```json { "modelDisplayName": "Barca Sports US - DNE", "exportPeriod": "P3M", "intervalTime": 1, "intervalUnit": "WEEK", "commonFilter": "(trackingId=@'barca_sports_us')", "exportOffset": "PT0S", "extraConfig": {} } ``` ## What's next? Once you've created and configured your DNE model, you must [associate it](https://docs.coveo.com/en/l1qf4156/) with the [query pipeline](https://docs.coveo.com/en/180/) [that was created](https://docs.coveo.com/en/o48e0216#storefront-associations-and-query-pipelines) for the Search product discovery solution.