Get started
Troubleshooting
Introduction
Krokedil Shipping Connector is a plugin which makes it possible for you as a merchant to create or store shipments in nShift Delivery (previously Unifaun Online) directly from WooCommerce.
You can use Krokedil Shipping Connector (KSC) together with nShift Checkout, or you can use KSC with Klarna Shipping Assistant (KSA) which is a part of Klarna Checkout.
Requirements
- Requires a nShift Delivery (previously Unifaun Online) account with nShift Checkout (previously Unifaun DeliveryCheckout) activated.
Installation
You install this plugin just like any other WordPress plugin:
- Download and unzip the latest release zip file.
- If you use the WordPress plugin uploader to install this plugin skip to step 4.
- Upload the entire plugin directory to your /wp-content/plugins/ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress Administration.
Configuration – plugin
Navigate to WooCommerce → Settings → Shipping.
Now Krokedil Shipping Connector is displayed as an available option in the horizontal menu at the top. Click on this link to access the Krokedil Shipping Connector settings.
- Debug log – Log events in the module. You can find the log by navigating to → WooCommerce → Status → Logs.
- nShift id – Your nShift API ID. Available from your nShift Delivery account.
In your nShift Delivery account, navigate to → Maintenance → API keys, and click on the search button. Now you will see a list of the API Keys in your account. Click on the “Pen” next to API Id. Now you will find the ID. - nShift secret id – Your nShift Secret API ID. Available from your nShift Delivery account.
In your nShift Delivery account, navigate to → Maintenance → API keys, and click on the search button. Now you will see a list of the API Keys in your account. Click on the “Pen” next to API Id. Now you will find the Secret ID. - nShift quick id – Your nShift Quick ID. Available from your nShift Delivery account.
In your nShift Delivery account, navigate to → maintenance → senders → and click on the search button. Now you will see a list of the API Keys in your account. Now you will see a list of the companies you have added and there you will see the Quick ID for each individual company. - nShift printing favorite mapper – Map Delivery Option Title with Printing favorite Name.
– The key in each object (e.g. DHL Service Point and Bring hemleverans) the is the name of the shipping method. It is only used for you to remember which shipping method this is. It will not be used by the plugin.
– shipment_id is the id of the shipping method used by nShift. A collection of shipping methods and their id’s can be found in your nShift Delivery account by navigating to → Help → Code lists.
– printing_favorite is the Printing favorite Name available in your nShift Delivery account. In your nShift Delivery account, navigate to → Maintenance → Printing favorites → and click on the search button. Now you will see a list of your printing setups. You should add the Name on the one you want to use as a favorite in the plugin settings.
– return_shipment_id is the id of the return shipping method used by nShift. If entered, a button will appear in the Krokedil Shipping Connector metabox in the WooCommerce order, where you can create return shipments manually.
The data saved in this setting must be saved as valid JSON for the mapper to work. You can check if your text is valid JSON at jsonlint.com. Here is an example how to enter the text:
{
"DHL Service Point": {
"shipment_id": "ASPO",
"printing_favorite": "Avisering",
"return_shipment_id": "ASPOR",
"return_shipment_printing_favorite": "Returnfavorite",
"package_code": "BOX"
},
"Bring hemleverans": {
"shipment_id": "BOXCD",
"printing_favorite": "",
"return_shipment_id": ""
}
}
- Fallback printing favorite – Enter your default nShift Printing favorite Name. Will be used if no match is found in the “nShift printing favorite mapper”.

