Configurator Parameter Overrides

Update Logic Documentation

Purpose

This documentation explains how the system dynamically overrides parameters in a configurator’s parameter_list based on API user input. The logic ensures only the necessary fields are updated without breaking unrelated configuration data.


🔑 Trigger Conditions

Overrides are applied only if all the following are true:

  1. open_api_for_user = true (passed as request attribute).

  2. Matching override data exists in the options field of the open_api_tokens table.

  3. The current configurator option has a matching ID in the parameter_list.


📦 Data Source

Override data is stored in the options column of the open_api_tokens table as a JSON object.

Example structure:

{
  "1400": {
    "id": -47801593,
    "model_id": 606,
    "material_id": 600,
    "material_category_id": 113
  },
  "1401": {
    "id": -18512702,
    "model_id": 606,
    "material_id": 603,
    "material_category_id": 114
  },
  "1402": {
    "id": -52272568,
    "selected": false
  },
  "1403": {
    "id": -17245477,
    "text_value": "Coffee time",
    "custom_color": true,
    "text_font_size": "52",
    "text_font_family": "Birthstone Bounce",
    "text_color_category_id": -1
  }
}

🧠 Option-Type-Based Logic

Option Type

Fields Updated

Notes

select, radio, checkbox, select_thumb, arrows

selected

Set selected = true when option.id == override.id.

material

model_id, material_id, material_category_id

Replaces full material info when IDs match.

text

text_value, custom_color, text_font_size, text_font_family, text_color_category_id

Used for custom text overrides.

numeral

numerical_default

Updates quantity or numeric inputs.

patterns

(n/a)

No updates; reserved for future extension.

default

(n/a)

No action taken.


📌 Example Use Case

Overriding configurator options with Open API Token data

Stored JSON in options column:


Override Logic (by Type)

1. Select, Radio, Checkbox, Select_Thumb, Arrows

2. Material

3. Text

4. Numeral

5. Patterns

No override logic is applied.

6. Default

No action is taken.


📌 Example API Request

Endpoint:

Body (form-data):


🔄 Example API Response

The data key contains a shareable URL that loads the configurator with the applied overrides.


✅ Summary

  • Override logic is modular per option_type.

  • Supports external control via API tokens.

  • Ensures data validation before applying overrides.

  • Prevents breaking the structure or overriding unrelated parameters.

Last updated