Dynamics NAV & 365 Business Central

Integration Framework v2 allows you to integrate with both:

  • Dynamics NAV 2013/2015/2016/2017/2018 installations
  • Dynamics 365 Business Central On-Premise/Cloud installations.

Read more about how each feature is implemented on these systems below.

The Import Currencies feature imports currencies from NAV/Business Central with a name, a code, and an exchange rate. Currently, all currencies from NAV/Business are imported - for simple setups consider creating currencies manually instead.

The IsLCY field exists to inform you which currency is the baseline currency in the remote system - it does not have an equivalent field in DW, nor should it be imported.

Standard request:

XML
<GetEcomData> <tables> <Currencies type="all"/> </tables> </GetEcomData>

Standard response: 

XML
<?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomCurrencies"> <item table="EcomCurrencies"> <column columnName="CurrencyCode"><![CDATA[ZAR]]></column> <column columnName="CurrencyName"><![CDATA[South African rand]]></column> <column columnName="CurrencyLanguageID"><![CDATA[ENU]]></column> <column columnName="CurrencyRate"><![CDATA[7.99029999999999997]]></column> <column columnName="IsLCY"><![CDATA[false]]></column> </item> <item table="EcomCurrencies"> <column columnName="CurrencyCode"><![CDATA[GBP]]></column> <column columnName="CurrencyName"><![CDATA[Local]]></column> <column columnName="CurrencyLanguageID"><![CDATA[ENU]]></column> <column columnName="CurrencyRate"><![CDATA[100]]></column> <column columnName="IsLCY"><![CDATA[true]]></column> </item> </table> </tables>

The Import Languages feature imports languages from NAV with an ID, a language code, and a name.

Standard request:

XML
<GetEcomData > <tables> <Languages type="all"/> </tables> </GetEcomData>

Standard response:

XML
<?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomLanguages"> <item table="EcomLanguages"> <column columnName="LanguageID"> <![CDATA[BGR]]> </column> <column columnName="LanguageCode2"> <![CDATA[BGR]]> </column> <column columnName="LanguageName"> <![CDATA[Bulgarsk]]> </column> </item> <item table="EcomLanguages"> <column columnName="LanguageID"> <![CDATA[CSY]]> </column> <column columnName="LanguageCode2"> <![CDATA[CSY]]> </column> <column columnName="LanguageName"> <![CDATA[Tjekkisk]]> </column> </item> </table> </tables>

Product units – e.g. pieces, boxes or boatloads – can also be imported and synchronized between the ERP and the Dynamicweb solution.

Standard request:

XML
<GetEcomData> <tables> <Units type="all" /> </tables> </GetEcomData>

Standard response:

XML
<?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomVariantGroups"> <item table="EcomVariantGroups"> <column columnName="VariantGroupID"><![CDATA[NavUnits]]></column> <column columnName="VariantGroupLanguageID"><![CDATA[DAN]]></column> <column columnName="VariantGroupName"><![CDATA[DW_Units]]></column> <column columnName="VariantGroupLabel"><![CDATA[]]></column> <column columnName="VariantGroupUnit"><![CDATA[true]]></column> </item> </table> <table tableName="EcomVariantsOptions"> <item table="EcomVariantsOptions"> <column columnName="VariantOptionID"><![CDATA[Unit_DÅSE]]></column> <column columnName="VariantOptionLanguageID"><![CDATA[DAN]]></column> <column columnName="VariantOptionGroupID"><![CDATA[NavUnits]]></column> <column columnName="VariantOptionName"><![CDATA[dåser]]></column> </item> <item table="EcomVariantsOptions"> <column columnName="VariantOptionID"><![CDATA[Unit_GR]]></column> <column columnName="VariantOptionLanguageID"><![CDATA[DAN]]></column> <column columnName="VariantOptionGroupID"><![CDATA[NavUnits]]></column> <column columnName="VariantOptionName"><![CDATA[Kilogram]]></column> </item> <item table="EcomVariantsOptions"> <column columnName="VariantOptionID"><![CDATA[Unit_KASSE]]></column> <column columnName="VariantOptionLanguageID"><![CDATA[DAN]]></column> <column columnName="VariantOptionGroupID"><![CDATA[NavUnits]]></column> <column columnName="VariantOptionName"><![CDATA[Dusin]]></column> </item> <item table="EcomVariantsOptions"> <column columnName="VariantOptionID"><![CDATA[Unit_L]]></column> <column columnName="VariantOptionLanguageID"><![CDATA[DAN]]></column> <column columnName="VariantOptionGroupID"><![CDATA[NavUnits]]></column> <column columnName="VariantOptionName"><![CDATA[Liter]]></column> </item> <item table="EcomVariantsOptions"> <column columnName="VariantOptionID"><![CDATA[Unit_STK]]></column> <column columnName="VariantOptionLanguageID"><![CDATA[DAN]]></column> <column columnName="VariantOptionGroupID"><![CDATA[NavUnits]]></column> <column columnName="VariantOptionName"><![CDATA[Styk]]></column> </item> </table> </tables>

The Import Manufacturers feature imports all NAV vendors to Dynamicweb as manufacturers.

Standard request:

XML
<GetEcomData> <tables> <Manufacturers type="all"/> </tables> </GetEcomData>

Standard response:

XML
<?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomManufacturers"> <item table="EcomManufacturers"> <column columnName="ManufacturerID"> <![CDATA[01254796]]> </column> <column columnName="ManufacturerName"> <![CDATA[Progressive Home Furnishings]]> </column> <column columnName="ManufacturerAddress"> <![CDATA[222 Reagan Drive]]> </column> <column columnName="ManufacturerZipCode"> <![CDATA[US-SC 27136]]> </column> <column columnName="ManufacturerCity"> <![CDATA[Columbia]]> </column> <column columnName="ManufacturerCountry"> <![CDATA[US]]> </column> <column columnName="ManufacturerPhone"> <![CDATA[]]> </column> <column columnName="ManufacturerFax"> <![CDATA[]]> </column> <column columnName="ManufacturerEmail"> <![CDATA[]]> </column> <column columnName="ManufacturerWeb"> <![CDATA[]]> </column> </item> </table> </tables>

The Import Customers feature imports NAV Contacts as Dynamicweb Users, where they can then login, place orders, and generally behave like any other user. It can also import NAV Sales People as users, with data on which users they are allowed to impersonate.

Out of the box this request imports all NAV Contact Cards with a valid NAV Customer Card and places them in a Customers group – relevant information from the associated NAV Customer Card is stamped down on the users, e.g. a customer number, the company address, a currency code, and any ship-to addresses.

The parameter importSalesPeople causes the request to import all NAV Sales People as users in a Sales group. Associated NAV Contact Cards are imported to the AccessUserSecondaryRelation table in the database, which means that the NAV Sales People users will be able to impersonate these users and act on their behalf in frontend e.g. create orders, view order history, generate customer statement reports, etc.

As of Dynamicweb 9.10, the parameter importContacts allows you to control whether or not to import contacts. When set to false only customer records will be imported, which also means that addresses and alternative addresses for contacts will not be imported, only ship-to addresses associated with a customer.

importContacts is set to true by default.

If you want to include the Dynamicweb custom fields in the output of the response xml for this request then you need to configure the Business Central custom fields of type Contact when the importContacts = true (default) or Customer when importContacts = false. The custom fields setup is described here.

 

Standard request:

XML
// Without NAV SalesPeople <GetEcomData > <tables> <Customers type="all" /> </tables> </GetEcomData> // With NAV SalesPeople <GetEcomData > <tables> <Customers type="all" importSalesPeople="true"/> </tables> </GetEcomData>

Standard Response

The basic structure of the XML response is this:

  • A table containing the user group 'Customers'
  • A table containing all NAV Contact Cards
  • A table containing all NAV addresses

Here's an example containing one user and one address:

XML
<?xml version="1.0" encoding="UTF-8"?> <tables> <table tableName="AccessUserGroup"> <item table="AccessUserGroup"> <column columnName="AccessGroupGroupName"><![CDATA[Customers]]></column> <column columnName="AccessGroupName"><![CDATA[Customers]]></column> </item> </table> <table tableName="AccessUser"> <item table="AccessUser"> <column columnName="AccessUserUserName"><![CDATA[mike.nash@contoso.com]]></column> <column columnName="AccessUserExternalID"><![CDATA[E000018]]></column> <column columnName="AccessUserCustomerNumber"><![CDATA[01121212]]></column> <column columnName="AccessUserName"><![CDATA[Mr. Mike Nash]]></column> <column columnName="AccessUserEmail"><![CDATA[spotsmeyer's.furnishings@contoso.com]]></column> <column columnName="AccessUserPhone"><![CDATA[]]></column> <column columnName="AccessUserFax"><![CDATA[]]></column> <column columnName="AccessUserAddress"><![CDATA[612 South Sunset Drive]]></column> <column columnName="AccessUserAddress2"><![CDATA[test1]]></column> <column columnName="AccessUserZip"><![CDATA[US-GA 31772]]></column> <column columnName="AccessUserCity"><![CDATA[Atlanta]]></column> <column columnName="AccessUserCountry"><![CDATA[US]]></column> <column columnName="AccessUserAddressTitle"><![CDATA[Company address]]></column> <column columnName="AccessUserCompany"><![CDATA[Spotsmeyer's Furnishings]]></column> <column columnName="AccessUserCurrencyCharacter"><![CDATA[USD]]></column> <column columnName="AccessUserActive"><![CDATA[true]]></column> <column columnName="AccessUserWeb"><![CDATA[]]></column> <column columnName="AccessUserGroups"><![CDATA[Customers]]></column> </item> </table> <table tableName="AccessUserAddress"> <item table="AccessUserAddress"> <column columnName="AccessUserAddressUserID"><![CDATA[E000018]]></column> <column columnName="AccessUserAddressType"><![CDATA[1]]></column> <column columnName="AccessUserAddressCallName"><![CDATA[Contact Address]]></column> <column columnName="AccessUserAddressCompany"><![CDATA[Spotsmeyer's Furnishings]]></column> <column columnName="AccessUserAddressName"><![CDATA[Contact Address]]></column> <column columnName="AccessUserAddressAddress"><![CDATA[test 2]]></column> <column columnName="AccessUserAddressAddress2"><![CDATA[]]></column> <column columnName="AccessUserAddressZip"><![CDATA[US-AL 35242]]></column> <column columnName="AccessUserAddressCity"><![CDATA[Birmingham]]></column> <column columnName="AccessUserAddressCountry"><![CDATA[US]]></column> <column columnName="AccessUserAddressCell"><![CDATA[]]></column> <column columnName="AccessUserAddressFax"><![CDATA[]]></column> <column columnName="AccessUserAddressEmail"><![CDATA[mike.nash@contoso.com]]></column> <column columnName="AccessUserAddressCustomerNumber"><![CDATA[01121212]]></column> <column columnName="AccessUserAddressUID"><![CDATA[E000018_ContactAddress]]></column> <column columnName="AccessUserAddressState"><![CDATA[US]]></column> <column columnName="AccessUserAddressPhoneBusiness"><![CDATA[]]></column> <column columnName="AccessUserAddressCountryCode"><![CDATA[US]]></column> <column columnName="AccessUserAddressDefaultAddressCustomFields"><![CDATA[False]]></column> </item> </table> </tables>

The Import Product Groups imports item categories from NAV/Business Central as Dynamicweb product groups. It also imports the following relational tables:

  • EcomShopGroupRelation handles relations between groups and a shop
  • EcomGroupRelation handles internal relations between groups
  • EcomGroupProductRelation handles relations between groups and products

As described in the introduction, you should import product groups before you import products. If you don’t, please be aware that it is not usually practical to work with the products in Dynamicweb PIM unless you have a group structure to navigate.

NAV/Business Central does not contain translations for item categories – but you can still import them to more than one language using the languages parameter:

Parameter

Values

Required?

Comments

languages

A comma-separated list of country codes

No

Defines which additional languages to create the groups in

setLanguage A country code Yes

Defines the language of the imported data – use system language from NAV, i.e. the language you enter data in.

shopID A shop id No - but highly encouraged!

Relates all imported groups to this specific shop or warehouse.

Standard request

XML
<GetEcomData shopID="SHOP13"> <tables> <ProductGroups type="all" setLanguage="DAN" languages="ENG"/> </tables> </GetEcomData>

Standard response:

XML
<?xml version="1.0" encoding="UTF-8"?> <tables version="1.2.0.0_NAV11.0.19394"> <table tableName="EcomGroups"> <item table="EcomGroups"> <column columnName="GroupID"><![CDATA[ARMLÆN]]></column> <column columnName="GroupLanguageID"><![CDATA[DAN]]></column> <column columnName="GroupName"><![CDATA[ARMLÆN]]></column> <column columnName="GroupInheritCategoryFieldsFromParent"><![CDATA[true]]></column> </item> <item table="EcomGroups"> <column columnName="GroupID"><![CDATA[ARMLÆN]]></column> <column columnName="GroupLanguageID"><![CDATA[ENG]]></column> <column columnName="GroupName"><![CDATA[ARMLÆN_ENG_NotTranslated]]></column> <column columnName="GroupInheritCategoryFieldsFromParent"><![CDATA[true]]></column> </item> <item table="EcomGroups"> <column columnName="GroupID"><![CDATA[BORD]]></column> <column columnName="GroupLanguageID"><![CDATA[DAN]]></column> <column columnName="GroupName"><![CDATA[Kontorbord]]></column> <column columnName="GroupInheritCategoryFieldsFromParent"><![CDATA[true]]></column> </item> <item table="EcomGroups"> <column columnName="GroupID"><![CDATA[BORD]]></column> <column columnName="GroupLanguageID"><![CDATA[ENG]]></column> <column columnName="GroupName"><![CDATA[BORD_ENG_NotTranslated]]></column> <column columnName="GroupInheritCategoryFieldsFromParent"><![CDATA[true]]></column> </item> </table> <table tableName="EcomShopGroupRelation"> <item table="EcomShopGroupRelation"> <column columnName="ShopGroupShopID"><![CDATA[SHOP13]]></column> <column columnName="ShopGroupGroupID"><![CDATA[ARMLÆN]]></column> </item> <item table="EcomShopGroupRelation"> <column columnName="ShopGroupShopID"><![CDATA[SHOP13]]></column> <column columnName="ShopGroupGroupID"><![CDATA[BORD]]></column> </item> </table> <table tableName="EcomGroupRelations"> <item table="EcomGroupRelations"> <column columnName="GroupRelationsGroupID"><![CDATA[ARMLÆN]]></column> <column columnName="GroupRelationsParentID"><![CDATA[STOL]]></column> <column columnName="GroupRelationsSorting"><![CDATA[5]]></column> </item> <item table="EcomGroupRelations"> <column columnName="GroupRelationsGroupID"><![CDATA[BORD]]></column> <column columnName="GroupRelationsParentID"><![CDATA[MØBLER]]></column> <column columnName="GroupRelationsSorting"><![CDATA[3]]></column> </item> </table> <table tableName="EcomGroupProductRelation"> <item table="EcomGroupProductRelation"> <column columnName="GroupProductRelationGroupID"><![CDATA[STOL]]></column> <column columnName="GroupProductRelationProductID"><![CDATA[1900-S]]></column> <column columnName="GroupProductRelationIsPrimary"><![CDATA[True]]></column> </item> </table> </tables>

The Import Products feature imports items from NAV/Business Central as Dynamicweb products. Please note, that if you want to place the imported items in product groups or warehouse groups imported from a remote system, make sure you import the group structure before the products.

The importProductProperties attribute allows you to also import item properties from NAV/Business Central as product properties – they are placed in a product category called Imported NAV Item Attributes. This attribute includes a number of related tables, so mind the overhead.

If you have more than 1000 records when importing products we recommend using pagination - see the Import data with paging add-in documentation

The following parameters can be used to control which languages to include in the import:

Parameter

Values

Required?

Comments

setLanguage

A country code

Yes

Defines the language of the imported data – use system language from NAV, i.e. the language you enter data in.

languages

A comma-separated list of country codes

No

Defines which additional translations from NAV to also include in the import.

groupID

A group id No

Imports all products to this specific group - e.g. a New products group. Make sure this group exists and is associated with a shop or warehouse.

 

Usually only relevant for PIM setups where the warehouse structure should be built manually or imported from an different place than the ERP.

 

Set on the GetEcomData request.

Standard request:

XML
//Without product properties <GetEcomData> <tables> <Products type="all" setLanguage="DAN" /> </tables> </GetEcomData> //With product properties <GetEcomData> <tables> <Products type="all" setLanguage="DAN" importProductProperties="true" /> </tables> </GetEcomData> //With a specific groupID set <GetEcomData groupID="GROUP3"> <tables> <Products type="all" setLanguage="DAN" importProductProperties="true" /> </tables> </GetEcomData>

Standard response:

XML
// Without product properties included <?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomProducts"> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1900-S]]></column> <column columnName="ProductLanguageID"><![CDATA[DAN]]></column> <column columnName="ProductVariantID"><![CDATA[]]></column> <column columnName="ProductNumber"><![CDATA[1900-S]]></column> <column columnName="ProductName"><![CDATA[PARIS Gæstestol, sort]]></column> <column columnName="ProductShortDescription"><![CDATA[]]></column> <column columnName="ProductPrice"><![CDATA[1,071.00]]></column> <column columnName="ProductStock"><![CDATA[299]]></column> <column columnName="ProductWeight"><![CDATA[8.3]]></column> <column columnName="ProductVolume"><![CDATA[0.25]]></column> <column columnName="ProductManufacturerID"><![CDATA[20000]]></column> <column columnName="ProductActive"><![CDATA[true]]></column> <column columnName="ProductVariantCounter"><![CDATA[0]]></column> <column columnName="ProductDefaultUnitID"><![CDATA[Unit_STK]]></column> <column columnName="ProductEAN"><![CDATA[]]></column> </item> </table> </tables> // With product properties included <?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomProducts"> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1900-S]]></column> <column columnName="ProductLanguageID"><![CDATA[DAN]]></column> <column columnName="ProductVariantID"><![CDATA[]]></column> <column columnName="ProductNumber"><![CDATA[1900-S]]></column> <column columnName="ProductName"><![CDATA[PARIS Gæstestol, sort]]></column> <column columnName="ProductShortDescription"><![CDATA[]]></column> <column columnName="ProductPrice"><![CDATA[1,071.00]]></column> <column columnName="ProductStock"><![CDATA[299]]></column> <column columnName="ProductWeight"><![CDATA[8.3]]></column> <column columnName="ProductVolume"><![CDATA[0.25]]></column> <column columnName="ProductManufacturerID"><![CDATA[20000]]></column> <column columnName="ProductActive"><![CDATA[true]]></column> <column columnName="ProductVariantCounter"><![CDATA[0]]></column> <column columnName="ProductDefaultUnitID"><![CDATA[Unit_STK]]></column> <column columnName="ProductEAN"><![CDATA[]]></column> </item> </table> <table tableName="EcomProductCategory"> <item table="EcomProductCategory"> <column columnName="CategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="CategoryType"><![CDATA[1]]></column> <column columnName="CategoryProductProperties"><![CDATA[true]]></column> </item> </table> <table tableName="EcomProductCategoryTranslation"> <item table="EcomProductCategoryTranslation"> <column columnName="CategoryTranslationCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="CategoryTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="CategoryTranslationCategoryName"><![CDATA[Imported NAV Item Attributes]]></column> </item> </table> <table tableName="EcomProductCategoryField"> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_3]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_3]]></column> <column columnName="FieldType"><![CDATA[7]]></column> <column columnName="FieldDefaultValue"><![CDATA[200]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldType"><![CDATA[15]]></column> <column columnName="FieldDefaultValue"><![CDATA[2]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_2]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_2]]></column> <column columnName="FieldType"><![CDATA[7]]></column> <column columnName="FieldDefaultValue"><![CDATA[60]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_4]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_4]]></column> <column columnName="FieldType"><![CDATA[7]]></column> <column columnName="FieldDefaultValue"><![CDATA[170]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_5]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_5]]></column> <column columnName="FieldType"><![CDATA[1]]></column> <column columnName="FieldDefaultValue"><![CDATA[]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_6]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_6]]></column> <column columnName="FieldType"><![CDATA[6]]></column> <column columnName="FieldDefaultValue"><![CDATA[]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> <item table="EcomProductCategoryField"> <column columnName="FieldId"><![CDATA[ImportedNAVItemAttributes_8]]></column> <column columnName="FieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTemplateTag"><![CDATA[ImportedNAVItemAttributes_8]]></column> <column columnName="FieldType"><![CDATA[1]]></column> <column columnName="FieldDefaultValue"><![CDATA[]]></column> <column columnName="FieldPresentationType"><![CDATA[1]]></column> <column columnName="FieldDoNotRender"><![CDATA[false]]></column> <column columnName="FieldHideEmpty"><![CDATA[false]]></column> </item> </table> <table tableName="EcomProductCategoryFieldTranslation"> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_3]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[Bredde]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options />]]></column> </item> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[Farve]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options><Option Name="DAN Rod" Value="1" Default="" /><Option Name="Orange" Value="2" Default="" /><Option Name="Gul" Value="3" Default="" /><Option Name="Grøn" Value="4" Default="" /><Option Name="Blå" Value="5" Default="" /><Option Name="Violet" Value="6" Default="" /><Option Name="Mørklilla" Value="7" Default="" /><Option Name="Sort" Value="8" Default="" /><Option Name="Hvid" Value="9" Default="" /></Options>]]></column> </item> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_2]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[DAN Dybde]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options />]]></column> </item> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_4]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[Højde]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options />]]></column> </item> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_5]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[Beskrivelse af materiel]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options />]]></column> </item> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_6]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[Modelår]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options />]]></column> </item> <item table="EcomProductCategoryFieldTranslation"> <column columnName="FieldTranslationFieldId"><![CDATA[ImportedNAVItemAttributes_8]]></column> <column columnName="FieldTranslationFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldTranslationLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldTranslationFieldLabel"><![CDATA[TestAttr]]></column> <column columnName="FieldTranslationFieldOptions"><![CDATA[<Options />]]></column> </item> </table> <table tableName="EcomFieldOption"> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_1]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Rød]]></column> <column columnName="FieldOptionValue"><![CDATA[1]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_2]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Orange]]></column> <column columnName="FieldOptionValue"><![CDATA[2]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_3]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Gul]]></column> <column columnName="FieldOptionValue"><![CDATA[3]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_4]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Grøn]]></column> <column columnName="FieldOptionValue"><![CDATA[4]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_5]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Blå]]></column> <column columnName="FieldOptionValue"><![CDATA[5]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_6]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Violet]]></column> <column columnName="FieldOptionValue"><![CDATA[6]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_7]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Mørklilla]]></column> <column columnName="FieldOptionValue"><![CDATA[7]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_8]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Sort]]></column> <column columnName="FieldOptionValue"><![CDATA[8]]></column> </item> <item table="EcomFieldOption"> <column columnName="FieldOptionId"><![CDATA[ImportedNAVItemAttributes_1_9]]></column> <column columnName="FieldOptionFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldOptionName"><![CDATA[Hvid]]></column> <column columnName="FieldOptionValue"><![CDATA[9]]></column> </item> </table> <table tableName="EcomFieldOptionTranslation"> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_2]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Orange]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_3]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Gul]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_4]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Grøn]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_5]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Blå]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_6]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Violet]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_7]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Mørklilla]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_8]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Sort]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_9]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[Hvid]]></column> </item> <item table="EcomFieldOptionTranslation"> <column columnName="EcomFieldOptionTranslationOptionID"><![CDATA[ImportedNAVItemAttributes_1_1]]></column> <column columnName="EcomFieldOptionTranslationLanguageID"><![CDATA[DAN]]></column> <column columnName="EcomFieldOptionTranslationName"><![CDATA[DAN Rod]]></column> </item> </table> <table tableName="EcomProductCategoryFieldValue"> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_1]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[8]]></column> </item> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_2]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[70]]></column> </item> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_3]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[75]]></column> </item> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_4]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[100]]></column> </item> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_5]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[Læder, Satinpoleret aluminiumbase]]></column> </item> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_6]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[1952]]></column> </item> <item table="EcomProductCategoryFieldValue"> <column columnName="FieldValueFieldId"><![CDATA[ImportedNAVItemAttributes_8]]></column> <column columnName="FieldValueFieldCategoryId"><![CDATA[ImportedNAVItemAttributes]]></column> <column columnName="FieldValueProductId"><![CDATA[1900-S]]></column> <column columnName="FieldValueProductVariantId"><![CDATA[]]></column> <column columnName="FieldValueProductLanguageId"><![CDATA[DAN]]></column> <column columnName="FieldValueValue"><![CDATA[123]]></column> </item> </table> </tables>

The Import Product Stock feature imports product stock from NAV to Dynamicweb. By default, stock is imported as a single summed number regardless of the inventory location, but a modifier – importStockLocations – allows you to import inventory per product per location.

Product stock is also imported (as a summed number) by the Import Products feature – but this feature is comparatively light weight and can be run more frequently without impacting performance.

Standard request:

XML
//Without NAV inventory locations <GetEcomData> <tables> <ProductStock type="all"/> </tables> </GetEcomData> //With NAV inventory locations <GetEcomData> <tables> <ProductStock type="all" importStockLocations="true" /> </tables> </GetEcomData>

Standard response:

XML
//Without NAV inventory locations <?xml version="1.0" encoding="UTF-8"?> <tables> <table tableName="EcomProducts"> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1900-S]]></column> <column columnName="ProductVariantID"><![CDATA[]]></column> <column columnName="ProductNumber"><![CDATA[1900-S]]></column> <column columnName="ProductStock"><![CDATA[299]]></column> </item> </table> </tables> //With NAV inventory locations <?xml version="1.0" encoding="UTF-8"?> <tables> <table tableName="EcomStockLocation"> <item table="EcomStockLocation"> <column columnName="StockLocationId"><![CDATA[-1488406033]]></column> <column columnName="StockLocationName"><![CDATA[BLÅ]]></column> <column columnName="StockLocationDescription"><![CDATA[Blåt lager]]></column> <column columnName="StockLocationLanguageId"><![CDATA[ENU]]></column> <column columnName="StockLocationGroupId"><![CDATA[-1488406033]]></column> </item> <item table="EcomStockLocation"> <column columnName="StockLocationId"><![CDATA[1173220836]]></column> <column columnName="StockLocationName"><![CDATA[RØD]]></column> <column columnName="StockLocationDescription"><![CDATA[Rødt lager]]></column> <column columnName="StockLocationLanguageId"><![CDATA[ENU]]></column> <column columnName="StockLocationGroupId"><![CDATA[1173220836]]></column> </item> <item table="EcomStockLocation"> <column columnName="StockLocationId"><![CDATA[884247070]]></column> <column columnName="StockLocationName"><![CDATA[GUL]]></column> <column columnName="StockLocationDescription"><![CDATA[Gult lager]]></column> <column columnName="StockLocationLanguageId"><![CDATA[ENU]]></column> <column columnName="StockLocationGroupId"><![CDATA[884247070]]></column> </item> <item table="EcomStockLocation"> <column columnName="StockLocationId"><![CDATA[1602979415]]></column> <column columnName="StockLocationName"><![CDATA[GRØN]]></column> <column columnName="StockLocationDescription"><![CDATA[Grønt lager]]></column> <column columnName="StockLocationLanguageId"><![CDATA[ENU]]></column> <column columnName="StockLocationGroupId"><![CDATA[1602979415]]></column> </item> </table> <table tableName="EcomStockUnit"> <item table="EcomStockUnit"> <column columnName="StockUnitProductId"><![CDATA[1900-S]]></column> <column columnName="StockUnitVariantId"><![CDATA[]]></column> <column columnName="StockUnitId"><![CDATA[Unit_STK]]></column> <column columnName="StockUnitQuantity"><![CDATA[52]]></column> <column columnName="StockUnitStockLocationId"><![CDATA[-1488406033]]></column> </item> <item table="EcomStockUnit"> <column columnName="StockUnitProductId"><![CDATA[1900-S]]></column> <column columnName="StockUnitVariantId"><![CDATA[]]></column> <column columnName="StockUnitId"><![CDATA[Unit_STK]]></column> <column columnName="StockUnitQuantity"><![CDATA[46]]></column> <column columnName="StockUnitStockLocationId"><![CDATA[1173220836]]></column> </item> <item table="EcomStockUnit"> <column columnName="StockUnitProductId"><![CDATA[1900-S]]></column> <column columnName="StockUnitVariantId"><![CDATA[]]></column> <column columnName="StockUnitId"><![CDATA[Unit_STK]]></column> <column columnName="StockUnitQuantity"><![CDATA[160]]></column> <column columnName="StockUnitStockLocationId"><![CDATA[884247070]]></column> </item> <item table="EcomStockUnit"> <column columnName="StockUnitProductId"><![CDATA[1900-S]]></column> <column columnName="StockUnitVariantId"><![CDATA[]]></column> <column columnName="StockUnitId"><![CDATA[Unit_STK]]></column> <column columnName="StockUnitQuantity"><![CDATA[41]]></column> <column columnName="StockUnitStockLocationId"><![CDATA[1602979415]]></column> </item> </table> </tables>

The Import Countries feature imports countries from NAV/Business Central. Currently, all countries from NAV/Business are imported - for simple setups consider creating the required countried manually instead.

Standard request:

XML
<GetEcomData> <tables> <Countries type="all"/> </tables> </GetEcomData>

Standard response:

XML
<?xml version="1.0" encoding="utf-8"?> <tables> <table tableName="EcomCountries"> <item table="EcomCountries"> <column columnName="CountryCode2"><![CDATA[AE]]></column> </item> </table> <table tableName="EcomCountryText"> <item table="EcomCountryText"> <column columnName="CountryTextCode2"> <![CDATA[AE]]> </column> <column columnName="CountryTextLanguageId"> <![CDATA[ENU]]> </column> <column columnName="CountryTextName"> <![CDATA[Forenede Arabiske Emirater]]> </column> </item> </table> </tables>

The Import Prices feature is used to – as the name implies – import prices from NAV/Business Central. In its most simple form the request simply returns base prices for all products, but you can use various parameters to import prices to the Price Matrix, which is a Dynamicweb feature for assigning different prices to a product based on variables like the product unit, the language id, or the currency type. It can also be used to store informative prices like a before-price.

This works in the following manner:

  • The base request imports base prices directly to the EcomProducts table
  • A parameterized requests will import base prices to EcomProducts and more specific prices to EcomPrices, where price matrix prices are stored

Let’s have some examples.

Scenario 1:

You want to import base prices in a specific currency – NOK – rather than the ERP base currency. Your request:

XML
<GetEcomData><tables><ProductPrices type="all" setCurrency="NOK" /></tables></GetEcomData>

In response you get prices in NOK for all products. Since you’re requesting base prices they are imported to the EcomProducts table:

XML
<?xml version="1.0" encoding="utf-8"?> <tables version="1.2.0.6_NAV16.0.11293.0"> <table tableName="EcomProducts"> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1000]]></column> <column columnName="ProductVariantID"><![CDATA[]]></column> <column columnName="ProductLanguageID"><![CDATA[ENU]]></column> <column columnName="ProductNumber"><![CDATA[1000]]></column> <column columnName="ProductPrice"><![CDATA[38,982.935]]></column> </item> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1000]]></column> <column columnName="ProductVariantID"><![CDATA[VO1]]></column> <column columnName="ProductLanguageID"><![CDATA[ENU]]></column> <column columnName="ProductNumber"><![CDATA[1000]]></column> <column columnName="ProductPrice"><![CDATA[38,982.935]]></column> </item> </table> </tables>

