> For the complete documentation index, see [llms.txt](https://docs.plutocracy.io/plutocracy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plutocracy.io/plutocracy/juno/related-products.md).

# Related Products

### Data Structure

The Related Products Experience is typically presented on a Shopify 2.0 theme using the following metafield structure which is a simple flat array of product meta.

```
[
    {
        "id": "123456789",
        "color": "#000",
        "scolor": "",
        "label": "Black Example",
        "handle": "black-example",
        "soldout": false,
        "group": "Color"
    },
    {
        "id": "123456780",
        "color": "#fff",
        "scolor": "",
        "label": "WhiteExample",
        "handle": "white-example",
        "soldout": false,
        "group": "Color"
    }
]
```

### Field Definitions

<table><thead><tr><th width="140">Field Name</th><th width="123">Type</th><th width="119">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>number</td><td>yes</td><td>productId</td></tr><tr><td>color</td><td>string (hex)</td><td>yes</td><td>swatch color</td></tr><tr><td>scolor</td><td>string (hex)</td><td>no</td><td>secondary swatch color</td></tr><tr><td>label</td><td>string</td><td>no</td><td>option label</td></tr><tr><td>soldout</td><td>boolean</td><td>yes</td><td>any variant above 1 unit of stock</td></tr><tr><td>group</td><td>string</td><td>no</td><td>group name for product</td></tr></tbody></table>

### Operating Logic

When products are updated in the store, the changes are reflected on all the metafields used by that group

In the case of a product selling out - which is considered when stock falls to 0 or below, the soldout flag will be set to true

UI on the widget can be toggled to show a sold-out experience if desired which reduces to opacity and strikethroughs the swatch.

In the case of a product being "deleted" or "archived", the product is removed from the group&#x20;
