NP Ecommerce Support

Search




NAVICONNECT

NaviConnect is the bridge between Magento and Navision. It is the interface which enables our customers to manage their data i n Navision, but also operate a Magento website in parallel with the same information used for the POS and NAV.

NAVICONNECT Setup

Configurations for NaviConnect have to be made in both Magento and Navision.

The Magento admin has some configurations that handles the NaviConnect integration, which is helpful in debugging issues from the Magento side or providing fallbacks to manage some data integration. Let's take a look at where we can make NaviConnect configurations in Magento admin.

Go to Menu -> NAVipartner -> NaviConnect -> Configuration / Images / Orders / Products / Export Log / Import Log :

This is the main connection details regarding the webservice for the integration.
Click Configuration under NaviConnect menu list.

Environment: Select options from Dev / Test / Production
By default, this value is set to Dev and should be reflecting the current state of the site.

WSDL Cache Enabled?: Yes or No. This is an option to enable caching of NAV integration files.
Authentication Type: Basic or NTLM. Automatically populated by NaviConnect.
Domain: Domain name of the server. Automatically populated by NaviConnect.
Username: username to access the server. Automatically populated by NaviConnect.
Password: password to access the server. Automatically populated by NaviConnect.

Click on Save Config button to save configurations entered on the page.

The service to control how orders are sent from Magento to Navision.
Click Orders under NaviConnect menu list.

Service URI: link to the webservice. Automatically populated by NaviConnect.
Export Prices In: Select which currency is sent with the orders to Navision.

  • Use Order Currency: Send the currency that is currently displayed on the site.
  • Use Base Currency: Send the currency that the site has been setup with.
  • Use Currency Used For Paying Order: Send the currency that the order was completed with.

Click on Save Config button to save configurations entered on the page.

Configure how product data sent from Navision is interpreted and saved by Magento.
Click Products under NaviConnect menu list.

Websites: Choose under which store the products are saved. The default value is Main Website.

Field Mapping: This is the place where product data fields are mapped from Navision to Magento.

  • Attribute Code: the field name in Navision
  • Mapped Value: the field name in Magento
  • Overwrite: Yes or No. Choose to ignore a field mapping, so that those values are not transferred to Magento during the next Navision Synchronization. This means that data from Magento admin will be displayed for that particular field.
  • Add: Add new field mappings.

Create field mappings for product custom attributes in Magento.

  • Attribute Code: the field name in Navision
  • Mapped Value: the field name in Magento
  • Overwrite: Yes or No. Choose to ignore a field mapping, so that those values are not transferred to Magento during the next Navision Synchronization. This means that data from Magento admin will be displayed for that particular field.
  • Add: Add a new line of field mapping.

Click on Save Config button to save configurations entered on the page.

General settings for the NaviConnect integrations.
Click Setup under NaviConnect menu list.

Is Credential Set: Check to see if the integration has already happened for a first time, with all the correct credentials.
Secret Key: A key used to create a hash from the username/password. Generated automatically.
Token Key: An access token created from the username/password. Generated automatically.

Combine codes: Yes or No. To merge the carrier and code values.

Show Paypal: Yes or No. To enable the paypal payment method.
Hide Payment Type: Yes or No. To hide the payment type from sales orders sent to Navision.

Click on Save Config button to save configurations entered on the page.

Orders made in Magento are sent back to Navision in XML format. A log of all the transfers of orders is stored for consultation or possible debugging in case of errors.

ID: Identification number of the order in Magento.
Entity Id: Identification number of the order in Navision.
Entity Code: The type of transfer being made. In this case, it is order.
Updated: Date the order was created.
Status: The current status of the order. Failure or Success or In Progress.
Action: View the order in more details. The Request XML, Errors if any and a JSON version of the data can be reviewed for that particular order.

A record of all data imports that are sent from Navision during Synchronisation are stored as logs for consultation. There are numerous types of data sent from Navision: category, product, stock_update, image, websites, attributes, attribute_sets, tax_classes, shipping_methods, payment_methods, etc.
Click Import Log under NaviConnect menu list.

ID: Identification number of the transfer in Magento.
Entity Id: Identification number of the transfer in Navision.
Method: The PHP method used to transfer the information.
Entity Code: The type of transfer from Navision. Determines the XML template defined for the data transferred.
Updated: The date the transfer was made.
Status: The current status of the transfer.
Duplicate: If the information received is a possible duplicate of another previous transfer.
Action: View more detailed information about that particular data transfer. The Request XML or JSON and Errors if any can be viewed.

