Imports

Data import allows you to push data to PLM using CSV or Excel files. The import of data can also be done via beCPG REST API which uses Xml format.

Use

Folders used to import data are available in the subfolder Import of the repository (repository/exchange/import).

Folders used for the importation are :

  • To treat : to import .csv files;
  • Failed : error files;
  • Succeeded : files importation succeeded;
  • Log : Log of importation;
  • To do : storage folder;
  • User import : to import users.

It is possible to directly get the layouts in using directly the Excel exports generated in the interface, in the lists or with the bulk edition. beCPG also provides ready to use files in Excel or CSV formats which can be used to import data. To download these files, right click on the links below:

Imports configuration

Simple import

Simple imports (importation of properties and associations) don’t need configuration. Simply define columns in the importation file (properties and associations) to import.

Import format is the following:

PATH    /Temp/Products                  
TYPE    bcpg:rawMaterial                    
COLUMNS bcpg:productCode    cm:name cm:creator  cm:modified cm:modifier bcpg:suppliers
VALUES  1014    Saumon surgelé 80x20x4  admin       admin   12,13

Where:

  • PATH: the folder where the data will be imported;
  • TYPE: the type of object which has been created (raw material, finished product etc.);
  • COLUMNS: names of the different attributes (properties and associations) to import;
  • VALUES: values to import with a specific format.

  • Date: DD/MM/AAAA as per the French system, MM/DD/YYYY as per the English system;

  • User: the user's account ;
  • Decimal number: the decimal separator is a comma on a French system and a dot on an English system ;
  • Association : the entity code (bcpg:code) pointed by the association and separed by a comma when the association is multi-value. In the case of a product, enter the product code (bcpg:productCode). In the example, the association « Supplier » (bcpg:suppliers) is a multi-value association where the suppliers with the 12 and 13 code are defined. In the case in which the pointed association doesn’t have a code property, the name of this later has to be entered.

Node browser

To fill import .csv files (cf. the previous part), and notably the way to access the folder where the data will be imported, it’s possible to use the node browser .

There are two cases :

  • The target is an entity (for example, if you want to import the nutrients of a product), in which case the « nodeRef » (necessary to use the node browser), is visible in the address bar.
  • The target is a folder (for example, to import raw materials in the folder of a particular site). In this second case, the tip to get the « nodeRef » from this folder is to launch the creation of a new product in this folder. Once on the creation page of the new product, the « nodeRef » of the folder is visible in the address bar.

For the next part, we will suppose that the importation of data will be applied on an existing entity.

  • Go to the URL of the list which have to be completed and copy the « nodeRef » ;
  • Go to beCPG> Administration> Node browser. Click on « fts-alfresco » and choose « nodeRef ». Paste the nodeRef got from the URL in the blank inset and press « Search ». You will be able to navigate in its children and to find terms associated to each list/entity to write the « PATH ».

Example: importation of the drop down list « Sponsors » of a project

1. Copy the « nodeRef »

For this purpose, go to beCPG> beCPG administration> ProjectList; Sponsors

2. Search the « PATH » in the node browser

Go to the bottom of the page and click on the link « entitylist » of the section «Child». Go to the bottom of the page and search « Sponsors » in the «Child» section, then, click on the associated link. You arrive on a page on which you can find the « PATH » as on the screenshot as below :

3. Complete the « PATH » in the .CSV file

The pasted « PATH » should be shortened for the importations :

  • The part "app:company_home" can be omitted;
  • In the same way, all the « cm : » can be deleted, however, the other prefixes such as « bcpg : » must be kept.

PATH: /System/ProjectLists/bcpg:entityLists/Sponsors

Advanced imports

Certain imports need a configuration to indicate to the system how to import the data. For example, for the import of:

  • product characteristics (costs, nutrients, allergens, etc.) ;
  • images or documents ;
  • etc.

The configuration of these imports is done in the folder : Système/Exchange/Import/Mapping.

The import format is the following :

PATH        /Temp/Products                                                  
TYPE        bcpg:rawMaterial                                                    
MAPPING     Products
IMPORT_TYPE Node
COLUMNS     bcpg:productCode    cm:name cm:creator  cm:modified cm:modifier bcpg:suppliers  coutMP  coutMPPrev  coutEmb nutProteines    nutLipides  nutGlucides img1Path    img1Title
VALUES      1014    Saumon surgelé 80x20x4  admin       admin   12,13   1.0 2.0 3.1 2.5 3.6 5.6 /home/querephi/Documents/beCPG/projets/demo/jeu de données/Sushi/sushi saumon/produit.jpg   saumon

