Guide
Query Functions
1min
query functions are basic building blocks of requests to klevu backend any amount of them can be placed inside a klevufetch function as parameters it is recommended to use multiple query functions inside klevufetch instead of multiple klevufetch functions here is list of query functions available full listing with code reference can be found from @klevu/core reference klevu function description type search() most basic query to find items based on a term search suggestions() fetches suggestions based on a term search trendingproducts() find all products that are trending right now in results search categorymerchandising() products to display on category page search searchcategory() search categories based on term search searchcms() search cms pages based on term search products() fetches products by id from klevu search raw() write raw request to klevu api for expert use search recentlyviewedproducts() list of products user has recently viewed search kmcrecommendation() fetches predefined recommendation by id from kmc and creates query automatically recommendation newarrivals() recommendation list of new arrivals for the current user recommendation trendingcategoryproducts() trending recommendation based for current user recommendation similarproducts() fetch similar products based on given ids recommendation alsoviewed() product recommendations what user should also check out recommendation boughtogether() on checkout page check what products are recommended to current cart products recommendation