Overrides
Principles​
An override is a relationship between two products where the overriding (P2) product reuses information from the overridden (P1) product. It is very similar to the concept of inheritance in object-oriented design although the JSON-like nature of ByMe product data introduces key differences.
Defining an Override Relationship​
The process:
- Create the product P1 to be overridden (sometimes referred to as "father", "master")
- Create the overriding product P2, with the desired attributes
- Create the override relationship, on P2 either:
- through the ByMe API, by setting the definition.parentAttribute value to the value of the
definition.id
on P1 - through 3DCloudByMe, by selecting P2 as the "parent" in P1 product page
- through the ByMe API, by setting the definition.parentAttribute value to the value of the
Simplified Overview​
From the definition of two products provided to the ByMe platform, the runtime engine computes the value of each attribute of the runtime override product P2:
- If the attribute has a value in the range definition of P2, this value is used
- If not, the value is obtained from the overridden product, P1
Granularity​
The ByMe platform has a hierarchical, JSON-like product model. A key principle in ByMe override is that overridden attribute selection is not performed at the leaf level, but at the node level, resulting in some blocks of data being replaced in an all-or-nothing manner.
Product attribute key | Override logic |
---|---|
definition.id | single value |
definition.reference | single value |
definition.brandID | single value |
definition.typeID | single value |
definition.manufacturer | single value |
definition.parentID | none |
definition.startDate | single value |
definition.endDate | single value |
definition.prices | block |
definition.commercialInfos | block |
classification | block |
presentation | block |
behaviors | block |
parameters | block |
clientMetadata | block |
Note:
It is not possible to override the thumbnail without overriding the 3D model (both in the "presentation" block), or a single parameter without all the other parameters.
Overrides of Overrides​
Only one level of override is supported.
An overridden product cannot be itself overridden.