Scenario 2:

You want to run campaign prices for a while, based on the prices of a specific user with customer number 3000. You want to import this user’s prices in norwegian kroner (NOK) and using the norwegian language code (NOR). Your request:

XML
<GetEcomData><tables><ProductPrices type="all" salesType="Customer" salesCode="30000" setLanguage="NOR" setCurrency="NOK"/></tables></GetEcomData>

In response you get the following:

  • Customer-specific prices in the chosen currency in EcomProducts.ProductPrice
  • Non-specific (“before”) prices in EcomProducts.ProductPriceBefore. This field does not exist on EcomProducts, but it is useful during development and you can of course map it to a custom product field, if you want to.
  • Customer-specific prices in the chosen currency in EcomPrices.PriceAmount. This price is set to PriceIsInformative=false since it’s marked as the standard price.
  • Non-specific prices in the chosen currency in EcomPrices.PriceAmount. This price is set to PriceIsInforative=true because it’s no longer valid, but it can be used as an Before-price in frontend.

Please note that the salesCode parameter can also take a Customer Price Group code as a value, retrieving group-specific prices instead of customer-specific prices. In a typical setup you will also have a specific D365/Nav customer for anonymous visitors, and you can use this to retrieve prices for more general B2C campaigns.

XML
<?xml version="1.0" encoding="utf-8"?> <tables version="1.2.0.6_NAV16.0.11293.0"> <table tableName="EcomProducts"> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1000]]></column> <column columnName="ProductVariantID"><![CDATA[]]></column> <column columnName="ProductLanguageID"><![CDATA[NOR]]></column> <column columnName="ProductNumber"><![CDATA[1000]]></column> <column columnName="ProductPrice"><![CDATA[3,000]]></column> <column columnName="ProductPriceBefore"><![CDATA[38,982.935]]></column> </item> <item table="EcomProducts"> <column columnName="ProductID"><![CDATA[1000]]></column> <column columnName="ProductVariantID"><![CDATA[VO1]]></column> <column columnName="ProductLanguageID"><![CDATA[NOR]]></column> <column columnName="ProductNumber"><![CDATA[1000]]></column> <column columnName="ProductPrice"><![CDATA[3,500]]></column> <column columnName="ProductPriceBefore"><![CDATA[38,982.935]]></column> </item> </table> <table tableName="EcomPrices"> <item table="EcomPrices"> <column columnName="PriceId"><![CDATA[1000NORNOK1PCS]]></column> <column columnName="PriceProductId"><![CDATA[1000]]></column> <column columnName="PriceProductVariantId"><![CDATA[]]></column> <column columnName="PriceProductLanguageId"><![CDATA[NOR]]></column> <column columnName="PriceCurrency"><![CDATA[NOK]]></column> <column columnName="PriceQuantity"><![CDATA[1]]></column> <column columnName="PriceAmount"><![CDATA[38,982.935]]></column> <column columnName="PriceUnitId"><![CDATA[PCS]]></column> <column columnName="PriceValidFrom"><![CDATA[]]></column> <column columnName="PriceValidTo"><![CDATA[]]></column> <column columnName="PriceIsInformative"><![CDATA[true]]></column> <column columnName="PriceUserCustomerNumber"><![CDATA[]]></column> </item> <item table="EcomPrices"> <column columnName="PriceId"><![CDATA[1000NORNOK0PCS30000Customer]]></column> <column columnName="PriceProductId"><![CDATA[1000]]></column> <column columnName="PriceProductVariantId"><![CDATA[]]></column> <column columnName="PriceProductLanguageId"><![CDATA[NOR]]></column> <column columnName="PriceCurrency"><![CDATA[NOK]]></column> <column columnName="PriceQuantity"><![CDATA[0]]></column> <column columnName="PriceAmount"><![CDATA[3,000.00]]></column> <column columnName="PriceUnitId"><![CDATA[PCS]]></column> <column columnName="PriceValidFrom"><![CDATA[]]></column> <column columnName="PriceValidTo"><![CDATA[]]></column> <column columnName="PriceIsInformative"><![CDATA[false]]></column> <column columnName="PriceUserCustomerNumber"><![CDATA[]]></column> </item> <item table="EcomPrices"> <column columnName="PriceId"><![CDATA[1000VO1NORNOK1PCS]]></column> <column columnName="PriceProductId"><![CDATA[1000]]></column> <column columnName="PriceProductVariantId"><![CDATA[VO1]]></column> <column columnName="PriceProductLanguageId"><![CDATA[NOR]]></column> <column columnName="PriceCurrency"><![CDATA[NOK]]></column> <column columnName="PriceQuantity"><![CDATA[1]]></column> <column columnName="PriceAmount"><![CDATA[38,982.935]]></column> <column columnName="PriceUnitId"><![CDATA[PCS]]></column> <column columnName="PriceValidFrom"><![CDATA[]]></column> <column columnName="PriceValidTo"><![CDATA[]]></column> <column columnName="PriceIsInformative"><![CDATA[true]]></column> <column columnName="PriceUserCustomerNumber"><![CDATA[]]></column> </item> <item table="EcomPrices"> <column columnName="PriceId"><![CDATA[1000VO1NORNOK0PCS30000Customer]]></column> <column columnName="PriceProductId"><![CDATA[1000]]></column> <column columnName="PriceProductVariantId"><![CDATA[VO1]]></column> <column columnName="PriceProductLanguageId"><![CDATA[NOR]]></column> <column columnName="PriceCurrency"><![CDATA[NOK]]></column> <column columnName="PriceQuantity"><![CDATA[0]]></column> <column columnName="PriceAmount"><![CDATA[3,500.00]]></column> <column columnName="PriceUnitId"><![CDATA[PCS]]></column> <column columnName="PriceValidFrom"><![CDATA[]]></column> <column columnName="PriceValidTo"><![CDATA[]]></column> <column columnName="PriceIsInformative"><![CDATA[false]]></column> <column columnName="PriceUserCustomerNumber"><![CDATA[]]></column> </item> </table> </tables>

