Kustom Shipping Assistant

Last modified:

Important – please read

Warning

Kustom Shipping Assistant is now part of Kustom Checkout
As of version 2.23.0, Kustom Shipping Assistant (KSA) is built into Kustom Checkout for WooCommerce. You no longer need the separate Kustom Shipping Assistant plugin.

If you already use the separate plugin

  1. Update Kustom Checkout for WooCommerce to version 2.23.0 or later.
  2. Navigate to Plugins and deactivate Kustom Shipping Assistant for WooCommerce. You can then delete it.

That’s all. Update first and deactivate second, so your checkout keeps showing shipping options throughout. While the separate plugin is active, the built-in version stays inactive and WordPress shows a notice reminding you to deactivate it.

What stays the same

  • Shipping zones. The Kustom Shipping Assistant methods you already added to your shipping zones keep working. You don’t need to add them again.
  • Activation. If any shipping zone has a Kustom Shipping Assistant method, the built-in version turns on automatically, so your checkout keeps working as before. You can turn it on or off at any time with the Enable Kustom Shipping Assistant setting in the Kustom Checkout settings.

Introduction

Kustom Shipping Assistant (KSA) makes it possible to display shipping options in the Kustom Checkout (KCO) iframe provided by your Transport Management System (TMS).

Warning

Kustom Shipping Assistant is not compatible with External payment methods (EPM).

Requirements

  • Your Kustom account needs to be activated for Kustom Shipping Assistant (KSA) with TMS.
  • Requires WooCommerce together with Kustom Checkout for WooCommerce 2.23.0 or later.
  • Kustom Shipping Assistant is used for handling the shipping methods in your store. However, it is still required to have at least one native WooCommerce shipping method active for each shipping zone where you enabled KSA.
    See Step 8 in the Configuration below for more info.
  • HTTPS is not required on your site, but strongly recommended.

Configuration

Navigate to WooCommerce → Settings → Payments → Kustom Checkout → Kustom Shipping Assistant.

  1. Enable Kustom Shipping Assistant – Check this box to activate KSA.
  2. Enable shipping option update callback – Optional. Check this box if your TMS sends the wrong tax rate, to let WooCommerce calculate the tax on shipping instead. The shipping price and the name of the shipping option still come from your TMS. Read more in Let WooCommerce calculate the shipping tax.
  3. Under Shipping settings, make sure that the setting Shipping methods in iframe is checked.
Kustom Shipping Assistant settings with Enable Kustom Shipping Assistant checked and Enable shipping option update callback unchecked
  1. Save the payment gateway settings.
  2. Navigate to WooCommerce → Settings → Shipping.
  3. For every shipping zone you have created, you need to add Kustom Shipping Assistant as a new shipping method.
    Click Edit and then Add shipping method.
Empty shipping methods list in a shipping zone with the Add shipping method button
  1. Select Kustom Shipping Assistant, click Continue and then Create and save.
Create shipping method dialog with Kustom Shipping Assistant selected and the Continue button
Set up kustom shipping assistant dialog with no settings and the Create and save button

Please note: As mentioned in the Requirements section above, you must have at least one native WooCommerce shipping method enabled as a fallback in every shipping zone where Kustom Shipping Assistant is active.

  1. Add a native WooCommerce shipping method as fallback:
    • Click Edit on the Shipping zone where you just created your KSA shipping method.
    • Add shipping method and select your fallback method, for instance Flat rate.
    • Configure Name, Tax status and Cost and click Create and save.
Create shipping method dialog with Flat rate selected as fallback method and the Continue button
Set up flat rate dialog with Name, Tax status and Cost fields and the Create and save button
  1. Make sure that the Kustom Shipping Assistant 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 your TMS in the KCO iframe now:

Checkout page with the KCO iframe showing TMS shipping options under Delivery, such as Pickup Box and Pickup point

Each TMS has its own configuration process to connect to Kustom.

Shipping data sent to Kustom

Free shipping coupons

If the cart contains a discount code that grants free shipping, the tag ksa_free_shipping will be sent to Kustom.

Different TMS are handling this in different ways, so get in touch with your TMS to know how they handle free shipping coupons and how to set it up correctly.

Product dimensions

