# OptionForge: Product Option Configurator Generator (`usta/optionforge-product-option-configurator`) Actor

Generate a portable product-option configurator and every allowed combination from supplied options, compatibility rules and integer USD prices. Includes validation report; no checkout integration.

- **URL**: https://apify.com/usta/optionforge-product-option-configurator.md
- **Developed by:** [US Tech Automations](https://apify.com/usta) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / completed product packet

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## OptionForge

OptionForge is for a merchant who already knows their decorative product options and the compatibility rules between them, and who needs a portable customer configurator plus a complete table of allowed combinations. Typical buyers: custom gift-box, ribbon, engraving, or similar made-to-order shops that price in integer US cents and will recompute the price themselves at checkout.

The Actor produces a portable configurator and a complete table of combinations allowed by your rules.

### What you get

A ZIP of the original engine files (leaf names only):

- `configurator.html` — branded portable page that lists the supplied options. Visitors can download a configuration JSON. That download is not an order and is not a price authority.
- `spec.json` — the compiled specification.
- `valid-configurations.csv` — every allowed combination and its integer-cent total.
- `validation.json` — counts, unreachable values, and the engine’s written limits.
- `README.txt` — how to host the widget yourself.
- `styles.css` — shared USTA stylesheet used by the configurator.

A successful run under the supplied rules maps to adapter status `PASS`. The summary still says `VALID_UNDER_SUPPLIED_RULES` and keeps the engine’s limit text: no physical fit, safety, inventory or tax inference; the widget is not a checkout; recompute selection and price server-side before accepting orders.

### Limits (from the engine)

- 1–8 option groups; 1–20 values per group; at most 20,000 combinations; at most 100 rules.
- USD only. Prices are nonnegative integer cents, each at most 100,000,000; a configured total above that is rejected.
- IDs: letter then up to 39 letters, digits, underscores or hyphens. Labels: 1–200 characters, no control characters.
- Rules may only name options and values that exist. A rule set that excludes every combination is rejected.
- Adapter input is a JSON object of at most 1 MiB. Non-finite numbers (`NaN`, `Infinity`) and unknown top-level fields are rejected.
- This version is not for confidential pricing: rules and prices are visible in the widget.

This is not hardware certification, domain certification, a checkout integration, or a guarantee of physical fit or safety.

### Complete input example

`example.json` is the native good sample. Paste this object into the **payload** JSON field:

```json
{
  "title": "Example custom gift box",
  "base_price_cents": 2500,
  "currency": "USD",
  "options": [
    {
      "id": "size",
      "label": "Box size",
      "values": [
        {"id": "small", "label": "Small", "price_cents": 0},
        {"id": "large", "label": "Large", "price_cents": 1200}
      ]
    },
    {
      "id": "finish",
      "label": "Ribbon finish",
      "values": [
        {"id": "cotton", "label": "Cotton", "price_cents": 0},
        {"id": "satin", "label": "Satin", "price_cents": 400}
      ]
    },
    {
      "id": "card",
      "label": "Gift card",
      "values": [
        {"id": "none", "label": "No card", "price_cents": 0},
        {"id": "foil", "label": "Foil card", "price_cents": 300}
      ]
    }
  ],
  "rules": [
    {
      "if": {"size": "small"},
      "exclude": {"card": ["foil"]}
    }
  ]
}
```

That sample has 8 combinations checked and 6 allowed (small + foil is excluded). Large / satin / foil totals 4400 cents under these rules. Do not treat that figure as a live catalog price.

### Cloud hosting

When you run this Actor, the JSON you submit is sent to Apify’s cloud and stored under your Apify account. It is not a local-only run. You control retention in that account. There is no lasting service-level agreement in this package.

### Run and download

1. Review the supported input and try the included synthetic example. Replace **payload** with your authorized records. For API runs, send an object with a single payload field containing that input.
2. Run the Actor. Open **Status and coverage** to inspect the result.
3. For a completed result, open **Download completed ZIP** or the artifact link in the dataset. Save and extract the ZIP before Apify retention expires. Open the HTML report where provided; retain the JSON and CSV evidence.

### Price and unsuccessful runs

**$0.50 per completed packet**, with one packet per run and no start fee. A retry of the same run reuses the packet and the same billing identity. Starting a separate run is a separate request. Invalid input or an incomplete UNKNOWN result produces a diagnostic without a completed-packet charge. A completed conflict or shortage report can still require manual review; PASS does not mean every business problem was resolved.

The minimum run budget is $0.50. The example is a normal run and follows the same price; it is not a free preview promise. Apify handles account billing. These files are not permanent storage: download them promptly.

### Access and support

Your input and output are processed on Apify under the run owner's account. Use authorized data and opaque IDs; do not upload passwords or sensitive personal records. Treat artifact URLs as access-bearing links and share them only intentionally. The USTA report may fetch the Satoshi font; it does not upload your report. For a product issue, use this Actor's Issues tab with the run ID and a redacted example. Never post private input or access-bearing links in a public issue.

# Actor input Schema

## `payload` (type: `object`):

Decorative product configuration object: title, integer-cent prices, option groups and explicit compatibility rules. Same object as example.json.

## Actor input object example

```json
{
  "payload": {
    "title": "Example custom gift box",
    "base_price_cents": 2500,
    "currency": "USD",
    "options": [
      {
        "id": "size",
        "label": "Box size",
        "values": [
          {
            "id": "small",
            "label": "Small",
            "price_cents": 0
          },
          {
            "id": "large",
            "label": "Large",
            "price_cents": 1200
          }
        ]
      },
      {
        "id": "finish",
        "label": "Ribbon finish",
        "values": [
          {
            "id": "cotton",
            "label": "Cotton",
            "price_cents": 0
          },
          {
            "id": "satin",
            "label": "Satin",
            "price_cents": 400
          }
        ]
      },
      {
        "id": "card",
        "label": "Gift card",
        "values": [
          {
            "id": "none",
            "label": "No card",
            "price_cents": 0
          },
          {
            "id": "foil",
            "label": "Foil card",
            "price_cents": 300
          }
        ]
      }
    ],
    "rules": [
      {
        "if": {
          "size": "small"
        },
        "exclude": {
          "card": [
            "foil"
          ]
        }
      }
    ]
  }
}
```

# Actor output Schema

## `packet` (type: `string`):

No description

## `report` (type: `string`):

No description

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "payload": {
        "title": "Example custom gift box",
        "base_price_cents": 2500,
        "currency": "USD",
        "options": [
            {
                "id": "size",
                "label": "Box size",
                "values": [
                    {
                        "id": "small",
                        "label": "Small",
                        "price_cents": 0
                    },
                    {
                        "id": "large",
                        "label": "Large",
                        "price_cents": 1200
                    }
                ]
            },
            {
                "id": "finish",
                "label": "Ribbon finish",
                "values": [
                    {
                        "id": "cotton",
                        "label": "Cotton",
                        "price_cents": 0
                    },
                    {
                        "id": "satin",
                        "label": "Satin",
                        "price_cents": 400
                    }
                ]
            },
            {
                "id": "card",
                "label": "Gift card",
                "values": [
                    {
                        "id": "none",
                        "label": "No card",
                        "price_cents": 0
                    },
                    {
                        "id": "foil",
                        "label": "Foil card",
                        "price_cents": 300
                    }
                ]
            }
        ],
        "rules": [
            {
                "if": {
                    "size": "small"
                },
                "exclude": {
                    "card": [
                        "foil"
                    ]
                }
            }
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("usta/optionforge-product-option-configurator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "payload": {
        "title": "Example custom gift box",
        "base_price_cents": 2500,
        "currency": "USD",
        "options": [
            {
                "id": "size",
                "label": "Box size",
                "values": [
                    {
                        "id": "small",
                        "label": "Small",
                        "price_cents": 0,
                    },
                    {
                        "id": "large",
                        "label": "Large",
                        "price_cents": 1200,
                    },
                ],
            },
            {
                "id": "finish",
                "label": "Ribbon finish",
                "values": [
                    {
                        "id": "cotton",
                        "label": "Cotton",
                        "price_cents": 0,
                    },
                    {
                        "id": "satin",
                        "label": "Satin",
                        "price_cents": 400,
                    },
                ],
            },
            {
                "id": "card",
                "label": "Gift card",
                "values": [
                    {
                        "id": "none",
                        "label": "No card",
                        "price_cents": 0,
                    },
                    {
                        "id": "foil",
                        "label": "Foil card",
                        "price_cents": 300,
                    },
                ],
            },
        ],
        "rules": [{
                "if": { "size": "small" },
                "exclude": { "card": ["foil"] },
            }],
    } }

# Run the Actor and wait for it to finish
run = client.actor("usta/optionforge-product-option-configurator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "payload": {
    "title": "Example custom gift box",
    "base_price_cents": 2500,
    "currency": "USD",
    "options": [
      {
        "id": "size",
        "label": "Box size",
        "values": [
          {
            "id": "small",
            "label": "Small",
            "price_cents": 0
          },
          {
            "id": "large",
            "label": "Large",
            "price_cents": 1200
          }
        ]
      },
      {
        "id": "finish",
        "label": "Ribbon finish",
        "values": [
          {
            "id": "cotton",
            "label": "Cotton",
            "price_cents": 0
          },
          {
            "id": "satin",
            "label": "Satin",
            "price_cents": 400
          }
        ]
      },
      {
        "id": "card",
        "label": "Gift card",
        "values": [
          {
            "id": "none",
            "label": "No card",
            "price_cents": 0
          },
          {
            "id": "foil",
            "label": "Foil card",
            "price_cents": 300
          }
        ]
      }
    ],
    "rules": [
      {
        "if": {
          "size": "small"
        },
        "exclude": {
          "card": [
            "foil"
          ]
        }
      }
    ]
  }
}' |
apify call usta/optionforge-product-option-configurator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,usta/optionforge-product-option-configurator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ib6kNOF7hnfQ8bYpk/builds/TeLSYhFhusd54M60X/openapi.json
