Skip to main content
This page does not apply to installs made in 2025 or later of the Depict Shopify apps
Add the following to the beginning of the file where you want to use the fetchDepictRecommendations function:
import { fetchDepictRecommendations } from "@depict-ai/js-ui";
import { useFetchRecommendations } from "@depict-ai/react-ui";

// Then, in your component where you want to use fetchRecommendations:
const { fetchRecommendations } = useFetchRecommendations();
// You don't have to specify `merchant` and `market` to the `fetchRecommendations` function that you get from `useFetchRecommendations`.
// Since that will be taken from the provider automatically.