Order & shipment management
- Create Shipment or Store Shipment – Select where you want to handle the shipments and printing of the pdf shipment labels.
Create Shipment: Handle Shipments and PDF printing in WooCommerce.
Store Shipment: Handle Shipments and PDF printing in nShift.
Detailed explanation here. - Use order data – Check this to use WooCommerce order data, instead of data stored in the prepared shipment order in nShift, when creating a shipment.
- Create shipment action – Select when the shipment for an order should be created. Manually by the merchant or automatically when order status changes to Processing or Completed.
- Stored shipment status interval – Enter the interval in minutes, how often the plugin should check for stored shipment status changes in nShift. Leave blank to disable this feature.
- Multiple parcel booking – Enable the possibility to book multiple parcels in one shipment. Note: Not all shipping services support multiple parcels.
- Delivery date – Enable the possibility to add delivery date in create shipment request. (If supported by the shipping service.)
- Delivery time – Enable the possibility to add delivery time in create shipment request. (If supported by the shipping service.)
- Prenotification message – Enable the possibility to add prenotification message in create shipment request.
- Delivery instruction – Check this box to enable the possibility to add delivery instruction in create shipment request.
- SMS notification – Check this box to enable SMS notification and send SMS to the customer when their package is shipped. Requires specific addon (NOTSMS) to be activated in your nShift account.
- Email notification – Check this box to enable email notification and send email to the customer when their package is shipped. Requires specific addon (NOTEMAIL) to be activated in your nShift account.
- Choose status on orders with Krokedil Shipping Connector – Check this box to enable if you want the order status in WooCommerce to change on orders when the shipment is edited, created/stored, with Krokedil Shipping Connector plugin.
When enabled the following to settings are activated:- Order status when Shipment is created – Select which status the order should get when Shipment is created.
- Order status when Shipment is cancelled – Select which status the order should get when Shipment is cancelled.
- Sync address state – Select the countries where you want the customer address state to be sent in the create shipment request.
- Label size – Select shipment and return shipment label size.
- Label X offset – Enter label X offset in mm. Use 0 for no offset.
- Label Y offset – Enter label Y offset in mm. Use 0 for no offset.
- nShift Track & Trace – Tracking link of the shipment will be available for customer and merchant. (Requires you to have the additional “Track & Trace” service active on your nShift-plus account).
- Send customer note – Send customer note email to customer when shipment is created.
- Customer note text – The text you want to send with the customer note email. Use {customer_name} where you want the customer name to be, and {tracking_link}, {tracking_id}, {pickup_point} for the link, ID and pickup location respectively.
- nShift parcel content text – General description of the content. Used when creating the shipment.
- Enable customs product fields – Check this box to add customs specific settings fields in product pages. Fields for Tariff code, Tariff description, Y code and Manufacturing country will be added if enabling this setting.
- Manufacturing country – Default country code, used for customs declaration document. Will be used if no Manufacturing country is entered on product level.

Configuration – Automatic label printing via PrintNode
- Enable automatic label printing via PrintNode – Check this box to enable automatic label printing via PrintNode.
- API key – The PrintNode API key.
- Print shipping label – Tick this checkbox to enable printing of shipping label via PrintNode when shipment is created in nShift.
- Printer ID – shipment label – Enter the Printer ID used for printing shipment labels.
- Print return label – Tick this checkbox to enable printing of return label via PrintNode when return shipment is created in nShift.
- Printer ID – return label – Enter the Printer ID used for printing return labels.
- Print customs document – Tick this checkbox to enable printing of customs document via PrintNode when shipment is created in nShift.
- Printer ID – customs document – Enter the Printer ID used for printing customs document.

Configuration – nShift Checkout
nShift Checkout settings
This is how you configure nShift Checkout for WooCommerce:
- In the nShift Checkout section of the plugin settings you tick the checkbox Enable nShift Checkout.
- nShift Checkout ID – Enter the ID for the delivery checkout that you have prepared in your nShift account settings.
- nShift Checkout placement – Select the hook used where nShift Checkout should be placed in the checkout page.
- Custom placement hook – Enter a custom hook where you want the nShift Checkout widget to be placed. Useful for embedded checkouts (like Klarna Checkout) with custom page templates.
The shortcode [nshift_checkout] can also be used to place the nShift Checkout widget, but we recommend you to use one of the hook settings above. - Shipping widget title – Customize the shipping widget title. Leave blank to use the default (and translatable) title.
- Shipping widget text – If entered, the text will be displayed above the postcode field in the shipping widget.
- Shipping widget text 2 – If entered, the text will be displayed below the postcode field in the shipping widget.

For every shipping zone you have created you need to add nShift Checkout as a new shipping method. Read more about Shipping method settings here.

Make sure that the nShift Checkout shipping method is the first shipping method in the list of available shipping methods for the zone that you are configuring.
If everything is working fine you should be able to see the shipping methods provided by nShift in a widget in the WooCommerce checkout page now:

nShift in WooCommerce shipping
nShift in WooCommerce – Check this box to enable nShift shipping options via WooCommerce standard shipping logic.
When enabling this feature, each standard shipping method can be linked to a nShift shipping service in the shipping settings.

