All about Structures
This site contains some information about the handling of structures, structure groups, structure features and values.
Copy a structure group
Structure groups can be copied or moved within the same structure systems but only be copied to another structure system. Here you can find several information about the things which are done within the copy algorithm.
General information
If the structure group is copied to another structure by using the context menu, it will be copied to the first level, that means directly under the root structure group. In the structure group tree it can be found at the bottom (also see chapter Calculate algorithm of the display order)
If the structure group is copied to another structure by using Drag and Drop, it will be copied to the level where it was dropped of course. Anyway it will be placed on the bottom of this level, too.
Calculate algorithm of the display order
see chapter Sorting of structure groups (StructureGroup.DisplayOrder).
When to add a new structure value to the target structure
Corresponding issue: HPM-11560 - CopyOrMoveJob is totally broken when copying structure groups to another structure Closed
When a structure group is copied to another structure its referenced values must already be present in the target structure or they will be copied.
The decision algorithm if a structure value is considered already present in the target structure is the following:
Source structure value: identifier: XYZ
name (de): Grün
name (en): green
target structure contains these structure values:
identifier |
name (de) |
name (en) |
=> action |
ABC |
Grün |
green |
create new SV |
ABC |
Grün |
something else |
create new SV |
XYZ |
Grün |
green |
do nothing |
XYZ |
Grün |
something else |
create new SV |
XYZ |
XL |
XL |
create new SV |
XYZ |
Grün |
<empty> |
add english name to existing SV |
XYZ |
<empty> |
<empty> |
add names to existing SV |
Two structure values are the same if the identifier and all names are the same. Empty entries for languages on both sides are ok since we assume that one structure value has been maintained with additional languages but the structure values are still the same.
Structure Group Mapping
Simple Mappings
* structure (S1)
* |
* structureGroup (SG)
* ^
* |
1
. map()
* Article (A1)
Result: A1 is mapped to SG
* structure (S1)
* |
1
. map()
* |--- structureGroup (SG1) <-------------- Article (A1)
* |
2
. moveMapping() |
* |--- structureGroup (SG2) <-----------------|
Result: A1 is mapped to SG2
* structure (S1, multi mapping)
* |
1
. map()
* |--- structureGroup (SG1) <-------------- Article (A1)
* |
2
. addMapping() |
* |--- structureGroup (SG2) <-----------------|
Result: In a structure allowing multi mapping, A1 is mapped to SG1 and SG2
* structure (S1, single mapping)
* |
1
. map()
* |--- structureGroup (SG1) <-------------- Article (A1)
* |
2
. addMapping() |
* |--- structureGroup (SG2) <-----------------|
Result: A1 is mapped to SG2
Rule: In a single mapping structure, the "new" additional mapping will replace the other mapping to SG1. In this case, addMapping will behave like a moveMapping.
Inheritance
If an object (product, variant) is moved or copied to another group, the assigned children (variant, items) will always follow.
If an object (product, variant) is removed from a group, the assigned children (variant, items) will always be removed from this group as well.
If an object (variant, item) is added to a higher-level object (product, variant) it will get all group assignment of this object.
* structure (S1)
* |
* structureGroup (SG)
* ^
* |
1
. map()
* Product (P1)
* ^
* |
3
. map()
* Variant (V1)
* ^
* |
2
. map()
* Article (A1)
Result: A1, V1, P1 are mapped to SG
Rule: Articles inherit mappings from variants and variants inherit mappings of products. It doesn't matter if the inheriting object (product or variant) has the mappings before the variant or article is assigned to the product/variant or if the product/variant is mapped to a structure group after the variant/article has been assigned to the product/variant
* Structure(S1, single)
* |
* StructureGroup(SG1)-----|-----StructureGroup(SG2)
* ^ ^
* | |
* | |
* | map() |
* Variant----------------------->Product
Result: Variant and Product are mapped to SG2
Rule: If it is not possible to keep individual mappings, for example because of a constraint of the structure, the variant follows its superordinate product.
* Structure(S1, multiple mapping)
* |
* StructureGroup(SG1)-----|-----StructureGroup(SG2)
* ^ ^
* | |
* | |
* | map() |
* Variant----------------------->Product
Result: Variant is mapped to SG1 and SG2 and the Product is mapped to SG2
Rule: If it is possible to keep individual mappings, these are kept and the inherited ones are added.
Group to Group Mappings
If a product is added to group A1 it is automatically assigned to group B1.
If a product is removed from group A1 it is also removed from group B1.
If the mapping from group A1 to group B1 is removed, also all objects which were added to B1 beause of the mapping are reomved from B1 as well.
It works one-way
If a product is added to group B1 it is NOT added to A1.
If a product is removed from group B1 it is NOT removed from group A1.
Inheritance
If a product has assigned variants and items and is moved into Structure Group A1, the product, variant and items are also moved into B1.
Revoming group to group mappings
the products (and all child objects) are removed from B1 and therefore also from C1, if they have been added there by these group mappings
the products (and all child objects) have been added manually to B1 they are not removed from B1 or C1
the products (and all child objects) have been added manually to C1 they are not removed from C1
* Structure(SA) Structure(SB)
* | map() |
* StructureGroup(SGA1)--------------> StructureGroup(SGB1)
* ^
* |
* |
* |
* Product
Result: Product is mapped to SGA1 and SGB1.
Rule: If an item product or variant is mapped to a structure group with structure group to structure group mappings, the object is mapped to all structure groups along this mapping chain. If the structure group to structure group mapping will be established after the product has been assigned to the source group of the group to group mapping, the product will be assigned to the target group automatically.
* Structure(A) Structure(B) Structure(C)
* | | |
* |----->|--StructureGroup(SGA1)------>|--StructureGroup(SGB1)------>|--StructureGroup(SGC1)
* |map()
* |
* |
* Article
Result: Article is mapped to SGA1, SGB1, SGC1
* Structure(A) Structure(B) Structure(C, multi mapping)
* | | |
* |----->|--StructureGroup(SGA1)------>|--StructureGroup(SGB1)------>|--StructureGroup(SGC1)
* |map()
* |
* |
* Product<----Article
* |
* |----------------------------------------------------------------->|--StructureGroup(SGC3)
* map()
Result: Article and Product are mapped to SGA1, SGB1, SGC1 and SGC3
* Structure(A) Structure(B) Structure(C, single mapping)
* | | |
* |----->|--StructureGroup(SGA1)------>|--StructureGroup(SGB1)------>|--StructureGroup(SGC1)
* |map()
* |
* |
* Product<----Article
* |
* |----------------------------------------------------------------->|--StructureGroup(SGC3)
* map()
Result: Article and Product are mapped to SGA1, SGB1, SGC3
Rule: If an article has a manual mapping in a single mapping structure and a mapping created because of a group to group mapping should be added, the manual mapping wins and the group to group mapping will not be created.
* Structure(A) Structure(B) Structure(C)
* | | |
* |----->|--StructureGroup(SGA1)------>|--StructureGroup(SGB1)------>|--StructureGroup(SGC1)
* |map() |
* | |
* |----->|--StructureGroup(SGA2)------>|--StructureGroup(SGB2)------>|--StructureGroup(SGC2)
* |remap()
* |
* |
* Product
Result: Product is mapped to SGA2, SGB2, SGC2
Rule: If the mapping to a source group of a group to group mapping is deleted, all mappings to groups in the group to group mapping chain will be deleted.
* Structure(A) Structure(B) Structure(C, single)
* | | |
* |----->|--StructureGroup(SGA1)------>|--StructureGroup(SGB1)------>|--StructureGroup(SGC1)
* |
2
. map() |
* | |
* | |
* Product ---------------------------------------------------------------------|
1
. map()
* |
* |----->|--StructureGroup(SGA2)------>|--StructureGroup(SGB2)------>|--StructureGroup(SGC2)
*
3
. remap()
Result: Product is mapped to SGA2, SGB2, SGC2
Rule: Even it is "only" a mapping caused by a group to group mapping, this mapping is considered as "new mapping" which replaces the other mapping in this structure since this is a single mapping structure.
Inheritance and group to group mappings
* Structure(A,multi) Structure(B,single)
*
1
.map() | |
* |-------------------> StructureGroup(A1)----->StructureGroup(B1)
* | |
* | StructureGroup(B2)
* | ^
* Product |
* |
3
. map Article to product |
* Article ----------------------------------------------|
*
2
. map()
Result: Article and Product are mapped to A1 and B1.
Rule: Article follows the product. Manual Mappings of the Article will be replaced by group to group mappings.
Copy StructureGroups with mapped items
* source structure (S1, single mapping) copy() target structure (S2, single mapping)
* |---->|----------sourceGroup -------------------------------------> |- sourceGroup (copy)
* | | copy() |
* | |----------sourceGroup (copy of copy) <-----------------------------|
* |
* Article
Result: Article is mapped to sourceGroup (copy) and sourceGroup (copy of copy)
Special cases
HPM-22030, HPM-26783
* Structure(S1, single) Structure(S2, single)
* | |
* |----->|-- StructureGroup (S1_G1)------>|--StructureGroup(S2_G1)----|
* | | |
* | |-- StructureGroup (S1_G2) <---------------------------------|
* | map()
* Article
Result: According to our rules, S1_G2 is the newer mapping, which results in S1_G1 mapping to be removed, which in turn removes the other mappings. The article will have no mappings in the end.
This seems not to be a realistic use case. At least we can't think of one.
HPM-23122, HPM-26768
Structure(S1)
|
|-----------> |-- Structure Group A
|
1
. map() |
3
. unmap()| |---->|-- Structure Group B
Product----|
2
. map()
^
|
Variant
^
|
Article
Result: Product, variant and item are mapped to SG B. This one specific mapping which is unmapped from the product, should also be unmapped from the variant and article.
Expected result of customer: Variant and Article are mapped only to SG B
Actual result: Since these mappings are not specially marked (unlike the group to group mappings) they are handled as manual mappings. In this case they keep their manual assignments just as they would if you add another mapping from the product in a multi mapping structure.
We cannot support this requirement at the moment.
Requirement: In general if the variant or item has assignments of its own (i. e. manually added assignments), they should keep them. Our data model doesn't contain markers that indicate that an assignment has been made manually or was inherited from a product. In 3PPD this wouldn't even be enough. We needed to know if it has been inherited by the product or the variant to ensure a consistent and correct behaviour. At the moment it is also not possible to delete specific single structure groups, since we always set a list of structure groups and this also applies for the deletion of structure groups.
Known issues
Datatype and Units of Article and StructureGroup attributes
Since PIM 7 it is not allowed to set a unit for Datatypes "Boolean" and "Date" because this actually does not make any sense. If the user tries to set a unit for an article or structuregroup attribute with datatype "Boolean" or "Date" an error message occurs. Same error will be shown when he tries to change the datatype to "Boolean" or "Date" after he set a unit. Of course this will also be validated during import.
Since PIM 7 an article/variant/product attribute is always created with datatype String (if nothing else is set) and you are no longer able to delete the datatype. Lower bound was set to 1 in the repository (similar to StructureGroupAttribute.Datatype). DB update script available (516 MASTER and SUPPLIER). This was a fix of HPM-13563.
Datatype Boolean
Since PIM 7 boolean values will be saved language independent in the database. As soon as a boolean value for an attribute or feature will be entered in the GUI it will be saved as 1 or 0 (1=true, 0=false).
It is possible to enter the boolean in the qualified column language of the value, in english (true/false) or with 1/0. For language independent qualified value fields it's only possible to set 1/0 or true/false.
Those boolean changes won't have any affect to the import. It's still possible to insert other boolean values. But for making the inserted boolean values more handy over the import you can add them in any upper/lower case combination of the assigned preset values and they will be shown as matching preset values in the GUI.
Restriction on mapping attributes to features
Since PIM 7 it is no longer possible to map two attributes of one item/variant/product to the same structureGroupAttribute since the combination of structure group and structure attribute has to uniquely identify an attribute. Also see Items with features view
UI aspects
Visibility of structure group fields
You can configure the visibility of structure group fields in views that show structure group data in context of a selected structure group. Those views are "StructureGroupFormView", "ChildStructureGroupTableView", and "StructureGroupMappingTableView".
To restrict the visibility of a structure group field you add a new FieldParam "structurelevel" to the repository field; its value contains all levels (separated by ";") in which the corresponding field is visible.