Table shortcuts: ERP to the Web Shop: Products - Related Products - Stock Product groups Product group relations - Segments Segment groups - Price - Variants Variant groups Variant group relation - Variant Product Relation - Customers Customer groups - B2B groups - Orders Web Shop to ERP: Orders Order lines - Language -Currency - Countries - Units DWI DATA SHEET This document contains the complete DWI datasheet. The tables below show the fields with their meaning and possible deviations from the standard values. In order to use v. 2.0.5.5 it is required that these fields are added to the database and that these fields are included in the export from the ERP system. They need to be present in order to make the data exchange. Furthermore remember to uninstall the old DWI client before replacing it with the new version. Data types and standard values unless other values are specified in the comments. Int = 0 Float = 0 Money = 0 Boolean = false Bit = 0 If it is desired to use your own database instead of the included MS-Access database the customer should use this database as a basis because different standard values are entered in the specific fields. The DWI module reads and writes data to and from the shop. The tables are assigned into two groups that enable the module to keep the shop updated with information from the customers ERP and the ERP with changes from the shop. Furthermore the module will insert values in some of the tables that make the setup in the shop easier. ERP system to SHOP These tables are used to update data in the customers shop from the ERP system. 250-5000 records of data are read depending on the setup and are exported to the shop. If the transfer is successful the records are removed from the relevant local database.
The system can handle updates and inserts by itself. But the customer will have to change the field [JobAction] to the value 1 if a deletion of data necessary. The tables are divided into categories according to their affiliation New and/or changed (data type and standard value) database fields: DWI client version 2.0.5.0 2.0.5.5
Products Product Create / Delete products. Table: DWIProduct (Products are transferred from the ERP system to the shop) Field Description Unique Format Comment JobAction 0 = Create/Update product (standard) 1 = Delete the product in the shop 2 = Deletes existing product group relations JobAction type 2 is similar to 0. But all existing relations to the groups are removed. It can also be used to move a product from one product group to another. ProductNumber Product number TEXT(100) Required field VendorNumber Vendor number ProductName Product name CategoryNumber The id number corresponding to the product group the product is placed in. TEXT(50) ProdType Product type ID CostPrice Product cost price. MONEY Is entered using the shops default currency. Weight Product weight. FLOAT The unit is kg. Unit The weight unit is not included, For example 1=1 kg 0, 1 = 100 gram. PictureLink Product picture link The link will have to be relative. For example: /images/1000-1.jpg
PictureBigLink Product picture link to the large picture The link will have to be relative. For example: /images/1000-1.jpg PDFLink Link to a PDF file for example containing a description of the product. StockCount Stock count StockLimit DeliverTime Stock limit Indicates at what stock count the shop shifts between the message In stock and Few in stock Delivery time specified in number of days. TEXT(50) ShortDescription Short description of the product. TEXT(1000) The description can contain breaks. (CRLF) LongDescription Long description of the product TEXT(4000) The description can contain breaks. (CRLF) LongDescription2 Long description (field 2) of the product TEXT(4000) The description can contain breaks. (CRLF) Keywords Keywords related to the product Keywords are separated with spaces LanguageID LanguageID. Relates to the DWILanguage table. Required field. The language/site has to be active in the shop. CurrencyID Currency. Relates to the DWICurrency table. TEXT Required field The currency has to be active in the language the product is imported to.
Amount Amount (Does the price apply to a purchase of 1, 10, 100 pcs. etc.) The default value is one in version 2.0.4 and onwards. Should be set to 1 as the minimum. Otherwise the buy button will not be shown. UnitPrice Unit price MONEY Product price Avance Possible profit FLOAT Is calculated based on costprice = 0 unless profit calculation is active. UnitNumber Hidden Frontpage News Unit number corresponding to the unit designation. Can be viewed in the DWIUnit table. Should the product be hidden? Possible values are true and false. Should the product be shown on the front page? Possible values are true and false. Should the product be shown as a new product? Possible values are true and false. BOOL BOOL BOOL NewsPeriod Period number TEXT(50) SortOrder States the sorting priority. A lower the value place the product higher on the product list. MinBuyAmount Minimum buy amount (Usually set to 1) Default = 0 Should be set to 1 as minimum otherwise the buy button is hidden.
RetailPrice Recommended retail price MONEY This price is shown as the recommended retail price in the shop And it is used to calculate the savings. EDBPrices EDBPriser product number 0 deletes.. TEXT Required field defaults to an empty string Default = Empty IsVariantMaster Decides whether or not the product is a variant master. BOOL The value can be true or false. MasterProdNumber Decides what variant master this variant product is related to. Nvarchar(100) This value has to be identical with the ProductNumber if the Bit for IsVariantMaster is set. ReservedField1 Reserved field ReservedField2 Reserved field ReservedField3 Reserved field ReservedField4 Reserved field ReservedField5 Reserved field ReservedField6 Reserved field ReservedField7 Reserved field ReservedField8 Reserved field ReservedField9 Reserved field ReservedField10 Reserved field MetaDescription Description from meta tag, TEXT(1000)
DeliverTimeNotInStock Delivery time (when not in stock) specified in number of days TEXT(50) Related products This creates a relation between two products using the product number. Table: DWIProductRelated (Related products transferred from the ERP system to the shop) Jobaction EGER 0 = Create/Update relation 1 = Delete the relation in the shop ProductNumber The product number is added TEXT(100) RelatedProductNumber The product number the related product is added to. TEXT(100) SortOrder Sort order.
Stock This table makes updating the stock value on a product easy. Table: DWIStock (Stock is transferred from ERP system to the shop)(optional) ProductNumber Product number TEXT(100) Mandatory StockCount Stock count for the product Product groups Table: DWIProductGroup (Product groups are transferred form the ERP system to the shop) (Optional) JobAction 0 = Creates/updates the product group 1 = Deletes a product group in the shop 2 = Deletes existing product group relations. JobAction type 2 is similar to 0 but with a significant difference that all existing relations the group has to other groups are removed. CategoryNumber Product group number YES TEXT(50) ProductCatName Product group name ParentCategoryNumber Hidden SortOrder Product group ID for the parent group the group is sub category to. If the product group is a main product group this has to be 0. Decides whether or not the product group is hidden. Possible values are 0 or 1. Sets the sorting priority. The lower the value the higher up the product group is placed. TEXT(50) BOOL ProductCatLink Product group link/images. ProductCatDescription Product group description LanguageID Language ID. Relates to the DWILanguage table.
Product group relation This creates the relation between a product and a product group. Both will have to be created on the shop before the relation is made. Table: DWIProductGroupRelation (Product relation transferred from ERP to shop) (Optional) JobAction 0 = Create/update relation 1 = Delete the relation in the shop. 2 = Delete existing product group relations NOTE: If you want to use JobAction 2, it should only be used once for every product and always as the first. If this is not respected the product will never get other relations apart from the last one received with JobAction 2 ProductNumber Product number TEXT(100) CategoryNumber Product group number for the product YES TEXT(50) Segments Table: DWIProductSegments (Product segments from ERP to the shop) (Optional) JobAction 0 = Create/update product segment relation. 1 = Delete product segment relation in the shop. ProductNumber Product number YES TEXT(100) ProductSegmentNumber Product segment ID YES TEXT(50)
Segment group Table: DWIProductGroupSegments (Product group segments from ERP system to the shop) (Optional) JobAction 0 = Create/updates the product segment relation 1 = Deletes the product segment relation in the shop. CategoryNumber Product group number YES TEXT(50) SegmentNumber Product segment ID YES TEXT(50) Price Table: DWIPrice (Prices from ERP system to the shop)(optional) JobAction 0 = Create/update price 1 = Deletes the price in the shop ProductNumber Product number Amount Amount (Does the price apply to 1, 10, 100 pcs etc.) UnitPrice Unit price MONEY Avance Possible profit FLOAT Is calculated based on cost price=0 Unless profit calculation is active. CurrencyID Currency ID. Relates to the DWICurrency table. TEXT B2BGroupNumber Indicates what B2B Group the price is applied to. Has to be set to 0 if the price applies to customers that are not logged in.(note: B2BGroupName is wanted here) Standard=0 0 = All -1 = All B2B -2 = All B2C
SpecialOfferPeriodID Sets the period in which the special offer is valid TEXT(50) If set it has to exist in the shop. SpecialOfferPrice Special offer price MONEY The key for DWIPrice is ProductNumber + Amount + CurrencyID + B2BGroupNumber
Variants Variant Table: DWIProductVariant (Product variant transferred from ERP system to the shop) Jobaction Decides what happens to the record. 0 = Creates/updates the variant in the shop 1 = Deletes the variant in the shop EGER GroupName Variant group name VariantName Variant name LanguageID Language ID for the language the variant is assigned to EGER SortOrder Variant sorting priority EGER ConfiguratorProductNumber Product number that can be used if the product variant is to be used in a product configurator. TEXT(100) Variant group Table: DWIProductVariantGroup (Variant groups transferred from ERP system to the shop) Jobaction 0 = Creates/updates the variant group in the shop. 1 = Delete the variant group in the shop EGER GroupName Variant group name LanguageID FreeTextVariant ID for the language the variant group is added to Set if the group is a free text variant group. EGER BOOL SortOrder Sorting priority LONG
SelectText Select variant text content in the drop down menu FreetextDefaultValue Standard value for the variant selector TEXT(100) Only used with free text variant FreetextMinValue Free text variant validation minimum value EGER Only used with free text variant FreetextMaxValue Free text variant validation maximum value EGER Only used with free text variant FreetextRegExValPattern Free text variant validation RegEx TEXT(100) Only used with free text variant FreetextValFailedText Error message if validation fails TEXT(100) Only used with free text variant FreetextReadOnly Only used if the free text shouldn t be edited BOOL Only used with free text variant IsProductConfigurator Used if it is created as a Product Configurator BOOL Variant group relation Creates the relation between a variant and a variant group, Table: DWIProductVariantGroupRelation (Variant group relations transferred from the ERP system to the shop) Jobaction 0 = Creates/updates the variant relation in the shop 1 = Deletes the variant relation in the shop EGER GroupName Group name LanguageID Language ID the variant group is related to EGER ProductNumber Product number the group is added to TEXT(100)
Variant product relation This creates a relation between a variant and a product. Table: DWIVariantRelation (Variant relations are transferred from the ERP system to the shop) Jobaction 0 = Creates/updates the variant relation in the shop 1 = Deletes the variant relation in the shop EGER GroupName Group name VariantName Variant name LanguageID Language ID EGER ProductNumber Related product number TEXT(100) SimpleVariant Deactivates simple variant BOOL
Customers Table: DWICustomer (Customers are transferred from the ERP system to the shop) (Optional) JobAction 0 = Creates/updates the customer in the shop 1 = Deletes the customer in the shop Number Customer number Yes Company Company name Name Name and surname Address Address Address2 Alternate address ZipCode Zip code/postal code City City CountryID Country ID. Refers to one of the active countries in the shop. ID can be found under settings -> countries Phone Phone number Fax Fax number Email E-mail address VATRegnum Company VAT no. ReservedField1 Reserved field 1 from the customer files ReservedField2 Reserved field 2 from the customer files ReservedField3 Reserved field 3 from the customer files ReservedField4 Reserved field 4 from the customer files ReservedField5 Reserved field 5 from the customer files
IsB2BCustomer B2BGroupNumber B2B customer 0/False = Not B2B customer 1/True = B2B customer Sets the group affiliation for the customer. 0 is the value for a regular customer BOOL B2BUsername Username the user will be using to login. B2Bpassword Password the user will be using to login. EAN TypeID EAN no. Customer type 0 = Private 1 = Company Default = 0 Private customer GroupNumber Customer group no. TEXT(100) BonusDiscount BonusDisabled Bonus percentage (not implemented in the shop code) Bonus Deactivated (not implemented in the shop code) DECIMAL BOOL LanguageID Language ID EGER This field can be set to Null. Empty is not allowed. Customer group Table: DWICustomerGroup (Customer groups transferred from the ERP system to the shop) Jobaction 0 = Creates/updates the group in the shop EGER LanguageID 1 = Deletes the group in the shop Language ID the customer group is related to EGER GroupNumber Sets the ID number for the group TEXT(50) GroupName Sets the name of the group TEXT(100)
BonusPercent Bonus percentage for the group (not implemented in the shop code) DECIMAL BonusPointFactor Bonus factor (not implemented in the shop code) DECIMAL IsDefault Set if new customers should be created in this group. BOOL If this is set to standard group the previous standard group will be reset. B2B group Table: DWIB2BGroup (B2B groups are transferred from the ERP system to the shop)(optional) JobAction 0 = Creates/updates B2B group 1 = Deletes B2B group in the shop B2BGroupID Group number Yes Needs to be >0 B2BGroupName B2B group name B2BGroupDescription Description of the B2B group for example Price class B. Orders This table contains the data that can be updated on an order. Table: DWIOrderUpdate (Data is transferred from the ERP system to the shop) OrderID Order no. Yes Needs to be > 0. OrderStateID Order state ID no. Needs to be > 0. NULL is also allowed (An order without an order state). Special note regarding tables: DWIProduct, DWIPriceStock, DWIProductGroup, DWIProductGroupRelation, DWICustomer, DWIB2BGroup, DWIProductSegments, DWIProductGroupSegments - Is transferred every time the data transfer is made. - When a record is handled it is deleted in the table.
SHOP to ERP system Orders and settings are sent from the shop to the customer database. Orders Table: DWIOrderHead (Order head transferred from the shop to the ERP system) OrderID ReferenceNumber OrderID. Consecutive no. assigned by the shop Customer reference field. Can be used for the customer requisition no. TEXT(50) OrderDate Order date DATE PayMethod The selected payment method TEXT(50) PayMethodFee Payment fee MONEY ShippingMethod The selected shipping method TEXT(50) ShippingFee Shipping fee MONEY TotalWeight Combined total weight of all the products included in the order. FLOAT TotalPrice Total price incl. VAT MONEY CurrencyID CustomerComments TransactionNumber IpAddress CurrencyID. Relates to the DWI Currency table Customer comments related to the order Transaction no. assigned when payment is made using a credit card Client ip-address for the customer that has made the order TEXT TEXT(500) TEXT(100) TEXT(50) SalesDiscount Sales discount MONEY LanguageID LanguageID. Relates to the DWILanguage table. VAT VAT rate TEXT
PayMethodFeeADDVAT Bit Calculate Pay Method VAT BOOL ShippingFeeADDVAT Bit Calculate Shipping Fee VAT BOOL CUSCompany Customer Company name CUSName Customer Name and surname CUSAddress Customer - Address CUSAddress2 Customer Address2 CUSZipCode Customer Zip code/postal code CUSCity Customer City CUSCountryID Customer Country ID. It refers to the countries that are active in the shop. ID can be found under settings > countries CUSPhone Customer Phone number JA CUSFax Customer Fax number CUSEmail Customer - E-mailaddress CUSVATRegnum Customer Company VAT no. CUSReservedField1 CUSReservedField2 CUSReservedField3 CUSReservedField4 CUSReservedField5 CUSB2BGroupNumber Customer Reserved field 1 in the customer file Customer Reserved field 2 in the customer file Customer Reserved field 3 in the customer file Customer Reserved field 4 in the customer file Customer Reserved field 5 in the customer file Customer Indicates what B2B group the customer belongs to Is 0 or (empty) if it is a regular B2B customer.
CUSB2BUserName CUSB2Bpassword Customer User name the customer has to use in order to log in. Customer Password the customer has to use in order to log in. CUSEAN EAN no. DTOCompany Delivery address Company name DTOName Delivery address Name and surname DTOAddress Delivery address - Address DTOAddress2 Delivery address Address2 DTOZipCode Delivery address Zip code/postal code DTOCity Delivery address - City DTOCountryID Delivery address Country ID Refers to on of the active countries in the shop. ID is located under settings > countries DTOPhone Delivery address Phone number JA DTOFax Delivery address - Fax number DTOEmail Delivery address - E-mail address BonusPercent BonusFactor BonusDiscount BonusAddedToCustomer Bonus percentage (not implemented in the shop code) Bonus factor (not implemented in the shop code) Bonus Discount (not implemented in the shop code) Bonus value added to the customer (not implemented in the shop code) nvarchar(100) DECIMAL DECIMAL CUSNumber Customer number OrderStateID Orderstate ID InvoiceNumber Invoice number InvoiceDate Invoice date DATE
InvoiceState Invoice state InvoicePaid Invoice paid BOOL InvoiceDueDate Invoice due date DATE CreditNoteNumber Credit note number Orderlines Table: DWIOrderLine (Orderlines transferred from the shop to the ERP system) OrderID Order ID. Consecutive no. assigned by the shop ProductNumber Product number TEXT(100) ProductName Product name Variant Variant text TEXT(1000) Amount Amount purchased UnitPrice Unit price MONEY TotalPrice Total price MONEY VAT Order line VAT TEXT(50) Especially for tables: DWIOrderHead, DWIOrderLine Transferred every time the transfer is executed. Setup tables: Language Table: DWILanguage (Language transferred from the shop to the ERP system) LanguageID Language ID Yes LanguageName Language name TEXT(50) Currency Table: DWICurrency (Currency transferred from the shop to the ERP system) CurrencyID Currency ID Yes TEXT
CurrencyText Currency name CurrencySymbol Currency code. For example DKK CurrencyFactor Currency conversion factor FLOAT ISO Currency ISO standard code Countries Table: DWICountry (Countries transferred from the shop to the ERP system) CountryID Country ID Yes CountryName Country name CountryVAT VAT rate for the country MONEY LanguageID Language ID ISO ISO standard country designation Text(50) Units Table: DWIUnit (Units transferred from the shop to the ERP system) UnitNumber Unit number Yes UnitText Unit name For example Pcs, Boxes and Pallets. LanguageID Language ID Especially for the tables: DWILanguage, DWICurrency, DWICountry, DWIUnit -Is only transferred once after the DWI service is started.