https://discord.gg/botpress logo
Ok figured out how to use the shopify
# 🛒shopify
q
Ok figured out how to use the shopify integratiopn and feed the LLM the full product list. Just had to filter fields out to reduce the size of the info. Have some dope ass recipes now!
w
You give to the llm all the products ? Depending on the length it can be confusing ? Ordo you mean you store the products in a table and filter the products using the table filters then feed the llm ?
q
I give it all of them due to what I’m doing, but I filter certain fields out to keep it under the token limit
w
okay interesting ^^
q
Copy code
const fieldsToInclude = ['id', 'title', 'handle', 'body_html', 'product_type']

// Helper to add full product URL
const formatProduct = (product) => {
  const picked = _.pick(product, fieldsToInclude)
  picked.url = `https://ncoliveoil.com/products/${product.handle}`
  return picked
}

// Map and format for each product category
workflow.oils = workflow.oils.productsList.map(formatProduct)
workflow.vinegars = workflow.vinegars.productsList.map(formatProduct)
workflow.seasoning = workflow.seasoning.productsList.map(formatProduct)