With this interface xentral can be connected to Magento 2 to import orders from there into xentral and to manage the items sold in the store in xentral. The connection is done via an API interface (store importer). The creation and dispatch of delivery bills and invoices is handled via xentral, as is returns management. Updated order statuses, tracking numbers of shipped deliveries, and stock numbers of items are automatically reported back to the store by xentral via process starter.
This module is particularly relevant for anyone who uses or wants to use Magento 2
-
Pick up orders from Magento 2
-
Change order status on shipment
-
Article fields are transferred to Custom Attributes
-
Transfer of marketing block
-
Create user:
In Magento, a new user must be created under System → All Users → Add New User.
-
Fill in account information :
-
Fill in all data
-
for xentral the fields "User Name" and "New Password" are needed
-
Enter the password of your user at the bottom and save the changes with "Save User" at the top.
-
-
Check user role :
Under "User Role" the user should be marked as administrator.
-
Create store interface :
Under Administration → Shop interface → Overview → NEW you can search for Magento 2:
-
Enter Magento 2 data :
A store name has to be assigned and for now the settings have to be set as shown in the screenshot. Then enter the Magento data into the fields:
-
Check connection :
Finally, click on "Check connection" to check whether the connection has worked.
If an error occurs, check whether the access data from Magento has been correctly stored in xentral.
Under the credentials there are a number of settings that are especially relevant for Magento2 stores.
Settings:
-
Designation → Name freely selectable for the shop (will be displayed e.g. in the product and in the import menu)
-
Active → Check the box to make the interface active. You can set interfaces that are no longer needed to inactive
-
Project →Link the shop to a particular project. In the project, you can define the logistics-related settings.
-
Fetching mode → For Magento 2, you can define the fetching to happen for a specific status.
-
Import mode → Define if orders are to be imported manually (when you trigger it) or automatically
-
Demo (for testing) → The order status will not be changed, no articles or stock numbers will be transferred
-
Manually (via import center) → Orders are only imported when you click the Fetch orders button
-
Automatically (as specified by a process starter) → The orders will automatically be fetched from the shop. For this, the process starter shopimporter must be active.
-
-
Only 1 order per request → Only 1 order per request is transferred from the store
-
Orders in intermediate table → When picking up the orders, the orders are not created directly, but first stored in an intermediate table for review. Here you can decide which orders should be created and which should be imported later.
-
Limit the number of retrieved orders → The number of retrieved orders is limited here, 0 means that a maximum of 100 orders are retrieved.
-
Logging in the logfile → Creates entries in the logfile when activated. This makes it easier to find the cause in case of an error afterwards
-
User → The user who has access to the API must be entered here. Usually an administrator
-
Password → The password for the API user must be entered here.
-
Shop Url → Your URL to access the shop.
-
Automatically export BOM sub-items → If enabled, the sub-items will be exported when a BOM is exported to the store.
-
Status "for pickup" → Status of the orders that xentral is to pick up.
-
Status "in process" → Status to which orders should be set after pickup to xentral.
-
Status "completed" → status to which order will be switched when order has been processed in xentral. By default "completed" if nothing is entered.
-
Attribute codes for properties → When importing articles from Magento to xentral, the attributes of the article can be imported directly as properties. For this purpose, however, the attributes to be imported must be specified in this field using the attribute codes from the Magento backend.
-
Attribute codes that should be shown in the order during the order import →
-
Normal / Reduced Tax ID → If existing tax rates in Magento are to be used when exporting items from xentral to Magento (instead of xentral creating the tax rates 7% or 19%), the IDs of the tax rates from the Magento backend must be entered here.
-
Root category ID → When exporting articles or the article tree from xentral to Magento 2, they will be transferred to the root category of Magento2 set here.
-
Adjust attribute type on demand → When exporting articles from xentral to Magento, the type of the attribute in Magento can only be adjusted if the attribute is deleted and created again. This process can be caused by this setting.
-
Show expanded BOM list → If selected, all items from the bill of material will be listed in the order document.
Actions:
-
Check connection → Here you can check the correct connection to Gambio.
-
Fetch orders → Fetches all orders from the store that match the settings.
-
Shop import intermediate table → Jumps to the intermediate table of orders from the shop. The intermediate table is filled only in manual import mode and if the 'Orders in intermediate table' option is enabled.
In the intermediate table, in the left column, you select between Import, Trash, and Later:
-
Import: The order is imported directly
-
Trash: Order is put into the trash bin and cannot be imported again.
-
Later: order can be imported at a later time.
-
-
Transfer item tree → Transfers the item tree from Xentral to the Magento 2 shop.
-
Pick up item list → Imports items from your Magento 2 store to xentral. Store items that were already in xentral will be updated, missing items will be created. The items will be gradually fetched by the Item Import process starter after the action is executed.
How to make other settings as well as the payment method and shipping method mapping is explained in the article Shop settings.
Important
Subshop (subshop mapping) and Group mapping are not available for Magento 2.
The mapping mechanism employs the attribute codes. You can choose the names of the free fields in Xentral freely; the importer transforms them into valid attribute codes (e.g., Color External is transformed into color_external).
If you want to map existing free fields between Xentral and Magento, you need to start with setting the scope of the attribute in Magento to "global". You can change this in Magento under Stores → Attributes → Product at the corresponding attribute. The setting is called Advanced Attribute Properties.
If attributes are created anew in Magento during the export from Xentral, the scope will be set automatically to global. Take care to avoid accidental undesired matchings caused by unsuitable free field names in Xentral.
To map products from Magento 2 to Xentral external item numbers are needed.
To map your products from Magento 2 to Xentral:
-
Go to Master data > Product and open the product you want to map.
-
Open the External numbers tab.
-
In the Create section, enter sku into the Designation field.
-
Enter the item number of your product into the External number field.
-
Select your Magento 2 shop in the Shop field.
-
Optional: Select the Barcode scanner check box. This means that the external number can be used for scanning in the dispatch center or when inserting into documents.
-
Select the Active check box.
-
Click Save.
If you don't map your existing products to Magento 2, new products will be created during sales order import.
In the Attribute Mapping tab, the properties and free fields of an article can be mapped from xentral to attribute types of Magento2. This allows an exact transfer of article properties and free fields to the desired attribute type of Magento.
-
Attribute → Here is the attribute code
-
Parameter → For Select and Multiselect you can pass a parameter list.
When creating the attributes, the parts are then created as options. Individual values are separated by pipes. It is also possible to mark a parameter as a default option by appending ;1. If nothing, or ;0 are appended to the respective value, the value is marked as not default.
The parameters are only transferred for newly created attributes. It is not possible to append a parameter to an attribute afterwards using this mechanism. If an item is transferred with a property whose value does not yet exist in the attribute's option list, the value is then created as an option by the importer.
If an attribute exists in the store but has a different type than is set in the extended mapping, if the option "Adjust attribute type if needed" is set (see above), the attribute will be deleted from Magento and recreated. Changing the type of the attribute is not possible on the part of Magento. If this option is not set, the attribute type will not be changed.
Without mapping, all attributes are created as type "Text". The mapping refers to the attribute code that xentral transfers. This means that it does not matter whether the attributes are properties or free fields, the attribute code is decisive.
Important
If an attribute is deleted, then also all data to the attribute are deleted! These must be transferred then with all articles again.
When importing orders, Magento 2 allows you to choose between two pickup modes, pickup by order status or order number.
If the orders are to be picked up from a certain order number, "from number" can be selected and below the order number from which the orders are to be picked up. xentral will then import orders from and including this order.
Magento 2 expects a request to the order ID, not the actual order number, in the pickup mode "from number". It should therefore be noted that the order ID must then be entered, which can be found in the Magento backend in the URL of the order or which appears as the value 1 at the bottom of the log. The also so-called "order ID" in the order overview in the Magento 2 backend corresponds to the value 2 in the log and cannot be recognized here.
However, the value 2 is then entered as the Internet number in the orders, because it also represents the actual order number in the Magento interface.
If orders are to be picked up by order status instead, the designations of the two statuses from Magento can be entered below. xentral then knows which orders are to be picked up with which status and to which status the orders are to be switched in the store once they have been processed.
The Magento 2 importer can transfer the customer comment in the shopping cart of an order as free text to the order in xentral. If the customer has left several comments, however, only the first comment is transferred, since the order status messages are in the same data structure. Otherwise, there would be a risk that status messages would be interpreted as comments.
When using attributes, the attribute set is always relevant. There are two ways to select the attribute set:
-
Store the ID of the attribute at the property with the name 'AttributeSetID'.
-
Store the name of the set to be used in the property with the name 'AttributeSetName'.
The attribute set is visible in Magento in the article table.
If no attribute set is set in the properties, the article will be assigned to the default group by default.
Important
With attribute sets there is always an exception for matrix articles. Here it is the case that the attribute set formed from the matrix properties is prioritized.
The link works via attribute codes. The free fields can be named freely in xentral and are then converted to a valid attribute code by the importer (e.g. color_outside becomes color_outside).
If existing free fields are to be linked between xentral and Magento, the scope or validity range of the attribute in Magento must first be set to Global. This can be set in Magento under Stores → Attributes → Product in the respective attribute. The setting can be found there under Advanced Attribute Properties.
If attributes are newly created in Magento by an export from Xentral, the scope is automatically set to Global. It is important to ensure that the names of the free fields in Xentral are selected in such a way that no unwanted matches occur after the conversion to attribute codes.
It is possible in xentral to set the field "Marketing block" by an import. As soon as a customer has indicated that he does not want to receive a "Newsletter", this information can be imported via the button "Import from ...".
To do this, the "manual address transfer" checkbox must be set in the online store interface, otherwise the button will not be displayed in the address.
When reserving items in Magento, there can be problems such as inconsistencies in automatic inventory reconciliation, which have been occurring since the introduction of MSI. That is, since the actual inventory on the product is not cleared until the shipment is created, the inventory level is not consistent from the time the order is placed until it is shipped, even if the updated inventory level is imported in the meantime.
Example:
-
Regular inventory import: product A has an inventory of 5.
-
A customer buys product A; the stock is reserved accordingly: The stock level remains 5, plus there is a reservation, so everything is still correct.
-
The order is sent to xentral.
-
Regular inventory import: product A has an inventory of 4, because xentral has deducted the inventory in the meantime. The sellable quantity is 4 - 1 = 3 and therefore incorrect or inconsistent.
-
The shipment is created in Magento; the reservation is cleared: The sellable quantity is 4 - 0 = 4 and thus correct again.
-
Regular inventory import: product A has an inventory of 4 (correct again).
Solution:
To avoid such inconsistencies, reservations must be disabled in Magento, since xentral is the inventory managing system. There is a plugin from Ampersand for this purpose. This plugin restores the "old" behavior before the introduction of MSI. Thus, no reservations are created, but the stock is deducted directly when the order is received. This prevents inconsistencies when reconciling with xentral.