This tool has 2 buttons to use: "Run Report" and "Update Presets". They are designed to be run in succession. Once you receive a fully valid report from "Run Report", then you should proceed with "Update Presets".
This button runs a report against all of the datatables stored in the org that have a name ending in "Presets".
The report expects all Presets datatables to contain the following 2 columns. Other columns are acceptable, but these must be present:
Once the report pulls all of those datatables, it searches for each table's corresponding catalog item tagged with "type-family" and "latest". It finds those catalog items by searching the catalog item metadata for _presetsDatatableId. It matches the preset datatable to that Id. If no matching catalog item with proper tags and metadata is found for a presets datatable, the report fails.
If all presets datatables find matching catalog items, the tool will search all configurations stored in the configurationId column of each datatable against the existing assets in the org that exist in the configuration hierarchy of the latest catalog item version. It will classify each configuration in 1 of 3 ways:
After the report finishes, it prints results to the screen and stores a .csv file for the user to download. The latest version of this .csv is available via the "Download Latest Report" link above.
Once your report returns all VALID, then you are ready to run the Update Presets button.
This button runs against all Presets datatables and will either add or update the activeConfigurationId column with a new configuration Id for each row.
The tool will take the dynamic references stored in the configurationId column configuration and generate a configuration based in hardcoded Threekit Option Ids using the latest versions of assets stored during the catalog upload. These hardcoded Id configurations are quicker for retrieval on the front end.
Once the button finishes running the updates, a message will show to the user. And, the datatables can be checked to confirm the newest activeConfigurationIds are present.