Data model
Introduction
This chapter describes how to implement a module as an entity. However, references to the additional documentation about the repository are made and can be found in the chapter "Domain Model (Repository)" of the Product 360 Documentation.
After you analyzed the new module as described in the chapter "Analyze requirements" of this documentation you have an idea what the entity will look like. This site describes in more detail the technical implementation and configuration possibilities. There are the following sections
Create entity (Types area, custom area and sub entities)
Create logical keys
Create fields
Create enumerations (valid value lists)
Test checklist
If you only need to add a specific field, you can skip the first two sections.
Resources
In the following chapters we use these files:
Profile Overview: FMCG_DIY_ARGO_ProfileOverview_Codelists_<Version>.xlsx
Participant Dictionary: IM_Participant_Dictionary_R<Version>.xlsx
Product 360 Documentation: Informatica MDM - Product 360 - v<Version> - Knowledgebase, Installation and Customization.zip
Create a new entity
Create a new entity - Types area
In the types area, there are three GDSN related sub entity types of ArticleType
ArticleDomainType
ArticleMarketExtensionType
ArticleDomainExtensionType
ArticleDomainType
If you create a new module, this entity type should be your first choice when searching for an entity type to build your entity on.
It contains lots of field types of various data types. There are two main types:
ArticleDomainType<Subentity>.Std_<datatype>_<fieldNumber>
ArticleDomainType<Subentity>.Res_<datatype>_<fieldNumber>
The existing fields for GDSN modules in the standard are using the ArticleDomainType<Subentity>.Std_<datatype>_<fieldNumber> fields for GDSN attributes. Whereas the ArticleDomainType<Subentity>.Res_<datatype>_<fieldNumber> can be used for enriching those GDSN modules by customizings.
If you create an entirely new module, you are allowed to use ArticleDomainType<Subentity>.Std_<datatype>_<fieldNumber>. If you enhance an existing module, please only use the ArticleDomainType<Subentity>.Res_<datatype>_<fieldNumber> fields.
There is a sub entity called ArticleIngredientLangType. Don't use it. It is a special purpose sub entity only used by the standard.
If your running out of fields, you either create another entity or file a request via Product360 Support for the necessary changes.
ArticleMarketExtensionType
In contrast to the ArticleDomainType the ArticleMarketExtensionType has a different set of logical keys. It has a PartyProxy logical key, but misses the two <entity>.LK.Std_LK_<datatype>_<keyNumber> logical keys. It depends on your module which entity type to choose.
ArticleDomainExtensionType
Don't use this entity type. It is deprecated.
Use ArticleDomainType for new Modules.
Use ArticleDomainType<Subentity>.Res_<datatype>_<fieldNumber> to enhance existing modules.
Use ArticleDomainType<Subentity>.Std_<datatype>_<fieldNumber> fields in new modules, preferably.
Available ArticleDomainType sub entity types
ArticleDomainType has several sub entity types commonly used in GDSN for different purposes
ArticleDomainLangType
Entities based on this entity type contain language specific data. It is similar to ArticleLang and has logical keys EntityId and Language.ArticleDomainUOMType
Entities based on this entity type usually contain measurement values - a numeric value combined with a unit. The key UOMType can have the one of the values "metric" and "imperial". It is based on the assumption that different metric units like gram and kilogram can be converted in each other and therefore it would be an error source to store values for both units. But it may not be possible to automatically convert from metric units into imperial units.
Example:ArticlePackagingUOM.PackagingWeight and ArticlePackagingUOM.PackagingWeightUOMArticleDomainPartyType
Entities based on this entity type usually contain data related to a party like customer specific data.ArticleSubDomainType
Entities based on this entity type usually contains data that together forms a list.
There are subentities supporting language specific data and measurement values for each list entry.
Example: ArticlePackagingMaterial contains a list of different packaging materials. A bottle of wine may be packaged in a hardwood box, padded with hemp fibers and surrounded by a cardboard box.
Create a new entity - Custom area
Wizard
Included in the Repository Manager are wizards helping you to create sub entities, fields, logical keys etc.
Create the entity of your module
There is nothing special to a GDSN module entity. It should support standard functionality like:
Import
Export
Merge
Clone
Search
Data Quality
Service API
Entity IDs must be 20002 or higher.
Name and Description have to be externalized and be available in your needed client languages. Please note that the default language is English.
Create Logical keys
This is the wizard to create new logical keys:
In the new entity, there need to be a logical key for each logical key type of the underlying entity type. If you don't want to use all of them all you can deactivate these logical keys. Don't forget to add a default value in this case.
Each logical key needs a corresponding field and if you want to restrict the values for the logical key to a defined set using an enumeration, don't forget to add the enumeration to the logical key as well as to the field.
Create a logical key for each logical key type in the underlying entity type.
Each logical key needs a corresponding field.
If you want a logical key to be active, check this:
Purpose is set to 1
Editable is set to true
It has an identifier
Supports import is set to true
If you want a logical key to be inactive, check this:
Purpose is set to 0
Editable is set to false
It has a value (default value)
supports import is set to false
Logical keys - Service API
In the Service API, if you want to read or write a certain value, you need to specify the qualification. The qualification consists of values for all the logical keys on the path to the target field. To identify a logical key, the alias is used. You can define the alias in the selected line in the screenshot of the Repository Manager below. The alias gives you the opportunity to make the Service API requests more easily readable.
If there is no alias, the object name of the mapped field of the logical key is used. In the ArticleDomainType, the object names are generic because this entity type is the basis for a couple of different entities. Therefore it is recommended to use the alias.
The alias (or object name respectively) needs to be unique in the path to the target field.
Example: Let's have a look at the field ArticlePackagingUOM.PackagingWeight. Let's further assume a customer is using the Standard logical key (Text100_01) ( set editable = true) in the entity ArticlePackagingUOM. Note that there is a logical key Packaging type that is based on the Standard logical key (Text100_01) in the entity ArticlePackaging.
The corresponding fields of both logical keys have the object name "std_LK_Text100_01".
You will notice that you get the values via Service API but not the complete qualification. In the code block below the packaging type is missing.
{
"cacheId": "20170329_111826_0",
"entityIdentifier": "ArticlePackaging",
"totalSize": 66,
"startIndex": 0,
"pageSize": 100,
"rowCount": 2,
"columnCount": 0,
"columns": [],
"rows": [
{
"object": {
"id": "224435@1",
"label": "Item1",
"entityId": 1000
},
"qualification": {
"targetMarket": "Barbados",
"uomType": "metric",
"std_LK_Text100_01": "DEFAULT"
},
"values": [
"9.9"
]
},
{
"object": {
"id": "224435@1",
"label": "Item1",
"entityId": 1000
},
"qualification": {
"targetMarket": "Barbados",
"uomType": "metric",
"std_LK_Text100_01": "DEFAULT"
},
"values": [
"11.11"
]
}
]
}
If you try to write values and you specify values for all logical keys as in the example below ....
{
"columns": [
{
"identifier": "ArticlePackagingUOM.PackagingWeight"
}
],
"rows": [
{
"object":
{
"id": "'Item1'@'MASTER'"
},
"qualification": {
"targetMarket": "Barbados",
"std_LK_Text100_01": "Ampoule",
"uomType": "METRIC",
"std_LK_Text100_01": "DEFAULT"
},
"values": [
"8.8"
]
}
]
}
You will get this error message:
Found two identical logical key types std_LK_Text100_01 for the same entity hierarchy. Please use the property 'alias' on the logical key in the repository to specify which logical key you want to use.
To fix this issue use a unique alias for all logical keys as recommended.
Don't forget to use the alias in your requests.
{
"columns": [
{
"identifier": "ArticlePackagingUOM.PackagingWeight"
}
],
"rows": [
{
"object":
{
"id": "'Item1'@'MASTER'"
},
"qualification": {
"targetMarket": "Barbados",
"packagingType": "Ampoule",
"uomType": "METRIC",
"std_LK_Text100_01": "DEFAULT"
},
"values": [
"8.8"
]
}
]
}
Create a new field
Wizard
The Repository Manager also contains a wizard to create fields. A field has a lot of properties to configure. We won't show you all seven pages of the wizard at this point. Most important properties will be described below. More details can be found in the repository documentation mentioned above.
In the second screenshot you see the language specific properties of a field. The first four fields contain the property identifier for the externalization of the text. From the fifth field on you input the real labels you want to see in the UI.
Field Properties
Mandatory properties
First of all you need an identifier for your field. If there is no reason not to comply to the rule, this will be the same name as in the GDSN documentation. A Product 360 convention is that all fields of type Boolean start with the prefix "Is", e. g. "IsBaseUnit", "IsService", "IsConsumerUnit". As you can see in the examples, another convention is to use camel case for field identifier consisting of multiple words.
Next you have to choose a field type. Make sure the field type is not in use already. If you're using ArticleDomainType, you have to be careful with text field types. ArticleDomainType.Std_Text100_01 to ArticleDomainType.Std_Text100_10 have upper bound -1 meaning these are list types. Please always try to use a type field which is already configured as list/single value according to your needs.
If you have a list of values, choose a string field type so that the whole list can be put in the single database field. To choose the correct length for a field, multiply the length of a single value including a separator between the values with the number of expected values.
Example: If you have a field with an enumeration with four entries and the key of each enum entry is a single character, then it is safe to use a Std_Text10_<number> field.
Make sure the chosen field type is activated in the types area (Inactive = false).
If this field does not correspond to a non editable logical key, you should check that Editable = true is set.
Language specific properties
In order to see the field in the UI, it needs at least a name. You can define a name from top which is for example shown in the main table and normally includes the logical key values. For more information see section "Referencing on logical keys in field names" of the above mentioned documentation.
The description will be displayed as a tool tip in the field selection dialog and in the import. In general there is an English description in the GDSN documentation which should be used.
Make sure the description is really a description of the data that should go in this field. Read the description before you add it to Product 360. Delete meaningless information like "0 to 80 character text field" or "Choose value from the drop down". This information is stored elsewhere in the repository.
Use a meaningful description or leave it empty.
If the description is a complete sentence, end it with a '.', if not don't use a '.'.
All labels have to be externalized in your client languages. For more information see section "Multi-language support of the repository" in the above mentioned documentation.
There is also a field documentation in the repository. The value of this field does not appear in the UI and does not need to be internationalized. It can be used for any documentation purpose and will be visible in the Repository Manager .
Support different functionalities
There are some properties defining if a certain field supports a specific functionality which are self explaining like "Cloneable", "Mergeable", "Searchable" and "Supports Data Quality".
Export
If the Export purpose is set to '0' the field cannot be exported. The export supports different purposes as described in the section "Export Purpose" of the above mentioned documentation. If you are not sure, start with "Export Purpose" = 1.
Import
If the Import purpose is set to '0' the field cannot be imported. If the field should be importable, set the "Import Purpose" = 1. For historic reasons make sure that the deprecated property "Purpose" always has the same value as the Import Purpose and that supports import is set accordingly.
To determine where this field should be displayed in the "Repository" tree view of the import perspective use the property "Category". That's why it's recommended to keep all fields of one GDSN module in the same category. However, if you have reasons to do it differently, it is possible. The category itself also needs to be created in the repository.
Service API
If the field should be available in the Service API, you need to set "Supports service API" = true. For technical reasons the field has to support the service API if you want to use Data Quality (Supports Data Quality = true).
Constraints
Occurrences: The properties "Upper Bound" and "Lower Bound" define how many values can be stored here.
For a mandatory value set both properties to 1.
For a non-mandatory field with one value set lower bound = 0 and upper bound = 1.
For a list of values set lower bound = 0 and upper bound = -1.
You can define if it should be an INFO, a WARNING or an ERROR in case the upper or lower bound is not met. Normally this should be set to ERROR, otherwise the system will store these values regardless of the field configuration.
Valid value lists: There are two places where you can add an enumeration to the field.
Enumeration - The value of this field must be one of this enumeration. Otherwise the user will get an error and the value won't be stored. If the database already contains values not contained in the enumeration these will no longer be displayed in the UI.
Proposal Enum - Use the proposal list if the user is allowed to store values which are not contained in the list.
Since the enumeration keys are stored as the values for this field, the chosen field type has to have a matching data type with the key class of the enumeration.
Field length: GDSN often defines the max. field length.
For string values use the properties "Min Length" and "Max Length". Make sure the values you choose here are not lower resp. higher than the min. and max. length in the types area for the corresponding field type. If the field contains a list of values (upper bound = -1), the min. and max. length refer to a single entry, not the entire list.
For numeric values the "Min Length" and "Max Length" are not used. If you want to restrict a numeric value you have to use "Range Min" and "Range Max". Make sure the values are not lower resp. higher than the min. and max. range defined for the corresponding field type. The decimal separator used here is '.'.
You can define how many decimal places should be displayed in the UI by using the property "Scale". The displayed value will be rounded. Note that this is only a matter of presentation. In the database all decimal places given in the UI are stored.
To ensure that only values in the defined range will be stored, set "Validation Severity Range" to ERROR. The default value is WARNING.For dates also use "Range Min" and "Range Max". This is an example of the pattern you have to use: "yyyy-MM-dd HH:mm:ss". For example: 9999-12-31 23:59:59
If you don't restrict the values in the custom area the default values from the corresponding field type will be used.
Transitions: If you store a proxy in the field and you want to make fields of the proxy available (for example in the field selection dialog) you can set the matching root entity to the property "Proxy Transition Entity". More information about transition fields can be found in the knowledge base article at chapter "Transition fields - Group name" of the Product 360 Documentation.
Presentation
"Visible" and "Visible From Top":
Your field belongs to a deactivated logical key: Set "Visible" and "Visible From Top" to false. The field should not appear in the UI.
Your field belongs to an activated logical key: Set "Visible" to true, so it will be visible in the sub entity views. Set "Visible From Top" to false since we don't want fields which have to be qualified with the value they contain in the main table.
Your field doesn't belong to a logical key: By default set "Visible" and "Visible From Top" to true. The field should be available in the main table as well as in the sub entity views.
In order to have a display name in the UI, don't forget to fill in the property "Name" if "Visible" is set to true and property "Name From Top" if "Visible From Top" is true.
View configuration:
You can configure that a field is present in the default configuration of the corresponding sub entity view. Set "Display By Default" = true. This configuration will be overwritten by the layout stored in the client's workspace. You can also configure in which order the fields should appear in the table using "Default Column Order". The index is 0 based.
You can do the same for the main table using "Display By Default From Top" and "Display Column Order From Top". However this is not recommended for GDSN modules.
Miscellaneous
Default value: In case you create a field belonging to a logical key that is not editable, not only the logical key needs a default value but the field needs the same default value. The default value may also make sense for other fields, especially for mandatory fields.
Limitations
In some cases the Item Management data model allows values from 0 - 9,999,999,999 for attributes with datatype "Integer". Due to technical restrictions Product 360 allows only values from 0 to 2,147,483,647 for attributes with datatype "Integer". In real life this should not cause any issues because it's unlikely to have such a large value for any attribute.
IM defines decimal values in a flexible way by defining the complete length and the max. number of decimal places.
Example: complete length 15 - max. decimal places 151234567890,12345 is valid
12345,1234567890 is valid
12345678,12345678 is not valid because the complete length is greater than 15
Product 360 does not support this flexible definition. There is a technical limitation to 10 places before the decimal separator and 6 decimal places. Higher numbers are not supported.
There is no way to limit the decimal places that are stored in the database. The "Scale" value is only used to format a value in the UI.
Deactivate a GDSN entity
If you want to deactivate a GDSN entity read the chapter "Hide a GDSN module" in the "Repository configurations" section of the GDSN Accelerator documentation.
Create or adjust a valid value list
Many fields need a valid value list. In most cases this is a simple list of some kind of codes mapped to language-dependent labels. Sometimes you need a list of units of measure. First of all, you should check if the needed valid value list is already available.
Synonyms for "valid value list" are "look up values", "preset values" and in technical terms "enumeration".
Generate or adjust a repository enumeration
Repository.repository vs. EnumFragment.repository
The "Repository.repository" file contains all enumerations used by repository fields. For GDSN or food and beverage enumerations the repository only contains the definition of the enumeration. The actual enumeration entries are contained in a second file called "EnumFragment.repository". This will keep the repository more organized because there are some GDSN valid value lists with high numbers of entries.
Create enumeration
Use the Repository Wizard of the Repository Manager to create a new enumeration.
Use an identifier that makes it easy to find the corresponding field.
Usually you need to use the key class "string" when creating an enumeration for GDSN.
Enter the properties identifier in the fields "Name" and "Description", shown in the third screen. They should have the pattern %enum.<identifier without substring 'Enum.'>.<name|description> as can be seen in the screenshot above. There is no "Name from top", but name and description should be provided at least in English. In case you are using more client languages, please maintain those names in the according "repository.properties" file for your language.
Copy the enumeration into "EnumFragment.repository" in order to add entries in the next step.
For a good trace-ability of your enumeration definition, it is recommended to add a documentation to your enumeration in the "Repository.repository" file: "Enumeration entries are defined in EnumFragment.repository".
Add enumeration entries
Key synonyms come in handy if there are multiple different values in the data source which should result in the same value in Product 360.
Example: Enum.Language contains enum entries with synonyms. For example you can import "deu", "ger", "de" or "de_DE" and either value will result in the language key 7 in the system.
Make sure the label is externalized and available in English and your required client languages.
Delete enumeration entries
In a customizing, it is allowed to delete enumeration entries.
Example: If your customer is a manufacturer of vegan food, you may want to delete the enumeration entry "MEAT" in Enum.DietTypeSubcode in order to reduce false data entered by accident.
Be aware that if the keys of the entries you delete are already in the database or could be imported from another system, these values won't be displayed anymore.
Scopes on enumerations and enumeration entries
You may have seen parameters at enumerations or enumeration entries named "scope".
You should not change it or create such parameters at your enumerations or enumeration entries. Those parameters are needed for internal purposes only; they are used to make automatic repository adjustments during startup according to the configuration defined in "application_modules.properties" file.
Create enumerations with optional code
If you have to enable a mandatory field with a valid value list to get "no value" for an entry (such fields are usually logical key fields), you have to use an enumeration with optional code(s). Such enumerations provide all values of the corresponding valid value list and one or more values that will not be transferred to the GDSN pool.
First you create an enumeration as described above, the empty enumeration definition in "Repository.repository" and the entries in "EnumFragment.repository". Then you create a second enumeration with an identifier like "<Identifier of first enumeration>.WithOptionalCode". That second enumeration gets an entry standing for "no code". All other enumeration entries will be used from the "parent" enumeration.
If you have to adjust the corresponding export template to transfer item data to the GDSN pool you should use the EnumerationKeyStandard export function. Details on that function can be found in the "Technical details" chapter of this GDSN documentation.
Create or adjust a unit of measure list
The GDSN unit system contains many units of measure. Usually, a valid value list for a field only uses some of those units.
Therefore units are separated into unit categories but unfortunately the categories are different depending on the GDSN pool which is used.
Product 360 contains predefined categories for the IM GDSN system units. For DSE the same categories can be used or new categories can be created as described in the chapters below.
To see a list of valid units for a field open the appropriate GDSN document. Use the Participant Dictionary when using the IM GDSN pool or the Profile Overview when using the DSE GDSN pool.
GDSN unit categories
The GDSN units are separated into categories. One unit can be in different categories and one field can have valid values of multiple categories.
A list of units and their category can be seen in the Units perspective of Product 360. Select the GDSN unit system and add the field "Category" with the field selection dialog. Make sure to qualify the "Category" field with the GDSN parameter.
Use an existing unit enumeration
In order to use a category at a specific field it is necessary to use an unit enumeration. Product 360 has predefined enumerations named after the categories for the IM data pool. In order to map a unit enumeration to a specific field it is best practice to use the Repository Manager.
Creating new unit enumerations
When the predefined unit enumerations do not meet the requirements of the field you want to add, it is possible to create a new enumeration in the repository by using the Repository Manager and include all categories which are needed separated by a ",".
It is important that the unitSystem property matches the unit system which should be used for the enumeration. The standard GDSN unit system is 70.
After creating the unit enumeration it can be referenced as enumeration at a field as shown above.
Creating a custom unit system
Beware when using a custom unit system. All changes made in the standard GDSN unit system are not automatically added to any custom unit system and have to be maintained manually!
When the predefined unit categories are insufficient or not usable for your project, it is possible to create a custom unit system based on the GDSN unit system. To do this simply copy the GDSN unit system in the Units perspective.
After that it is possible to add or modify units and their categories for your needs in the Unit maintenance view.
To use the unit system created this way some additional steps have to be done in order to use it in the whole application:
Get the custom unit system ID
As stated above GDSN has a default unit system and in order to change that the ID of the new unit system is needed.
To get the unit system ID the Service API can be used as shown in the picture below.
It is important to add a blank space before and after the "=" sign when qualifying UnitSystemLang.Name with a value.
The ID marked in red is the unit system ID of the custom unit system. To have Product 360 use the custom unit system instead of the GDSN unit system open the Repository Manager.
(Optional) Use the new unit system in all unit fields
To use the new unit system in all UOM fields, including the fields which are not GDSN related, navigate to the enumeration Enum.Units and change the parameter UnitSystem to the ID retrieved from the Service API.
When restarting Product 360 the custom unit system will be used instead of the standard unit system.
Create category enumerations
As described in the section "Creating new unit enumerations", it is needed to add unit enumerations that use the custom unit system as enumeration parameter.
Change export UOM fields to use custom unit system
Make sure to use the new unit system in the export for all UOM fields.
Create a new unit
If a unit is missing in the GDSN unit system and is available in the official GDSN documents please contact the support as they will provide a database script to add the unit.
Checklist: Test the module
Check now
Start validation in repository editor (right-click on a node you want to be validated, choose "Validate")
Validate the new (sub) entity
Validate whole custom node
Check data type, field length and valid values
This can be checked at different places. Try to write values of the correct and incorrect data type and field length or write correct and incorrect valid values using the import, the Service API or the UI. The positive check is not enough. If the import does not report an error when writing a valid value, it can either mean you added the valid value list correctly or it can mean you forgot to attach the enumeration to your field. Always try to get the errors you expect.Check import
Check category
Check name (It's the name of the logical key, not the corresponding field, displayed in the import UI)
Check in the view "Field details" if the properties are as expected
Check export
Only needed fields can be exported
No deactivated logical keys appear in the list of fields
Only needed entities are available as export sub-data types
The field names should contain all visible qualifications (logical keys)
Check Service API
Look at the meta API
Invisible fields are not available
Names and descriptions are available
The valid value lists are correct
Read fields
Write fields
Check that each visible logical key has a unique alias within its path to the root entity
Check after you built the UI
Are table or detail views available in the desktop client? Is detail tab in web client available?
Check that all fields are visible
Check in main table (qualified access)
Check in detail table and detail tab (unqualified access)
Check if data can be created, edited and be deleted in desktop client and web client
Check datatype, field length and valid values (if not already done outside the UI)
Check correct display names and descriptions
Are labels available in English and needed client languages?
Do names from top contain all necessary logical keys? Are the logical keys in the expected order?
You can check this either in the column headers or in the field selection dialog of the main table. It is recommended that the order of the logical keys is determined by the containing entity. Go from the root entity to the display fields and collect the visible logical keys on this path.
Check if the item is still clone-able and merge-able after you maintained data
Check if the item search works correctly
Make sure the desktop view(s) contain(s) a suitable set of default columns and the layout of the web detail tab is suitable