When Kustom Shipping Assistant is activated, it adds the product dimensions (length, width and height) to the cart items and transfers this data to your TMS.

Shipping classes

With KSA activated, shipping classes (for example Bulky or Small) are also added as tags to the cart items.

Checkout shipping options

The product dimensions and shipping classes included in the cart make it possible to configure your shipping setup so that certain shipping methods are disabled based on this data.
How the shipping options are displayed in checkout is determined by the configuration in your TMS.
You can find an example of this under Krokedil Shipping Connector → Conditional shipping methods.

Shipping data in WooCommerce order

When an order has been created in WooCommerce, the name and price of the selected shipping method in the KCO iframe are added to the order.

WooCommerce order items with the selected shipping method name Pickup Box and its price highlighted

The entire shipment data sent from Kustom for the order is also stored in the WooCommerce order, as an order meta field with the name _kco_kss_data. This data is stored as a JSON object with the following structure:

{
	"id": "id-1000",
	"name": "Pickup Box",
	"price": 500,
	"tax_amount": 0,
	"tax_rate": 0,
	"preselected": false,
	"shipping_method": "BoxUnreg",
	"delivery_details": {
		"carrier": "instabox",
		"class": "economy",
		"product": {
			"name": "MyPack",
			"identifier": "10"
		},
		"pickup_location": {
			"id": "loc-2",
			"name": "Coop Loet",
			"address": {
				"street_address": "Storgatan 59",
				"postal_code": "97232",
				"city": "Luleå",
				"country": "se"
			}
		}
	},
	"tms_reference": "100"
}

Ingrid transport order ID

If you use Ingrid as your TMS, the Ingrid transport order ID is saved on the order in the order meta field ingrid_tos_id when the purchase is confirmed. You can see it in the Custom Fields box on the order, and Ingrid integrations can use it to match the WooCommerce order with the transport order in Ingrid.

Please note: The field is only saved on orders placed with version 2.23.0 or later. It is not copied to subscriptions or renewal orders.

Tax settings

Since Kustom takes over the shipping cost fully with Kustom Shipping Assistant, it is important that the tax settings in WooCommerce that apply to shipping match what you have in the TMS.

For example, if you have 25% tax applied to shipping costs in the TMS, this tax needs to exist in WooCommerce. It is also recommended to set the tax calculations for shipping to only use this tax class to prevent any issues when using multiple different tax rates in WooCommerce.

First, you need to create the tax that you want to use for the shipping method.

WooCommerce Tax settings, Standard tax rates with a 25 percent rate that has Shipping checked

After this, you will want to set this tax class as the only one that can be applied to shipping.

WooCommerce Tax options with the Shipping tax class dropdown open and Standard selected

If you have “Shipping tax class based on cart items”, it could cause a mismatch between the Kustom order and the WooCommerce order due to different taxes being applied to the shipping price in Kustom than to WooCommerce.

Let WooCommerce calculate the shipping tax

When you use Kustom Shipping Assistant, your TMS (for example nShift or Ingrid) provides the shipping options and prices displayed in the checkout. The TMS normally also decides which tax is applied to the shipping cost.

When you enable Enable shipping option update callback, WooCommerce calculates the shipping tax instead. This is how it works:

  1. The customer selects a shipping option in the checkout.
  2. Kustom sends a request to your store asking which tax should apply to the shipping.
  3. Your store calculates the tax based on your WooCommerce tax settings and the customer’s address.
  4. Kustom updates the checkout with this tax, and the same details are saved to the WooCommerce order.

The shipping price and the name of the shipping option are not changed. They still come from your TMS. The only thing that changes is how the shipping tax is calculated.

When to use it
  • Incorrect or missing tax rate – Your TMS sends the wrong tax rate, or no tax rate at all. This can happen, for example, when you sell to other EU countries.
  • Tax mismatch – The shipping tax differs between the WooCommerce order and the Kustom order.
Things to consider
  • WooCommerce tax settings – Your WooCommerce tax settings need to be correct for every country you sell to. If no tax rate matches the customer’s address, the shipping tax will be 0%.
  • Test purchase – After you enable the setting, make a test purchase and check that the shipping tax is correct.

Subscription support