Configuration – KSA / nShift
- Configuration of Klarna Shipping Assistant together with nShift Checkout is something that you need to do in your Klarna and nShift backend accounts.
- It’s recommended that you start the configuration in a staging/test environment so you don’t break your production web store.
For the Shipping methods you need to set up in WooCommerce, you can read more about Shipping method settings here.
Read more about how to get started with KSA & nShift in this nShift documentation.
Conditional shipping methods
In some cases you might want to enable or disable specific shipping methods if a certain condition is met. For instance if an order contains bulky goods then delivery by bicycle might not be an option. To be able to handle these conditions the Klarna Shipping Assistant plugin sends WooCommerce Product Shipping Classes to Klarna/nShift. I you would like to disable a specific shipping method if a certain product shipping class exist in an order you can do the following:
- Add a shipping class to a product. In this case we call it Bulky.
- Navigate to nShift Delivery and edit the delivery checkout you are using for the KSA integration.
- Add a new Parameter. Give it the same name as the WooCommerce Shipping Class slug (in our case bulky). Set the Type to Boolean and specify the default value (in our case false).
- Now you need to configure each delivery option and specify the Condition.
The shipping options that should be available only when an order doesn’t contain Bulky goods you enter bulky = false in the Condition box.
The shipping options that should be available only when an order does contain Bulky goods you enter bulky = true in the Condition box. - After saving the changes you can first test the Delivery checkout directly in nShift online test tool. When you see that it is working you can test it in Klarna Checkout.
Free shipping coupons
In the same way as product shipping classes is passed to Klarna (and then forwarded to nShift), a tag named ksa_free_shipping
is sent to Klarna if a coupon code is used that enables the customer free shipping. In the same way as the bulky example in the Conditional shipping methods section above, you can enable free shipping in the nShift Checkout configuration if ksa_free_shipping = true.
Create Shipment or Store Shipment
“Create Shipment” and “Store Shipment” is two different flows of the Krokedil Shipping Connector plugin and will make it possible for you to choose where you want to handle your shipments and pdf shipment labels.
Create Shipment
If choosing “Create Shipment” the creation of the shipment will be done directly from WooCommerce. The pdf shipment label will be generated as soon as the “Create Shipment” button has been clicked. The pdf shipment label can be accessible through navigating to the specific order or through action buttons on the order overview page in WooCommerce backend.
Store Shipment
If choosing “Store Shipment” the creation of the shipment will be done from your nShift account. The shipment will be sent to a printing queue called “Stored Printings” in nShift. In order to create the shipment you will have to login to your nShift account and once the pdf shipment label is printed the shipment will be created.
Order management
Only orders made through Klarna Shipping Service will have the ability to have the shipment be created or stored.
Create Shipment
- Navigate to → WooCommerce → Orders.
- You can Create a shipment in multiple ways.
- Clicking the truck icon located to the right when viewing all orders.
- Selecting the Create Shipment option in the WordPress Bulk Action drop down menu.
- Navigating to the specific order and clicking the Create Shipment button located inside the metabox to the right.
- If a shipment was successfully created, the order note will display “Shipment successfully created“.
Store Shipment
- Navigate to → WooCommerce → Orders.
- You can Store a shipment in multiple ways.
- Clicking the arrow icon located to the right when viewing all orders.
- Selecting the Create Stored Shipment option in the WordPress Bulk Action drop down menu.
- Navigating to the specific order and clicking the Create Stored Shipment button located inside the metabox to the right.
- If a shipment was successfully stored, the order note will display “Shipment successfully stored“.
Cancel Shipment
- Navigate to → WooCommerce → Orders.
- Navigating to the specific order and clicking the “Cancel Shipment” button located inside the metabox to the right.
- If a shipment was successfully cancelled, the order note will display “Shipment successfully cancelled”.
Remove Stored Shipment
- Navigate to → WooCommerce → Orders.
- Navigating to the specific order and clicking the “Remove Stored Shipment” button located inside the metabox to the right.
- If a shipment was successfully removed, the order note will display “Shipment successfully removed”.
Modify data sent to nShift
If yo need to add, remove or edit data sent to nShift when the create shipment request is triggered, you can use the filter ksc_create_shipment_body
.
Here is an example how to add a pickup date (which is required but not provided by Klarna or nShift) if the carrier is Budcompaniett.
<?php
/**
* Use together with Krokedil Shipping Connector pluign.
* https://krokedil.se/produkt/krokedil-shipping-connector/
*
* Modify the create shipment request body. In this case we add pickupDate if the carrier is Budcompaniet.
* Add this code to your themes functions.php file or include it in a separate functionality plugin (https://css-tricks.com/wordpress-functionality-plugins/).
**/
add_filter('ksc_create_shipment_body', 'custom_ksc_create_shipment_body_2', 10, 2 );
function custom_ksc_create_shipment_body_2( $args, $order ) {
// The shimpment data for the order, selected by the customer in KCO/KSA.
$kco_kss_data = get_post_meta( $order->get_id(), '_kco_kss_data', true );
$shipment_data = json_decode( $kco_kss_data, true );
//Get the carrier for the order.
$carrier = $shipment_data['delivery_details']['carrier'];
if( 'budcompaniett' === strtolower( $carrier ) ) {
// Send the pickup date to nShift Delivery.
$args['service']['properties']['pickupDate' ] = date("Y-m-d");
}
return $args;
}