{"id":591,"date":"2022-06-01T11:42:49","date_gmt":"2022-06-01T10:42:49","guid":{"rendered":"https:\/\/www.fastseal.eu\/blog\/?p=591"},"modified":"2024-04-16T14:48:18","modified_gmt":"2024-04-16T13:48:18","slug":"import-compounds","status":"publish","type":"post","link":"https:\/\/fastseal.eu\/blog\/import-compounds\/","title":{"rendered":"Import compounds"},"content":{"rendered":"\n<p>It is possible to import components directly to the components database from a CSV file, that is a standard approach for interchanging data between systems. The import\/export functions are located on the components database:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"https:\/\/www.fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image-1024x333.png\" alt=\"\" class=\"wp-image-592\" srcset=\"https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image-1024x333.png 1024w, https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image-300x98.png 300w, https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image-768x250.png 768w, https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image-1536x500.png 1536w, https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image-1568x510.png 1568w, https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/06\/image.png 1905w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In order to use the import function the input file must follow some rules as the import data must match what is expected to be received.<\/p>\n\n\n\n<p>Example of a valid CSV to import:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-background\" style=\"background-color:#ebf3fc;font-size:14px\">name,description,reference,material,type,inside,outside,insideUseful,outsideUseful,length,price,usefulLength,reference1,profit,polygonFaces,stockQuantity,stockDesired,stockAutomatic<br>\"All\",\"internal use only\",,,,,,,,,,,,,,,,<br>\"FastSeal\",\"Default HPU brand\",\"HPU Red Premium\",\"HPU Red | FDA\",\"PU\",\"0\",\"25.2\",\"0\",\"25\",\"150\",\"2.89\",\"120\",\"0.25.150\",\"200\",\"0\",\"3.2\",\"4\",\"1\"<br>\"FastSeal\",\"Default HPU brand\",\"HPU Red Premium\",\"HPU Red | FDA\",\"PU\",\"0\",\"46\",\"0\",\"46\",\"150\",\"25.5\",\"120\",\"0.46.150\",\"50\",\"0\",\"1.4\",\"30\",\"1\"<\/pre>\n\n\n\n<p>The columns description are:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Column number<\/td><td>Description<\/td><\/tr><tr><td>1 &#8211; name<\/td><td><strong>Brand<\/strong> name, for example &#8220;FastSeal&#8221; &#8211; affects the brand table<\/td><\/tr><tr><td>2 &#8211; Description<\/td><td><strong>Brand<\/strong> description, for example &#8220;Good brand&#8221; &#8211; affects the brand table<\/td><\/tr><tr><td>3 &#8211; Reference<\/td><td>User designation of a product, for example &#8220;HPU Red Premium&#8221; &#8211; affects the <strong>products<\/strong> table<\/td><\/tr><tr><td>4 &#8211; Material<\/td><td>Brand designation, for example &#8220;HPU Red | FDA&#8221; &#8211; affects the <strong>products<\/strong> table<\/td><\/tr><tr><td>5 &#8211; Type<\/td><td>Must be one of the following words: PU, RUBBER, PTFE or PLASTIC &#8211; affects the <strong>products<\/strong> table<\/td><\/tr><tr><td>6 &#8211; inside<\/td><td>Tube measured inside dimension (mm). Must be equal or smaller than inside useful &#8211; Materials table<\/td><\/tr><tr><td>7 &#8211; outside<\/td><td>Tube measured outside dimension (mm). Must be equal or greater than outside useful &#8211; Materials table<\/td><\/tr><tr><td>8 &#8211; inside useful<\/td><td>Tube inside useful dimension (mm) normally matches the sticker on the tube &#8211; Materials table<\/td><\/tr><tr><td>9 &#8211; outside useful<\/td><td>Tube outside useful dimension (mm) normally matches the sticker on the tube &#8211; Materials table<\/td><\/tr><tr><td>10 &#8211; length<\/td><td>Tube length (mm) &#8211; Materials table<\/td><\/tr><tr><td>11 &#8211; price<\/td><td>Cost of tube in local currency &#8211; Materials table<\/td><\/tr><tr><td>12 &#8211; useful length<\/td><td>Tube useful length (mm). Must be smaller than the tube length &#8211; Materials table<\/td><\/tr><tr><td>13 &#8211; reference1<\/td><td>Material reference &#8211; Materials table<\/td><\/tr><tr><td>14 &#8211; profit<\/td><td>Required profit in % (50 means 50%) &#8211; Materials table<\/td><\/tr><tr><td>15 &#8211; polygonFaces<\/td><td>Number of faces (metal items). For seals leave as 0 &#8211; Hidden<\/td><\/tr><tr><td>16 &#8211; stockQuantity<\/td><td>Numeric value that reflects the quantity in stock (integer or decimals numbers are possible). For example 1.2; 0.3; 0.33332; 4 are all valid numbers<\/td><\/tr><tr><td>17 &#8211; stockDesired<\/td><td>Integer value that represents the number of tools that is the desired stock.<\/td><\/tr><tr><td>18 &#8211; stockAutomatic<\/td><td>This column can only have the value 0 or 1. Set to 1 if the software will manage this stock quantity or set to 0 if no change on the stock will be made by the software<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Rules:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All values must be contained in &#8221; &#8220;<\/li>\n\n\n\n<li>No value can contain a &#8220;<\/li>\n\n\n\n<li>The type (column 5) must be either PU, RUBBER, PTFE or PLASTIC<\/li>\n\n\n\n<li>The column reference1 is generally the result of the &#8220;insideUseful&#8221;.&#8221;outsideUseful&#8221;.&#8221;length&#8221; columns. See example of the valid CSV file.<\/li>\n\n\n\n<li>polygonFaces should be 0, as it is a feature for metal machining<\/li>\n\n\n\n<li>Numeric values uses the dot to separate the decimals. Ex: 345.87<\/li>\n<\/ul>\n\n\n\n<p>The user can also create, manually, a few materials and export the file. This way a valid file is generated that can be used to import and also serves as a guide\/example to create a larger file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Import dialog<\/h3>\n\n\n\n<p>Version higher than 5.2.8.2 have a new and improved import dialog that gives more insight about the import and useful options. The dialog can provide some insight about the contents of the file being imported.<\/p>\n\n\n\n<p>Two main options exist after the file is loaded:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Read file to replace: This option will check all current brands, products and materials that are currently on the database and will remove all that are not being in use <strong>before<\/strong> adding the new products and brands from the database.<\/li>\n\n\n\n<li>Read file to add: This option will just add new brands, products and materials from the imported file.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"596\" src=\"https:\/\/www.fastseal.eu\/blog\/wp-content\/uploads\/2022\/08\/image-1.png\" alt=\"\" class=\"wp-image-678\" srcset=\"https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/08\/image-1.png 587w, https:\/\/fastseal.eu\/blog\/wp-content\/uploads\/2022\/08\/image-1-295x300.png 295w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/figure>\n\n\n\n<p>In this example, the user is using a database with 76 brands, 30066 products and 31076 materials. This is clearly a wrong constructed database.<\/p>\n\n\n\n<p>Using the option &#8220;Read file to replace&#8221;, where 3 brands, 2 products and 152 materials are new in relation to the current database, and where 71 brands, 30054 products and 30685 materiais are not being used, will result on a clean database with just 8 brands, 14 products and 543 materials. trying to import 30535 materials, 66 brands and 29518 products. <\/p>\n\n\n\n<p>If the client used the option to add instead of replace, the result would be 76+3 brands, 30066+2 products and 31076+152 materials.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to import components directly to the components database from a CSV file, that is a standard approach for interchanging data between systems. The import\/export functions are located on the components database: In order to use the import function the input file must follow some rules as the import data must match what &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/fastseal.eu\/blog\/import-compounds\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Import compounds&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-591","post","type-post","status-publish","format-standard","hentry","category-tutorials","entry"],"_links":{"self":[{"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/posts\/591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/comments?post=591"}],"version-history":[{"count":10,"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/posts\/591\/revisions"}],"predecessor-version":[{"id":1612,"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/posts\/591\/revisions\/1612"}],"wp:attachment":[{"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/media?parent=591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/categories?post=591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastseal.eu\/blog\/wp-json\/wp\/v2\/tags?post=591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}