Before you deploy recommendations to your production environment, you should test on a non-production environment to ensure that everything is working as expected.
Product Recommendations return products based on shopper-behavioral data collected from your storefront. In a non-production environment, however, it is likely you do not have any behavioral data from shoppers. The only recommendation type that you can test without behavioral data is
More like this. This recommendation type does not require any input data, as it uses a direct content similarity match.
The following recommendation types require behavioral data:
How can you test your recommendations in a non-production environment using behavioral data? There are a couple of options.
Adobe Commerce allows you to fetch recommendations from your production environment and preview them in your non-production environment by switching the SaaS data space.
To fetch recommendations from your production environment, you must make sure that:
magento/product-recommendations module to a non-production environment where the catalog data is similar to your production catalog.
Use one of the non-production Data Space IDs for configuration in the Admin.
Generate the data yourself by clicking around your storefront to mimic the behavior of actual shoppers (or create an automation script). Through your testing, you generate behavioral events on your non-production environment. Those events are used to produce the product affinities that power recommendations. For testing, Commerce suggests that you interact with the following recommendation types:
The behavioral and catalog data from the non-production SaaS Data Space identify an isolated environment in which the resulting product recommendations are based entirely on the behavioral data generated on the associated storefront.
Because you do not have large amounts of behavioral data, input data for computing product associations is sparse. However, that data is still sent to Sensei to compute the machine learning models and provide recommendations based on data you generated within this environment.