The export users feature makes it possible to export Dynamicweb users to NAV/Business Central as customers and contacts. This typically makes sense if your solution allows new customers to register on the website, or if you make it possible for a customer to register new contacts via the website.

When this feature is implemented:

  • Users with no customer number are exported to NAV/BC as customers
  • Users with an existing customer number are exported as contacts under the customer with that customer number

This means that you should ensure that when new user accounts are registered they have an appropriate value in the Customer number field if you want them to be exported as contacts. Please also keep in mind that NAV/BC does not contain standard fields for all standard Dynamicweb user fields – please see example request/response for the fields which are included by default.

When it comes to addresses:

  • Addresses on a Dynamicweb user which is exported as a customer are created as ship-to addresses in NAV/BC.
  • Addresses on a Dynamicweb user which is exported as a contact are treated in the following manner:
    • If the address is present on the parent customer account & all other contacts under the parent it is created as an additional ship-to address on the customer in NAV/BC
    • If the address is not present on all contacts & the parent customer it is created as an alternative address on the contact in NAV/BC

Standard request:

XML
// Request customer <?xml version="1.0" encoding="UTF-8"?> <PutEcomUsers> <table tableName="AccessUser"> <item table="AccessUser"> <column columnName="AccessUserId"><![CDATA[602]]></column> <column columnName="AccessUserUserName"><![CDATA[company8@myurl.url]]></column> <column columnName="AccessUserName"><![CDATA[Company Eight]]></column> <column columnName="AccessUserEmail"><![CDATA[company8@myurl.url]]></column> <column columnName="AccessUserPhone"><![CDATA[22222228]]></column> <column columnName="AccessUserFax"><![CDATA[44444448]]></column> <column columnName="AccessUserAddress"><![CDATA[My Address]]></column> <column columnName="AccessUserAddress2"><![CDATA[My Address 2]]></column> <column columnName="AccessUserZip"><![CDATA[8000]]></column> <column columnName="AccessUserCity"><![CDATA[Aarhus]]></column> <column columnName="AccessUserMobile"><![CDATA[33333338]]></column> <column columnName="AccessUserCustomerNumber"><![CDATA[]]></column> <column columnName="AccessUserCurrencyCharacter"><![CDATA[DKK]]></column> <column columnName="AccessUserActive"><![CDATA[True]]></column> <column columnName="AccessUserExternalID"><![CDATA[]]></column> <column columnName="AccessUserCountryCode"><![CDATA[DK]]></column> </item> </table> </PutEcomUsers> // Request contact <?xml version="1.0" encoding="UTF-8"?> <PutEcomUsers> <table tableName="AccessUser"> <item table="AccessUser"> <column columnName="AccessUserId"><![CDATA[603]]></column> <column columnName="AccessUserUserName"><![CDATA[contact1company8@myurl.url]]></column> <column columnName="AccessUserName"><![CDATA[Contact1]]></column> <column columnName="AccessUserEmail"><![CDATA[contact1company8@myurl.url]]></column> <column columnName="AccessUserPhone"><![CDATA[92222228]]></column> <column columnName="AccessUserFax"><![CDATA[94444448]]></column> <column columnName="AccessUserAddress"><![CDATA[My Address contact1]]></column> <column columnName="AccessUserAddress2"><![CDATA[My Address 2 contact1]]></column> <column columnName="AccessUserZip"><![CDATA[8000]]></column> <column columnName="AccessUserCity"><![CDATA[Aarhus]]></column> <column columnName="AccessUserMobile"><![CDATA[93333338]]></column> <column columnName="AccessUserCustomerNumber"><![CDATA[C00150]]></column> <column columnName="AccessUserCurrencyCharacter"><![CDATA[DKK]]></column> <column columnName="AccessUserActive"><![CDATA[True]]></column> <column columnName="AccessUserExternalID"><![CDATA[]]></column> <column columnName="AccessUserCountryCode"><![CDATA[DK]]></column> </item> </table> </PutEcomUsers>

