Example use case of Cataloglake

1. Create Cataloglake

First step is to create a Cataloglake in which we can store the products

# Initialize Groclake catalog instance
cataloglake = CatalogLake()

groclake_catalog = cataloglake.create()
print("catalog_create----", groclake_catalog)

Output

catalog_create---- {'cataloglake_id': '2739542733'}

2. Generate product data using image

Here as an example we take an image of the product using a image url and then generate a metadada rich product using the image only We can also take a local image and use the base64 encoded format of that image

product_create_request = {
    "product_name_hint": "Nightsuit Shirt And Pants",
    "category_name_hint": "Nightsuit",
    "provider_name_hint": "Breathables",
    "images": [
        {
            "image_name": "Nightsuit image",
            "image_url": "https://cdnaz.plotch.io/image/upload/C/V/PLOVqkPpi21729804127_df022e0a1fe58015a2c80ed0229cc5d1735c5812de5d9218b030c0c6414a457d.png?product_id=1153906002&s=1"
        }
    ]
}

groclake_create_product = cataloglake.gen(product_create_request)
print("gen data",  groclake_create_product)

Output

3. Fetch products from cataloglake

Now we can fetch the products from cataloglake. We can use multiple filters to fetch or no filters to fetch all which is controlled by page_size (number of products to fetch) and page_number (which is used to move to next page)

Output

4. Cache products in cataloglake

Now to enable search and recommendation operations on cataloglake, we need to cache index the products stored in cataloglake. This caching helps in reducing latency of search results and build conversational capabilities on your catalog

Output

5. Search products in cataloglake

Now suppose you want to search for a product like a "Belt" in the catalog using semantic search. Here's how you can do it:

Output

6. Build Recommendation Systems in Cataloglake

You want to recommend similar products based on a specific item, like "Headphone," to improve user engagement or offer alternatives in an e-commerce catalog.

Output

7. Push Products to Shopify

Cataloglake allows products housed there to be pushed to platforms like Shopify

  1. List item

  2. List item

Output

8. Deleting items from catalog

Suppose your e-commerce platform no longer offers a product, and you need to remove it from the catalog to ensure the inventory remains current. Using catalog.delete(), you can seamlessly delete the item by specifying its groc_item_id.

Output

Last updated