This is a fallback option to force compression of product images by Magento, if for any particular reason this was not done by Navision.
Click Import Log under NaviConnect menu list.

Compression Active: Yes or No. To set compression on product images coming from Navision.

Click on Save Config button to save configurations entered on the page.

Now, let's see how to configure NaviConnect in NAV, so we can link our webshop to the Navision company.

Click on Department, then under Magento click on Setup

On the Setup window, click on Magento Setup

A new window will popup with all settings that make the Navision connection to Magento, these will be found under General:


Magento Enabled: Check. This is the single option that should be checked to indicate that NaviConnect is now enabled.
Magento URL: Insert the webshop URL. NaviConnect will create the link to the URL which is inserted here.
Api URL: Automatically populated. The URL of the webshop inserted above, should be appended with the webservice URL, for example, www.webshop.dk/rest/V1/NaviConnect/
Api Username Type: automatic or custom. not required for magento 2 setup
Api Username: not required for magento 2 setup
Api Password: not required for magento 2 setup
Api Authorization: the access token, is necessary to validate the connection between Magento and Navision. This field is automatically populated.
NpXML Setup: Yes. Generates XML templates for the diverse types of data transfer that is possible between Magento and Navision.
Managed NAV Modules Enabled: Check. To enable several types of content modules in NaviConnect.
Managed NAV Api URL: Fixed URL for the webservice.
Managed NAV Api Username: Fixed username for the webservice.
Managed NAV Api Password: Fixed password for the webservice.
Version Number: The version number for the templates being used.
Version Coverage: A check to see the compatibility of all the templates being deployed.


After filling the above information, it's time to activate the integration. This is done in Menu -> Actions -> Api Integration -> Setup Magento Api Credentials:

Once the setup has been successfully completed, an entry is automatically created in the Magento Integration list, which is a record of API connections to the site. This can be found from Menu -> System -> Extensions: Integrations:


There will be an entry in the list under the name NAViconnect Api, with a Status of Active. This can be viewed by clicking on the Edit icon like in image below:


The window will show the Basic Settings of the connection, including the important field of Access Token – should match with the Api Authorization field as seen in Navision above.

Name: The name of the API Connection. Automatically set to NAViconnect Api
Email: Not required – enter email address
Callback URL: Not required - URL where Oauth credentials can be sent when using Oauth for token exchange.
Identity link URL: Not required.

Your Password: Enter password of the Magento admin account, if making some changes to the page.

Consumer Key: Automatically generated value, used in generating the Access Token.
Consumer Secret: Automatically generated value, used in generating the Access Token.
Access Token: The Access Token generated from a combination of other key fields, this is the key which validates the NaviConnect connection with Magento.
Access Token Secret: Automatically generated key, used in generating the Access Token.

Since NaviConnect was originally built for Magento 1, we need to make some tweaks to get it to work properly with Magento 2 sites. This involves creating mappings for the buttons that we will use for the different connection areas.
Go to NAVigate, then click on Event Subscriptions, a new popup window will appear: Edit- Magento Setup Event Subscriptions:

Type: Select the function name from the dropdown list
Codeunit Id: This field is automatically populated.
Function Name: Click on the field to get a lookup table with the corresponding values for the type.
Enabled: Check. To make the mapping active.
Codeunit Name: This field is automatically populated.
Click on OK or Refresh to save the entries.

In the Magento setup window, click on the tab Moduler to show the options for the different modules available for use. Here, we check the features that our webshop will contain, this will help in generating the correct and proper amount of XML templates required for the current site needs.
Variant System: Variety. This option is selected when there will be products of type configurable in the shop. This sets the feature to use variant products to build the configurable product.
Variant Picture Dimension: This will give a look up table to select the product attribute that will be used to make the image swatches feature on magento.
Miniature Picture: Choose the type of image output for the product thumbnails in Navision.
Max Picture Size (kb): The maximum size in kilobytes, that can be uploaded for product images in Navision.
B2C Modules
Multistore Enabled: Check, to enable multiple stores feature on the website.
Brands Enabled: Check, to enable brands (manufacturer) module on the website.
Attributes Enabled: Check, to enable product attributes feature on the website.
Product Relations Enabled: Check, to enable product relations (related products) feature on website.
Special Prices Enabled: Check, to enable special prices feature on website.
Tier Prices Enabled: Check, to enable tier prices feature on website.
Customer Group Prices Enabled: Check, to enable customer group prices feature on website.
Gift Voucher Enabled: Check, to enable gift voucher feature on website.
Custom Options Enabled: Check, to enable custom options feature on website.
Bundled Products Enabled: Check, to enable bundled products creation on website.
Tickets Enabled: Check, to enable tickets feature for the website.
B2B Modules
Customers Enabled: Check, to enable B2B customers feature on website.
Sales Price Enabled: Check, to enable B2B sales price feature on website.
Sales Line Discounts Enabled: Check, to enable B2B sales line discounts feature on website.
Item Disc. Group Enabled: Check, to enable B2B item discount group feature on website.


