# 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;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plutocracy.io/plutocracy/juno/related-products.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
