Model classificationΒΆ

Model classification works via the collections feature. Each different classification scheme used should have its own root node. Each subsequent node in this classification must use a node type that has the is_classification flag set to True.

You can add any number of Attributes to a node, which will then be passed on to all linked model instances.

Example:

You have a model named Product, it has two attributes:

  • name: str

  • color: str

Now you can create any number of Products in your master data.

Create a new classification collection using any number of nested nodes; usually only leaf nodes will have attributes. Now if you add an attribute to a classification node:

  • price: decimal

And you link your created model instances of Products to this classification node, every Product in this node will have the new attribute price available.

In this case the API response for a single master data item will include a list of linked classification names (using the root node) and a list of attribute IDs as specified in the linked nodes:

{
  "classifications": {
     "eCl@ss 9.1": [
        "57c03cb2a69a528ccc4862c4",
        "57c03cb2a69a528ccc4862db"
     ]
  },
  data: {
    // ... etc
  }
}

The values for these additional attributes are all saved together in the primary fields dictionary, as duplicate attribute keys will simply share their value for convenience.