Standard response:

// Response customer <?xml version="1.0" encoding="utf-8"?> <createdUsers version="1.2.0.9_NAV17.0.16974.0"> <user> <userId>602</userId> <externalUserId>C00150</externalUserId> <externalCustomerNumber>C00150</externalCustomerNumber> </user> </createdUsers> // Response contact <?xml version="1.0" encoding="utf-8"?> <createdUsers version="1.2.0.9_NAV17.0.16974.0"> <user> <userId>603</userId> <externalUserId>CT000283</externalUserId> <externalCustomerNumber>C00150</externalCustomerNumber> </user> </createdUsers>

Export & Import Addresses

Please note, that when new addresses are exported from Dynamicweb to NAV/Business Central, you risk importing them again as duplicate data if your setup imports addresses from NAV/BC. To avoid this edit the import job and set the key settings for the field AccessUserAddress to AccessUserAddressUId AND AccessUserAddressUserId.

XML attributes are used by both batch integration add-ins and the live integration to trigger a particular behavior on the remote side or in the Connectors, such as batch sizes, reimports, and so on.

Some attributes may have to be added manually to your request, depending on the integration architecture.

Here is a (partial) list of attributes and what they are used for:

Attribute

Values

Use

CustomModifier

Any string

When two instances of a website point to one remote instance, this attribute allows the data to be synchronized independently.

If you wish to extend which columns are included in the reponses from Business Central you can configure custom fields for the following objects:

Item, Customer, Contact, Sales Header, Sales Line, Sales Invoice Header, Sales Invoice Line, Sales Cr.Memo Header, Sales Cr.Memo Line.

Adding custom fields to entities imported from Business Central can be done with the Dynamicweb Custom Fields List or the Dynamicweb custom field configuration edit in D365 Business Central.

The easiest way to locate these pages is to use the search function in BC as depicted below.

 

Figure 15.1 Locating the Dynamicweb custom field edit pages in Business Central

To configure a custom field follow these steps:

  • Open the Dynamicweb Custom Fields List page
  • Select the table you wish to extend from the dropdown (A in the screenshot below)
  • Select the field you wish to add - the field must be selected from the list - click the meatball menu (B) to do so
  • Make sure the custom field is activated in the checkbox (C)

When you finished this setup the configured custom fields should be included in the response from Business Central.