Subscriptions are supported with Kustom Shipping Assistant.

However, there might occur issues with your TMS or a third-party plugin. One example is when the TMS tries to reuse the ID for the shipment of the first item for consecutive shipments, which will then fail.

When using the plugin Krokedil Shipping Connector together with Kustom Shipping Assistant, this is not an issue as the shipment ID is not reused.

Please note: If the cart contains only subscriptions with a free trial (WooCommerce Subscriptions), the shipping cost is automatically set to 0 for the initial purchase. This means the customer does not pay shipping for the trial period. This applies whether or not Enable shipping option update callback is enabled.

Tracking ID & Tracking URL reporting to Kustom

The Tracking information is sent to Kustom when the order is set as “Completed” in WooCommerce through the Kustom Order Management. In order to send the Tracking data in this sequence to Kustom, you will need to save the Tracking ID and the Tracking URL of the shipment to the order as a post meta before the order is set as “Completed” in WooCommerce. The post meta key expected is _kss_tracking_id and _kss_tracking_url.

No booking of shipments

Kustom Shipping Assistant makes it possible to display the shipping options provided by your TMS in the Kustom Checkout iframe. However, the actual booking of the shipment in your transport administration system is not handled in Kustom Shipping Assistant. There are a lot of TMS services available and every system has its own API. That’s why Kustom Shipping Assistant doesn’t connect to a specific TMS.

However, if you use Kustom Shipping Assistant and have nShift (previously Unifaun) as a logistics partner, you can use Krokedil Shipping Connector to book deliveries in nShift’s system, print shipping labels and see tracking link and status of delivery directly in your WooCommerce store.

Kustom Shipping Assistant is also compatible with the plugin nShift för WooCommerce by Redlight Media as well as Shipmondo.

Compatibility issues

Dynamic shipping VAT

Issue with dynamic shipping VAT when selling products with different VAT rates in PostNord and Kustom Shipping Assistant (KSA).

If you are using PostNord as the TMS (in Kustom’s portal) and KSA together with Kustom Checkout for WooCommerce and have mixed VAT rates on the products, there is a high risk of having a mismatch in the shipping price between Kustom’s iframe and WooCommerce in the checkout, unless Enable shipping option update callback is enabled.

The core problem is that taxes in WooCommerce are not dynamic in the same way, and instead need to be set up manually. In this case, it would require the store to configure all VAT rates from 0% to 25%. That means rates like 0.00, 0.01, 0.02, 0.03 … 24.99, 25.00 would need to be set for it to work correctly. This is not feasible.

The reason for the issue with PostNord is that they calculate the shipping VAT dynamically, based on the products in your cart, which is then sent from PostNord to Kustom and displayed in Kustom’s iframe.

In other TMSs, like nShift and Shipmondo, there is the option to set a fixed VAT rate, as referenced here. This avoids mismatches at checkout.

An example:
If there is a mixed cart with products taxed at 6%, 12% and 25%, the VAT rate on the shipping will be a very odd amount, for example 16.57%. This is because an average value is calculated based on the number of products of each tax rate the order contains. The issue in WooCommerce is that this VAT rate does not exist (as WooCommerce cannot handle dynamic VAT rates), so the totals will differ.

To solve this, enable Enable shipping option update callback. WooCommerce then calculates the shipping tax based on your WooCommerce tax settings instead of using the tax rate from PostNord, so that the shipping tax matches between the Kustom checkout and the WooCommerce order. Read more in Let WooCommerce calculate the shipping tax.

Please note that WooCommerce cannot calculate an averaged tax rate the way PostNord does. The shipping tax will instead be based on the shipping tax class you have set in WooCommerce.

Gift cards

Currently, there are issues when using a gift card together with Kustom Shipping Assistant if the gift card covers the entire order, including the shipping cost. In this case, the shipping cost is not included in the order data sent to Kustom, which means the order value sent to Kustom can be incorrect or negative.

Pay for order/Hosted Payment Page flow

When using the Pay for Order function in WooCommerce together with Kustom Shipping Assistant, the shipping setup in WooCommerce will not apply correctly.

You can read more about this issue in the Troubleshooting the Pay for order/Hosted Payment Page flow article.