Similar Products
The Similar Products feature allows the storefront to proactively suggest alternatives to a customer based on a hybrid similarity score. This score is calculated using product attributes (category, material, fit) and image similarity.
Core Logic & Scoring
- Hybrid Approach: SCAYLE Storefront API combines attribute matching with k-NN (k-nearest neighbors) vector search for images.
- Pre-defined Suggestions: Any products manually defined in the SCAYLE Panel as "suggested" will always appear at the beginning of the list, followed by calculated results.
- Availability Guardrails: Products that are sold out or inactive are automatically excluded from the slider, even if they were manually pre-defined.
Frontend Integration Use Cases
By utilizing the where parameter in the useSimilarProducts composable, you can implement different "flavors" of similarity to match specific merchandising goals: