Articles on: nShift Delivery - Magento 2
This article is also available in:

nShift Delivery for Magento 2 / MANUAL

nShift Delivery for Magento 2 - Manual



Latest version: v2.3.64 released on 2023-12-15

System requirements



Magento 2.3.6+, 2.4+

Functions



Shipping selector widget in checkout
Order automation (optionally)
Create booked shipments
Create reserved shipments
Create shipping labels
Create return labels
Print shipping & return label at the same time
Print shipping labels in bulk
Print labels as one document in bulk
Create tracking link
Include tracking links in order emails
Track & Trace from Magento 2 dashboard
Change shipping method after receiving an order
Change shipping carrier, weight or other order info after receiving an order
Process several orders simultaneously

Before we start



To be able to use this extension you will need a nShift Delivery Account (Standard or Plus). You will also need the OrderConnect add-on.

Create your nShift Delivery account
If you don’t have any nShift Delivery account today, contact our support and we will help you apply for one.

Questions and support regarding nShift
Questions or support regarding nShift services or settings at Unifaunonline.com, please contact nShift directly. Use e-post: [email protected] or phone: +46-31-725 35 50

Regarding this manual and instructions
This manual does not cover all possible angles of the extension, just the basics. Since many options and add-ons is depending of your choice of carrier you may have to contact us for further instructions. If you have any questions about the extensions, please feel free to contact us at [email protected].

Notes about Magento 2.4.0
Magento introduced an issue that prevents any shipping labels to be created (un-related to this module), so you need to follow instructions here to patch away the issue.

Installation



Follow instructions below to properly install the extension according to your license.

In order to be able to install the module you first need a product license, you get the product license when you buy the product from the Oktagon Shop.

Install via Composer

composer config repos.oktagon composer https://username:password@license.oktagon.se/
composer require mediastrategi/unifaun


Note: Replace username and password above with your produce license credentials that you received earlier

Install & Setup

Run the following commands to install and setup the module. Test on a staging server first. Enter username and password when prompted. (Replace xx_YY or the other languages with the ones you use.)



bin/magento maintenance:enable
bin/magento cache:flush
bin/magento module:enable Mediastrategi_Unifaun
bin/magento cache:enable msunifaun_cache_partners
bin/magento cache:enable msunifaun_cache_pickuplocation
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy en_US sv_SE xx_YY
bin/magento maintenance:disable




Restart varnish (optional)

service varnish restart


We also have a tutorial "How to use nShift Delivery for Magento2" with english subtitle.



Configuration



After you have installed this extensions you need to follow these steps.

Login to the Magento 2 dashboard

In the dashboard main menu… click Sales in the left sidebar menu and choose nShift Delivery > Configuration
Click the “Credentials” tab in the middle.



Login to your nShift Delivery account. Click Maintenance > API Keys. If you don’t have any API Keys since before you can create them by clicking on the button called “New API key”. If you already have API Keys just make sure you have the right Type, see below.

Then choose:
Status = “Enable”
Type = “Web services (REST)
Developer-id = 0020015111
Click the button called “Finish” to Save.

nShift will now generate your API Keys, (if you need support, please contact nShift support at e-mail: [email protected] or phone: +46-31-725 35 50).

Now you can see your API keys at Maintenance > API Keys then click search-button and then the blue view-button in the results (the left button)
Go back to the Magento 2 admin dashboard (go into nShift Delivery > Configuration > Credentials (the tab in the middle).
Add (pair) your keys like this:

API Key ID = Id (generated by Unifaunonline.com)
API Key Secret = Secret id (generated by Unifaunonline.com)
User ID = Your nShift User id (Login in to Unifaunonline.com)
Quick ID = 1 (Quick Id to your Sender at Unifaunonline.com)

Click “Options” tab in the middle
The Shipping label will show order number as standard but with the prefix “msunifaun_”. You can change the prefix if needed. If you leave it blank it will show the standard prefix Edit the 9-9. Sender reference prefix here.
You can choose between Product names, Product categories or Empty to show up as Contents on the shipping label. Make your choice under Parcel contents.

Product names shows name of content, ex Blue Cotton Shirt XL
Product categories show category of the product, ex Shirts
Empty leaves Contents field blank on shipping label


If you will use checkout logic based on product dimension attributes click Dimensions and select product attributes for height, length and width
The click “Save config”-button up in the right corner
Look at the “Options” tab in the middle and see if Status shows “Site configuration OK” or not. If not, look at the error message and fix the problem. The configurations that need to be set reside under “Stores > Store Configuration > Sales > Shipping Settings” as well as under “Stores > Store Configuration > General > General > Store Information”.
Under “Site configuration OK” you can enable the module for the checkout. Here you can also enable various other settings depending on what you have enabled at nShift.

Creating Shipping Methods

In the dashboard main menu… click Sales and choose nShift Delivery > Shipping Methods
Click “Add new shipping method”-button up in the right corner.



Name your Shipping Method in the “Title field”. Ex. DHL, PostNord or Schenker
Choose your store view (you can have different methods depending on store view). “Default Store View” is standard.
Choose “Method” from the list. Method is the shipping service code that you received from your carrier.
Active, Yes or No. Active means it will be seen in the checkout. And No means not seen.
Enable Automation (Yes or No). This is a new feature. Automation means that an order will receive a status (that you decide in step 9) by auto. Shipping tracking no etc will be generated and there is no need for you to go into the order to package your products (as you normally need in Magento 2). Choose yes to turn on Automation and No to handle orders as usually.
If you choose to use Automation you also need to choose a “Package type”. This information should be provided by your chosen carrier. Ex. DHL, PostNord or Schenker.
Order status, if Automation is turned on you will need to choose which order status an order will receive when generated.
If you want to be able to create return shipments, select a return service to use. If you the return shipment to be created at the same time as the turn shipment set “Automatic Returns” to “Yes”
Add-ons. Depending on your chosen carrier you can activate add-ons. See list from carrier
Specification is where you set specifications for each Shipping Method.

For example: If you have different prices depending on country, zip code, weight etc.

If you use the same method to ship to different countries it can be set like this:

Title = Description of transport ex. “Delivery 1-3 days”
Country = Country code like SE. Can be separated by comma SE,DK,FI or * = All
ZIP = Single ZIP-code like 100 12, 10012-17569 (for range of ZIP-codes), or * = All
Weight = Set weight limits ex. 0-5, 6-10, 11-20 or * = All
Width = Set width limits ex. 0-20, 21-80, 81-150 or * = All
Height = Set height limits ex. 0-20, 21-80, 81-150 or * = All
Volume = Use *
Cart Subtotal = Set cart subtotal limits ex. 0-500, 501-1000, 1001-2000
Price = Price you want to charge the customer for transport

Remember to not use commas for decimals in logic, use dots instead.

When specifying ranges the logic will use the minimum value to check for “equal or greater than” and the maximum value will be checked for “lesser than”. Specifying no minimum or maximum value means to ignore that check so -5 is equal to “lesser than 5” and 0-5 means “0 or greater while also being lesser than 5”.

You can combine single-values or spans with commas like this 63350-63370,72210-72220,11170 which can be suitable for zip-codes. All spaces will be removed in comparisons so 722 10 will be converted to 72210.

Click Save-button up in the right corner to save settings.
Click “Add New Shipping Method” to create new different shipping methods and follow the steps above.

Orders and printing



When using Automation

If you have turned on Automation you can see all orders in the Magento dashboard by clicking Sales > Orders in the main menu. The Automation has already created the package, tracking number and booking of carrier by auto. All you need to do is mark all orders and choose “Print Shipping Labels” from the Actions dropdown above the list of orders. This will create a PDF with all shipping labels for the chosen orders.



Note: Because you use Automation the orders may take some minutes to be seen in the order list, due to CRON.

When using regular Magento 2 order processing

You can see all orders in the Magento dashboard by clicking Sales > Orders in the main menu.
Click on the order you want to edit.
Click “Ship”-button in the top menu.



Scroll down to “Shipping Options” at the bottom and click on the “checkbox” called “Create Shipping Label”, then click on the “Submit Shipment…”-button.



Click “Add products to package”-button



Mark the products that you want to add to the package, then click “Add selected products to package”-button.



If you want to split an order into several packages, you can click “Add package”.
Fill out type, weight, length, width, height if you want to (only weight field is really needed). If you already added weight on the product page, it should be filled by auto.
Click “Save”-button up in the right corner.
If you have enabled automatic returns on shipping method the order is using then a return shipment will be created automatically

Note: You now have two choices to print the shipping label.

Click “Shipments”-button in the left menu
Click on the order and scroll down to section called “Shipping and Tracking Information” and click the “Print shipping label”-button.

If you have enabled return shipments on the shipping method of the order and the current shipment has no associated return shipment then a button for creating return shipments will be available in the top menu.





Or...

Go to Sales > Orders in the main dashboard menu. Mark the order and choose “Print Shipping Labels” from the Actions dropdown above the list of orders to print the shipping label for this order.



Tracking



How to track a shipment

To track a shipment, just click Sales > Shipments in the main dashboard menu.
Click on the order you want to track
Scroll down to the section called “Shipping and Tracking Information” and click on the link called “Track this shipment”.



Ignore automation



On the order you can now find an "Ignore/Unignore Automation"-button. This can be used to ignore orders which should not be automated. Orders which fails being sent to nShift will also be marked as ignored instead of flooding nShift with invalid data rows.

On the order list view there is a new column which shows the number 1 if an order is ignored, otherwise it is empty.

Change-log



[2.3.64] [2023-12-15] Support for more agent services, support for source assignment algorithm in automation, made tracking-links harder to guess
[2.3.63] [2023-01-02] Using null-safe operations on order-data fetching
[2.3.62] [2022-12-08] Added new dynamic value for add-ons: Customer Company
[2.3.61] [2022-09-23] Customs value for bundled products are now calculated as the mean value of the parent product
[2.3.60] [2022-08-31] A fix for admin orders list in the case a order is missing shipping method
[2.3.59] [2022-08-09] Fix for customs value calculation for bundled products related to quantity
[2.3.58] [2022-07-25] Improved handling of shipping requests which are missing zip code
[2.3.57] [2022-02-03] Major refactor, using separate tables for order-data and checkout-data, removed use of cache for checkout pick up agent
[2.3.56] [2022-01-20] Added new setting for dimension unit, added new setting for including dimensions in automation, showing change-log in admin
[2.3.55] [2022-01-10] Viewing a trackable shipment that is not from our module does not cause exception anymore
[2.3.54] [2022-01-07] Customs declaration lines is now one per product id in order, formatting of agent names with address, using nShift new logotypes in cart and checkout
[2.3.53] Improved license hostname resolving for some hosting environments
[2.3.52] If any dimensions are lacking a empty string is sent instead of an integer zero
[2.3.51] Improvement in automation, general improvements
[2.3.50] Improvement of order shipping data in order table, fix for lacking unique shipment reference for return shipments
[2.3.49] Updated module name and company name
[2.3.48] Fix with customs declaration calculation with order containing multiple products of same HS Code and with different prices
[2.3.47] Added code which makes it easier to extend the module and filter shipping methods shown
[2.3.46] Fixed bug with wrong customs value and weight with multiple parcels, fixed bug with customs declarations for bundled products
[2.3.45] Fixed bug with calculation of customs declaration for bundled products, fixed bug with automation not working
[2.3.44] Added ability to ignore/unignore automation for specific orders, and on failures it will auto-ignore
[2.3.43] Fixed type-error in admin shipping methods grid
[2.3.42] Custom region selector now updates zip-code in Klarna Checkout
[2.3.41] Added optional settings for customs declaration attributes: otherUnit and otherQuantity
[2.3.40] Added support for separate return-shipments
[2.3.39] Refactored shipment data generation to separate method to simplify for third-party customizations
[2.3.38] Added support for customs declarations for bundled products, added dimension attribute settings
[2.3.37] Added a cache for PickUpLocation API, to reduce number of requests
[2.3.36] Another fix for customs declarations for configurable products
[2.3.35] Fixed customs declarations for configurable products
[2.3.34] Added support for minimum weight in shipments, added support for Norwegian tracking links
[2.3.33] Fixed admin UI issue with shipping method package type, added currency-code to customs declarations
[2.3.32] Added feature to set custom quick id on shipping methods
[2.3.31] Fixed customs totals work-around for nShift API bug
[2.3.30] Added receiver mobile field on all shipments
[2.3.29] Improved availability logic for shipping methods and added grossWeight, invoiceNo and declarantDate to customs declarations
[2.3.28] Improved customs declarations calculations regarding quantity
[2.3.27] Added new custom declaration document types and custom pick up location types
[2.3.26] Fixed bug where removing credentials made settings page blank
[2.3.25] Added goodsDescription field, added POSTI suffix for customs print-set
[2.3.24] Now uses nShift API to list carriers, services, add-ons and container types
[2.3.23] Improved PHP 7.1 support
[2.3.22] Set certain configuration values to be sensitive/system-specific
[2.3.21] Added support for english tracking links
[2.3.20] Customs declaration changed so copies are always 1 and valuesPerItem is false
[2.3.19] Added support for customs declarations and better support for configurable product weights
[2.3.18] Added setting for Pacsoft Online
[2.3.17] Contact person is always the person not the company
[2.3.16] Sending receiver state instead of senders state
[2.3.15] Sending state when needed to API
[2.3.14] Improved error-handling when tracking without valid credentials
[2.3.13] Improved calculation of total height, length and width and made it easier to override
[2.3.12] Improved calculation of package height, depth and width
[2.3.11] All agents are sent with only quickId parameter
[2.3.10] Added option for automatic shipment notifications
[2.3.9] Always send Pick Up Location id to PostNord to avoid fee
[2.3.8] Added contact as a default field on receivers
[2.3.7] Fixed a rare bug where admin form URL was wrong and fixed case where shipping was disabled in a specific store
[2.3.6] 2.2.6 compatibility
[2.3.5] Improvements to Klarna and regular checkout templates and styles
[2.3.4] Added a force refresh on cart initialization
[2.3.3] Fixed bug with stored shipments
[2.3.2] Added unifaun_assignments field under extension_attributes to the order API
[2.3.1] Added more package-types and add-ons for carriers and services
[2.3.0] Added support for company names as recipients
[2.2.9] Added support for having Order Number as order reference
[2.2.8] Added support for Svea Checkout
[2.2.7] Added POSTI and DPD as pick up location services, improved error capture when doing stored requests
[2.2.6] Removed PDF configuration from stored shipment requests
[2.2.5] Better support for errors with stored shipments and Norwegian service add-ons
[2.2.4] Added support for Stored Shipments and more Finnish services
[2.2.3] Updated nShift Online library
[2.2.2] Fixed bug where errors were not displayed properly and zero weight, width, length or heights were sent instead of empty string
[2.2.1] Fixed bug where Custom Pick Up locations stopped working in original checkout
[2.2.0] Using lighter library, storing tracking link on order, support for custom pickup locations in Klarna Checkout
[2.1.6] Code styling fixes and improved release flow
[2.1.5] Fixed bug with wrong variable name in tracking
[2.1.4] Improved multi-store support, sendEmail and errorTo fields to nShift
[2.1.3] Now supports multiple parcels in same shipment
[2.1.2] Moved Custom Pick Up Location to step one, displaying custom pick up location on order
[2.1.1] Fixed handling of multiple packages
[2.1.0] Fixed measurement-units when creating packages manually on new shipment, fixed bug with configuration on installations that use a number for region setting
[2.0.9] Fixed measurement-units when creating new packages manually on existing shipments
[2.0.8] Added error messages in admin, added mobile field for PLAB_P17 service

Updated on: 09/01/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!