It is not that difficult, first add a ir.filters object or an ir.actions.server . This contains the real filter. (I'm using an existing example here)
The currently existing filters are stored in the website_sale module in the data folder.
id="dynamic_snippet_newest_products_filter" model="ir.filters">
name="name">Newest Products
name="model_id">product.product
name="user_id" eval="False" />
name="domain">[('website_published', '=', True)]
name="context">{'display_default_code': False, 'add2cart_rerender': False}
name="sort">['create_date desc']
name="action_id" ref="website.action_website"/>
If necessary you can add python code eg:
id="dynamic_snippet_latest_sold_products_action" model="ir.actions.server">
name="name">Recently Sold Products
name="model_id" ref="model_product_product"/>
name="state">code
name="code">
DynamicFilter = model.env['website.snippet.filter']
response = DynamicFilter._get_products('latest_sold', model.env.context)
Then add a website.snippet.filter eg:
id="dynamic_filter_newest_products" model="website.snippet.filter">
name="filter_id" ref="website_sale.dynamic_snippet_newest_products_filter"/>
name="field_names">display_name,description_sale,image_512,price:monetary
name="limit" eval="16"/>
name="name">Newest Products
or with an action:
id="dynamic_filter_latest_sold_products" model="website.snippet.filter">
name="action_server_id" ref="website_sale.dynamic_snippet_latest_sold_products_action"/>
name="field_names">display_name,description_sale,image_512,price:monetary
name="limit" eval="16"/>
name="name">Recently Sold Products
Voila, you have your new filters available on the website product carousel :-)