Where:

  • PATH: is the folder where the data will be imported;
  • TYPE: the type of object which must be created (raw material, finished product etc.) ;
  • MAPPING: the mapping name which must be used for the import;
  • IMPORT_TYPE: the type of import which must be done:
  • "Node" or no IMPORT_TYPE line: If you want to import entities (e.g. raw material, semi-finished product, finished product, packaging,...), you don't need to add IMPORT-TYPE in your file. If you still want to keep that line on your file you must add "Node" to read IMPORT_TYPE Node;
  • "EntityListItem": to import a datalist associated to an entity (e.g. compoList, ingList,...);
  • "Comments" : to import a comment;
  • COLUMNS: attribute names (properties and associations) to import;
  • VALUES: are values to import with a certain format;

Characteristics imported in the previous example are:

  • coutMP : costs of the raw materials ;
  • coutMPPrev : previsional costs of the raw materials ;
  • nutProteines : protein content ;
  • nutLipides : fats content ;
  • nutGlucides : carbohydrates content.

And the mapping file defines which corresponds to which column, for example :

<code class="xml">
<column id="coutMP" dataListQName="bcpg:costList" charactQName="bcpg:costListCost" attribute="bcpg:costListValue"
                charactNodeRef="" charactName="Coût MP" type="Characteristic" />
</code>

Where:

id: the ID of each column ; dataListQName: the characteristics list’s name (costs, nutrients, allergens, etc...); charactQName: the list property where is situated the characteristic; attribute: the property where the value is stocked; charactNodeRef: the ID of the characteristic which format is: workspace://SpacesStore/34e2f6eb-a139-4f93-8926-ae21612fd221; charactName: the name of the imported characteristic ;

  • type : the type of the column which must be imported. There exists 3 values : Attribute, Characteristic, File.

You can choose to fill either the charactNodeRef or the charactName. If the charactNodeRef is filled, charactName is not taken into account.

Files imported in the previous example are defined by the 2 columns :

  • img1Path
  • img1Title

and the mapping is :

<code class="xml">
<column id="img1Path" attribute="cm:content" path="Images/produit.jpg" type="File"/>
<column id="img1Title" attribute="cm:title" path="Images/produit.jpg" type="File"/>
</code>

Where:

id: the ID of the column; attribute: the property where the value is stocked (« cm:content » for the file content and « cm:title » for the file tittle); path: the path relating to the entity where the file is stocked : « Images/produit.jpg » indicates that the file is stocked in the « Images » repertory and the file name is « produit.jpg » ; type: the type of the column to be imported, here : FILE.

The mapping format for the previous example is the following :

<code class="xml">
<mappings>
    <settings>
        <setting id="dateFormat" value="dd/MM/yyyy"/>
    </settings>
    <!-- PRODUCT -->
    <mapping name="bcpg:rawMaterial">       
        <nodeColumnKeys> 
            <nodeColumnKey attribute="bcpg:productCode"/>
        </nodeColumnKeys>
        <columns>
            <!-- characteristic properties -->
            <column id="coutMP" dataListQName="bcpg:costList" charactQName="bcpg:costListCost" attribute="bcpg:costListValue" charactNodeRef="" charactName="Coût MP" type="Characteristic" />
            <column id="coutMPPrev" dataListQName="bcpg:costList" charactQName="bcpg:costListCost" attribute="bcpg:costListValue"   charactNodeRef="" charactName="Coût prévisionnel MP" type="Characteristic" />
            <column id="coutEmb" dataListQName="bcpg:costList" charactQName="bcpg:costListCost" attribute="bcpg:costListValue"  charactNodeRef="" charactName="Coût emballage" type="Characteristic" />
            <column id="nutProteines" dataListQName="bcpg:nutList" charactQName="bcpg:nutListNut" attribute="bcpg:nutListValue" charactNodeRef="" charactName="Protéines" type="Characteristic" />
            <column id="nutLipides" dataListQName="bcpg:nutList" charactQName="bcpg:nutListNut" attribute="bcpg:nutListValue"   charactNodeRef="" charactName="Lipides" type="Characteristic" />
            <column id="nutGlucides" dataListQName="bcpg:nutList" charactQName="bcpg:nutListNut" attribute="bcpg:nutListValue"  charactNodeRef="" charactName="Glucides" type="Characteristic" />
            <!-- files -->
            <column id="img1Path" attribute="cm:content" path="Images/produit.jpg" type="File"/>
            <column id="img1Title" attribute="cm:title" path="Images/produit.jpg" type="File"/>
        </columns>
    </mapping>      
</mappings>
</code>

Where :

[setting id="dateFormat" value="dd/MM/yyyy"/>:]{style="text-align:left;"} defines the dates format ; [nodeColumnKeys/>:]{style="text-align:left;"} defines the columns used to calculate the existence of the data to be imported ; [mapping name="bcpg:rawMaterial">:]{style="text-align:left;"} defines the type to be imported.


Dynamic characteristics Import

In the mapping (systeme>Exchange>Import>mapping) You need to add to Product.xml

