Krokedil Shipping Connector
Introduction
Krokedil Shipping Connector is a plugin which makes it possible for you as a merchant to create or store shipments in Unifaun Online directly from WooCommerce, for orders created via Klarna Shipping Assistant (a part of Klarna Checkout).
Requirements
- Requires WooCommerce together with Klarna Shipping Assistant to be used.
- Requires a Unifaun Online account with Unifaun Delivery Checkout 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.
- Unifaun id - Your Unifaun API ID . Available from your Unifaun Online account.
In your Unifaun Online account, navigate to → M aintenance → 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. - Unifaun secret id - Your Unifaun Secret API ID. Available from your Unifaun Online account.
In your Unifaun Online account, navigate to → M aintenance → 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. - Unifaun quick id - Your Unifaun Quick ID. Available from your Unifaun Online account.
In your Unifaun Online 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. - Unifaun printing favorite mapper - Map Delivery Option Title with Printing favorite Name.
- The Delivery Option Title is the name of the shipping method displayed for the customer (and what is stored as shipping method in the order in WooCommerce).
- The Printing favorite Name is available from your Unifaun Online account. In your Unifaun Online 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.
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:
{ "Delivery Option Title": "Printing favorite Name", "DHL Home delivery": "DHL Home", "Postnord Service point": "Servicepoint" }
- Fallback printing favorite - Enter your default Unifaun Printing favorite Name. Will be used if no match is found in the "Unifaun printing favorite mapper".
- Debug log - Log events in the module. You can find the log by navigating to → WooCommerce → Status → Logs.
- Unifaun 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 Unifaun-plus account).
- Create Shipment or Store Shipment - Select where you want to handle the shipments and printing of the pdf shipment labels. Detailed explanation here.
- Choose status on orders with Krokedil Shipping Connector - Setting for choosing the order status on orders edited with Krokedil Shipping Connector plugin.
- Create/Store Shipment on order complete - Tick the checkbox if you want the plugin to automatically make a request to Unifaun and create/store the shipment when the order in WooCommerce is set to status Completed.
Configuration – KSA / Unifaun
- Configuration of Klarna Shipping Assistant together with Unifaun DeliveryCheckout is something that you need to do in your Klarna and Unifaun backend accounts.
- It's recommended that you start the configuration in a staging/test environment so you don't break your production web store.
Read more about how to get started with KSS & Unifaun in this onboarding document & in Unifaun's documentation.
Conditional shipping methods
- Add a shipping class to a product. In this case we call it Bulky.
-
Navigate to Unifaunonline.com 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 Unifaun online's 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 Unifaun), 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 Unifaun Delivery Checkout configuration if ksa_free_shipping = true.
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".
Create Shipment or Store Shipment
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 Unifaun account. The shipment will be sent to a printing queue called "Stored Printings" in Unifaun. In order to create the shipment you will have to login to your Unifaun account and once the pdf shipment label is printed the shipment will be created.
Modify data sent to Unifaun
If yo need to add, remove or edit data sent to Unifaun 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 Unifaun) if the carrier is Budcompaniett.
.