threekit-data-driven-configurator
The purpose is to avoid the use of rules and instead use the customer's Data Table as the source of truth to feed a configurator that would enable or disable attributes and their values on the fly, while the end user is configuring a product.
Prerequisites
Items
The configurator needs to be ready and working (the visuals are not mandatory), with all the necessary items available, allowing any configuration. For example, if there are 3 attributes, containing respectively 3, 4 and 5 values, the configurator should allow 3x4x5 = 60 different configurations, even if some of them are non valid. The validity of them will be handled by the dataDrivenConfigurator tool.
Each attribute value item should have a string metadata named "Name" with the actual value from the data table as the metadata value. For example, if an item is representing the color option "BLUE" as visible in the data table, the item should be created with a the metadata named Name
with the value BLUE
Data table
The customer's Data Table must:
- list each, all and only valid configuration, one per line.
- have headers as the first line.
- be uploaded in the customer's org.
There is also an alternative to this exhaustive listing that is a descriptive data.
Getting Started
Installing
The full dataDrivenConfigurator code should be copied and then pasted in a custom script rule at the main configurator level. The extension should be installed the same way, in the very next rule.
Customization
The extension template is made to be adjsuted on a per project basis.
This documentation
- The code is commented following JSDoc principles, and the documentation is build on jsdoc in its last 3.x.x version to keep compatibility with the chosen template that is FooDoc.
- A more extensive documentation is availble in Google Drive when searching for "threekit-data-driven-configurator".
Authors
- This project is the idea and conception of Romain Dubois rdubois@threekit.com who also writes the code and documentation. Feel free to ask any question and request features.