<code class="xml">
<mapping name="bcpg:dynamicCharactList">
        <nodeColumnKeys>
            <nodeColumnKey attribute="bcpg:erpCode" />
        </nodeColumnKeys>
        <dataListColumnKeys>
            <dataListColumnKey attribute="bcpg:dynamicCharactTitle" />
        </dataListColumnKeys>
        <columns>
        </columns>
    </mapping>
</code>

Importation format needs to be adapt to your Dynamic characteristics. For example for a process list :

<code class="xml">
PATH    /Temp/Products                                                  
TYPE    bcpg:dynamicCharactList
LIST_TYPE bcpg:processList                                                      
MAPPING Products                                                    
</code>

COLUMNS bcpg:erpCode bcpg:dynamicCharactTitle bcpg:dynamicCharactValue


VALUES ERP1 code Name_formula value


Solutions

It is possible to re-import a datalist if you imported the wrong one. However, you will need to delete the last imported datalist (the one you mistakenly imported). To do that you must add to your import format :

DELETE_DATALIST  true
  • This function is equivalent to "CANCEL AND REPLACE"
STOP_ON_FIRST_ERROR false
  • Allow to carry on importing even if an error is found during the import.
DISABLED_POLICIES true
  • Disable policies during import
ENTITY_TYPE
  • Allow to specify the type of entity you want to import. The by default type is bcpg:product.

It CANCELS AND REPLACES the datalist

Fields names identification in beCPG interface

Properties names identification

The bulk edition allows the access to the properties’ fields of a product type. To access it :

  • Enter the folder containing the products ;
  • Press the button « Bulk edition ».

  • On the bulk edition interface, press the button « Content base type »
  • Then, in the drop down list, select a type of product. In our case, « Semi finished product ».

  • Tick the properties that you would like to import.
  • Press the button « Refresh ».

  • Click on « Export » and download the Excel file.

  • Open the Excel file previously downloaded.On the line 7 of the Excel file, there are the properties’s names.

Note: line 1 to 7 of the Excel file are reduced per default, you’ll have to enlarge them.

List fields’ name identification

beCPG allows the exportation in EXCEL directly through the lists’ interface.

  • Enter the list to be exported, for example, click on the « Composition » list.
  • Press the « Export » button.

  • Open the downloaded EXCEL file.

On the line 2 of the Excel file, there are fields’names.

Users import

bePG allows the importation of a users pack and their association them to different groups and/or to different sites. Sites and groups nonexistent are created thanks to the importation. The import is done through a .csv file which have to be placed in the repertory folder Exchange> Import> Users import. Once the import has be executed, the file is automatically moved to Exchange> Import> Import succeeded.

The .csv file must contain a header row:

"cm:lastName";"cm:firstName";"cm:email";"cm:telephone";"cm:organization";"username";"password";"memberships";"groups";"notify"

It’s possible to add other properties to a user by adding the properties’ names in header. « Username » and « Password » fields are mandatory.

The « Membership » field allows the association between users and sites. The user rôle in the site has to be defined. The different roles are :

  • Consumer
  • Collaborator
  • Manager

Sites must be separated by « | » and roles with « _ ». Thus, the user « Test » belonging to :

  • the site « Site de test 1 » in which his rôle is « Manager » ;
  • the site « Site de test 2 » in which his rôle is «Consumer» ; will have the « Membership » field filled like this : « Site de test 1_Manager|Site de test2_Consumer »

The « Groups » field allows the association between users and groups. Groups are separated by « | ». Groups can be hierarchized using a « / ». beCPG groups should be referenced by their system’s names :

  • Marketing (Marketing)
  • Marketing managers (MarketingMgr)
  • Marketing users (MarketingUser)
  • Purchases (Purchasing)
  • Purchases managers (PurchasingMgr)
  • Purchases users (PurchasingUser)
  • Quality manager (QualityMgr)
  • Quality users (QualityUser)
  • R&D (RD)
  • R&D managers(RDMgr)
  • R&D users (RDUser)
  • Product reviewer (ProductReviewer)
  • System manager (SystemMgr)

Thus, the user belonging to the « Product reviewer » group and to the « Groupe de test 2 » group child of « Group de test 1 » will have the « Groups » field filled like this: « ProductReviewer|Groupe de test 1/ Groupe de test 2 »

The « notify » field allows to send email to the user. Possible values are « True » or « False ».

Complete CSV example for the « Test » user:

"cm:lastName";"cm:firstName";"cm:email";"cm:organization";"username";"password";"memberships";"groups";"notify"
"test";"test";"test@becpg.fr";"";"test";"test"; "Site de test 1_Manager|Site de test2_Consumer";"ProductReviewer|Groupe de test 1/ Groupe de test 2";"false"

results matching ""

    No results matching ""