After filling the above information, we have to regenerate (a list is already created by default) the list of XML templates. This is done in Menu -> Actions -> Api Integration -> Setup NpXML Templates:


After the setup of the XML templates, these can then be viewed for future reference or processing in Departments -> NaviConnect -> NpXml:

Enable Gift Voucher, also known as Gift Certificate in Magento, on the current webshop. Most of these values are already setup by default.

Activate Gift Voucher: On Insert / On Posting. Select when the gift voucher item will be registered in NAV.
Gift Voucher Item No.: Choose the item (product) from the dropdown list, that will be treated as the gift voucher product.
Gift Voucher Account No.: Select the account number from dropdown menu, where the payment details from gift voucher sales will be stored.
Gift Voucher Report: Select the report in NAV where the statistics and data about voucher sales will be generated.
Gift Voucher Language Code: Choose a language code to associate the gift voucher with from the dropdown menu.
Gift Voucher Validity: Duration of the voucher validity.
Gift Voucher Code Pattern: The unique code for the voucher identification.
Gift Voucher Generic Setup: An interface with options to customize the look and feel of the main data information to be printed on the voucher. Edit the font name, color, style, size and others of the fields individually.
Voucher Number Format: Define the format of numbers that will be displayed on the gift voucher.
Voucher Date Format: Define the format of the dates to be displayed on the gift voucher.
Gift Voucher Bitmap: The image of the gift voucher, where the voucher information will be displayed using X and Y coordinates.

Enable Credit Voucher (handled by NAV only, that is, Magento not involved in the process) for the current webshop customers having bought the Gift Voucher. Most of these values are already setup by default.

Credit Voucher Account No.: Select the account number from dropdown menu, where the payment details from credit voucher sales will be stored.
Credit Voucher Report: Select the report in NAV where the statistics and data about voucher sales will be generated.
Credit Voucher Language Code: Choose a language code that will be associated with the credit voucher.
Credit Voucher Valid Period: Set the duration of the voucher validity.
Credit Voucher Code Pattern: Set the unique code for the voucher identification.
Credit Voucher Generic Setup: An interface with options to customize the look and feel of the main data information to be printed on the voucher. Edit the font name, color, style, size and others of the fields individually.
Credit Voucher Bitmap: The image of the credit voucher, where the voucher information will be displayed using X and Y coordinates.


Replicate to Sales Prices: Check to automatically set products special price to match that of their sales price. Affects only products that already have a sales price defined first.
Replicate to Sales Type: This option is available when the above setting is checked. Choose the customer group for which the sales price will be displayed.

Settings to manage how product stock is updated from Navision to Magento.

Inventory Location Filter: Select locations from where the product stock quantity will be synced to Magento. The default is All locations. Use | to separate multiple locations eg. A|B
Intercompany Inventory Enabled: Check to use inventory from all the stores for product quantity inventory.

Settings on how to create customers from Sales Orders import from Magento.

Customer Mapping: Choose the field to check in order xml for customers that are already created.
Customer Posting Group: Select the customer group to put new customers in.
Payment Terms Code: Define how the customer will make payments. Choose from the dropdown lookup list.
Customer Template Code: Select the default predefined template with specific fields to build the new customer data.
Customer Config. Template Code: Choose customer information templates with prefilled information.

Choose settings on how to handle order imports from Magento.

Payment Fee Account No.: Select the account where payment fees will be set from the orders.
Note: Payment Fees refer to commission fees to pay to merchants and not to be confused with Payment Amount.
Salesperson Code: Select the salesperson code to identify the source of the order imported. Should normally be WEB.

Next step is to setup the Magento websites and stores. This step is done directly in Magento admin.
Log into Magento admin, then click on Stores from the main menu. The page will contain a list of Websites if already available, and the buttons to either Create Website, Create Store or Create Store View:


Click on Create Website:


Enter the following web site information:
Name: Write the name of the website
Code: Give a unique value to the website.
Sort Order: Numeric, sort order is optional value. This determines the order to load the websites if there is more than one.
Click on Save Web Site to save the information.
Next step is to click on Create Store:

Enter the following information:
Web Site: Select the Website to assign the Store to.
Name: Give a name to the store for easy identification.
Code: Assign a unique value to the store.
Root Category: Set a root category that will be assigned to the store. This will display products on the store from the selected root category only.
Click on Save Store to save the store information.
The next and final step is to create a store view for our new store.
Click on Create Store View:

Enter the following information:
Store: Select the store in which our new Store View is associated with.
Name: Set a name for identification of the store view.
Code: Assign a unique code value to the store view.
Status: Enabled or Disabled. Select to make store view active.
Sort Order: Numeric value. Give a loading sort order if there are more than one store view.
Click on Save Store View to save the store view information.


Once we are done in Magento admin, we have to import the information into Navision. This is done via Menu -> Actions -> Api Integration -> Setup Magento Websites:


After processing, we can then view our newly created website information in Departments -> Magento -> Content -> Administration: Setup -> Websites:


Code: The website code as setup in Magento admin
Name: The name of the website for identification as setup in Magento admin
Std Website: Check
Department Code: Not required
Location Code: Not required
Stores : List of stores associated with the current selected website
Code: The store view code as setup in Magento admin
Name: The name of the store view as registered in Magento admin
Language Code: Not required

Not available for Magento 2.

Tax classes are created in Magento webshop admin, then an import is made to list the tax classes in Navision.
To import tax classes, we go to Menu -> Actions -> VAT -> Setup Magento Tax Classes:


Clicking on Setup Magento Tax Classes will process the information from Magento.
The list can then be found in Departments -> Magento -> Setup -> Administration: Tax Classes:

Name: The name of the tax class as created in Magento
Type: The type of the tax class as created in Magento. Normally, it's either Item (product tax class) or Customer (customer group tax class)
Customer Config. Template Code: Assign the tax class to a specific customer group template in Navision when creating new customer entry.

To setup VAT business posting groups, we go to Menu -> Actions -> VAT -> Setup VAT Business Posting Groups:


Click Yes on the popup Check VAT Business Posting.
All the information regarding VAT Business Posting is pulled from standard Navision.


A new window will pop up with title Edit - VAT Business Posting Groups:

VAT Business Posting Group: The code for the VAT business posting group.
Description: Text description of the VAT business posting group.
Magento Tax Class: Dropdown to select the equivalent mapping from Magento customer tax classes.

To setup VAT product posting groups, we go to Menu -> Actions -> VAT -> Setup VAT Product Posting Groups:

Click Yes on the popup Check VAT Product Posting.

A new window will pop up with title Edit - VAT Product Posting Groups:

VAT Product Posting Group: The code for the VAT product posting group.
Description: Text description of the VAT product posting group.
Magento Tax Class: Dropdown to select the equivalent mapping from Magento product tax classes.

Payment methods are setup in Magento webshop admin first, then an import is made to create a mapping with Payment Methods that exist in Navision.
To setup payment methods mappings, we go to Menu -> Actions -> Mapping -> Setup Payment Method Mapping:


Click Yes in the popup Check Payment Mapping?
This will show a new popup window called Edit – Payment Method Mapping:

Click on Setup Payment Methods to make the import automatically, then fill out their equivalent matching information as required.
Note: This step should be repeated each time new Payment Methods are added in Magento.
External Payment Method Code: The payment methods list imported from Magento.
External Payment Type: The payment method code assigned to this payment type.
Payment Method Code: Select the equivalent payment method from the dropdown list. If not found there, click on New to create a new Payment Method.
Allow Adjust Payment Amount: Not required.
Payment Gateway Code: Not required.

Shipping methods are setup in Magento webshop admin, then an import is made to create a mapping with Shipping Methods that exist in Navision.
To setup payment methods mappings, we go to Menu -> Actions -> Mapping -> Setup Shipping Method Mapping:


Click Yes in the popup Check Shipment Mapping?
This will show a new popup window called Edit – Shipping

Click on Setup Shipping Methods to make the import automatically, then fill out their equivalent matching information as required.
Note: This step should be repeated each time new Shipping Methods are added in Magento.
External Shipment Method Code: The shipping method list that is imported from Magento.
Shipment Method Code: Select the equivalent Navision Shipping Method from the dropdown list. If not found, click on New to create the missing Shipping Method.
Shipping Agent Code: Optional. Third party agents associated with the current shipping method.
Shipping Agent Service Code: Optional. Code for third party agents associated with the current shipping method.
Shipment Fee Account No.: Required. The associated Shipping account to make payments to.