Unifaun delivery methods are outside KSS

Hi!

I have followed the links:

https://docs.litium.com/documentation/add-ons/payments/klarna/develop/klarna-shipping-service/install-kss

https://docs.litium.com/documentation/add-ons/integration/unifaun-delivery-checkout

Works good, but why is the Unifaun outside of the Klarna iframe?

How do I update the delivery methods in Klarna iframe in a good way?

Thanks!

Litium version: [Version number]

The shipping options inside the iframe are to be provided by Klarna. After making the necessary changes for installing KSS you also need to go into the Klarna Merchant Portal and set up a logistics profile that uses Unifaun as TMS. KSS has to be enabled on the merchant account for this.

There’s a bit of a magic string that goes into the next step in Klarna, the identifier should be in the format <API USER>-<CHECKOUT GUID>, (sans < and >) where the GUID comes from the delivery checkout you’ve configured in Unifaun Online.

When all is set up Klarna will request the options for that particular delivery checkout and send them inside the iframe to the user on the Litium site. So you should not apply the front end changes for the Unifaun delivery checkout addon.

After placing an order, a prepared shipment will be created in Unifaun by Klarna. The reference is saved on the delivery in Litium as an AdditionalDeliveryInfo with the key TmsReference.

You can use this to call the Unifaun API to convert this to a stored shipment when the order is ready to deliver. This is not included in the KSS or Unifaun addons, but the latter can be used as a starting point to manage this. Basically you need to call the prepared-shipments end-point with the reference saved on the delivery.

2 Likes

Thanks Nils!

From my meetings with Unifaun you can create rules (In Unifaun Online Portal) based on pkg information sent from Klarna.
(say pkg is x weight or xyz size => Then the transportation A or B will be used with A or B fee and presented in Klarna module to the customer.

Is there any documentation regarding this?
My guess is by using AdditionalDeliveryInfo with specific keys based on your explanation here with TmsReference?

1 Like

No, you need to set it on the order data being sent to Klarna.

In KlarnaPaymentConfigV3.UpdateDataSentToKlarna you can access the .Tags property on the CheckoutOrder object to pass along parameters directly.
About tags at Klarna: Klarna API Reference

On the CheckoutOrder.OrderLines collection there’s also a property ShippingAttributes that has Weight and Dimensions, which I think you should use in your case. I haven’t tested this scenario myself.

About attributes at Klarna: Klarna API Reference

2 Likes

To be able to pass the extra option to klarna make sure that the updated checkout code appended to the KSS documentation in litium docs. it doesn’t look like that even the 7.6.1 accelerator checkout includes these changes.

https://docs.litium.com/storage/ma/d7a89a5783694482afa7614aea4a5ca6/80792b82dbea4b9da1420d8ab8a7a9d6/zip/55F330C434F2837A5D215C008A071681038D9D93/Litium.AddOns.KlarnaKSS-Accelerator7.4.2-20200814.zip

1 Like

Thank you @NilsN!

If I understood you right - I shall not install Unifaun delivery checkout i.e. Unifaun Delivery Checkout ?

But I cannot find this “magic” string that you mentioned? Where shall I apply the delivery checkout id from Unifaun Online?

You don’t need the front-end parts of the Unifaun Delivery Checkout, since that’s used if you want to use Unifaun separately, as its own widget. The addon however contains useful parts for preparing the shipment after an order has been placed through Klarna.

In the Klarna Merchant portal, under Logistics you can create Shipping Profiles. It’s here that you need to enter your API credentials and the delivery checkout id.

Thank you again @NilsN!

It’s working :smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.