PrestaShop Product
PrestaShop Product connects your flow to your PrestaShop store’s catalogue. With it you can get the list of products or one specific product, create new products with their price, stock, category and image, change a product’s details, and delete it.
It is useful when your product data also lives somewhere else, such as a spreadsheet, a supplier or a management system, and you want the store to stay up to date without entering it by hand.
When to use it
- A supplier sends you a list of new products every week and you want to add them to the store.
- Your management system changes a product’s price or stock and you want PrestaShop to reflect it.
- An AI agent helps customers and needs to look up a product’s price or description.
- Every month you want a list of the products in a category so you can review them.
- A product is discontinued and you want to remove it from the catalogue.
Configuration
You need a PrestaShop credential with your store’s address and a PrestaShop web service key. You create the key in the PrestaShop admin panel, under Advanced Parameters > Webservice, by enabling the web service and giving the key access to products, categories and stock. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The PrestaShop credential used to access your store. |
| Operation | What the component does. See Operations. Default: Get Products. |
| Query Type | Only in Get Products. List returns a list of products; By ID returns one specific product. Default: List. |
| Product ID | The product’s number in PrestaShop. Required in Get Products with By ID, Update Product and Delete Product. |
| Max Results | Only in Get Products with List. The maximum number of products to return. Default: 10. |
| Filter by Category | Only in Get Products with List. Returns only the products whose main category is the one you choose. The list of categories loads when you choose the credential. |
| Product Name | Only in Create Product and Update Product. The product’s name. Required when creating. |
| Description | Only in Create Product and Update Product. The product’s description. |
| Price | Only in Create Product and Update Product. The product’s price, for example 19.90. Required when creating. |
| Quantity | Only in Create Product and Update Product. The product’s stock. Default: 0. In Update Product, 0 leaves the current stock unchanged. |
| Category | Only in Create Product and Update Product. The product’s main category. The list loads when you choose the credential. |
| Active | Only in Create Product and Update Product. Whether the product is visible in the store. Default: on. |
| Reference (SKU) | Only in Create Product and Update Product. The product’s reference or code. |
| Image URL | Only in Create Product and Update Product. Public address of a JPG or PNG image. The image is downloaded and added to the product. |
Operations
| Operation | What it does |
|---|---|
Get Products | Returns a list of products (List) or the details of one product (By ID). |
Create Product | Creates a new product with the details you set and, if you fill them in, its stock and image. |
Update Product | Changes an existing product’s details. The name, description, price, reference and image only change if you fill them in. |
Delete Product | Deletes the product with that number. |
Output
The Data output depends on the operation:
Get ProductswithList: one item per product with its number, name, price, whether it is active, reference and description.Get ProductswithBy ID: the same details plus the stock and the IDs of its images.Create ProductandUpdate Product: a confirmation with the product number, the stock and a message that says whether the image was uploaded.Delete Product: a confirmation with the number of the deleted product.
You can connect the result to a spreadsheet, an email or an agent. The component can also be connected to an Agent as a tool, so the agent looks up or changes products when it needs to. See Tool Mode.
Example
An office supplies store adds the new products its supplier sends.
- The flow reads each row of the supplier’s spreadsheet with the name, price, stock and photo.
- Add PrestaShop Product with the
Create Productoperation and the store’s PrestaShop credential. - Connect the name to Product Name, the price to Price, the stock to Quantity and the photo address to Image URL.
- Choose the
Stationerycategory in Category and leave Active on. - Save the Product ID from the output in the spreadsheet so you can update the product later.
Good practices
- Write the price with a dot as the decimal separator, for example
19.90. - The image must be at a public address: if you need to sign in to see it, it cannot be added.
- Keep the number of every product you create. You need it to update or delete the product.
Related components
- PrestaShop Category: manage the catalogue’s categories.
- PrestaShop Order: look up orders and change their status.
- PrestaShop Customer: manage the store’s customers.