[{"name": "Snacks and Treats Merchandising Rules", "rules": [{"name": "Apply Category and Brand Shares", "params": {"level": "category", "source": "database"}, "children": [], "block_type": "apply_share_of_shelf"}, {"name": "Apply Brand Shares within Categories", "params": {"level": "brand", "source": "database"}, "children": [], "block_type": "apply_share_of_shelf"}, {"name": "Group by Category", "params": {"attribute": "category"}, "children": [{"name": "Group by Brand within Category", "params": {"attribute": "brand"}, "children": [{"name": "Sort by SKU Rating", "params": {"order": "desc", "direction": "left_to_right", "attributes": ["sku_rating"]}, "children": [{"name": "Single Facing per SKU", "params": {"count": 1, "condition": "exact"}, "children": [], "block_type": "set_facing"}, {"name": "Duplicate Top Rated SKUs", "params": {"limit": 10, "based_on": "rating"}, "children": [], "block_type": "duplicate_sku"}], "block_type": "sort"}], "block_type": "group_by"}, {"name": "Vertical Sort by Size", "params": {"if": {"type": "OR", "clauses": [{"value": 0, "operator": "gt", "attribute": "weight_kg"}, {"value": 0, "operator": "gt", "attribute": "volume_l"}]}, "else": [], "then": [{"name": "Sort Small to Large Top to Bottom", "params": {"order": "asc", "direction": "top_to_bottom", "attributes": ["weight_kg", "volume_l"]}, "children": [], "block_type": "sort"}]}, "children": [], "block_type": "conditional_logic"}, {"name": "Horizontal Sort by Price", "params": {"order": "desc", "direction": "left_to_right", "attributes": ["price"]}, "children": [], "block_type": "sort"}], "block_type": "group_by"}, {"name": "Domestic Products Preference", "params": {"condition": {"type": "AND", "clauses": [{"value": true, "operator": "equals", "attribute": "is_domestic"}]}}, "children": [{"name": "Domestic on Eye Level", "params": {"position": "top", "priority": "preferred", "variable": true}, "children": [], "block_type": "place_on_shelves"}], "block_type": "filter"}], "params": {"description": "Complete merchandising rules for Snacks and Treats product group"}, "children": [], "block_type": "rule_group"}]