Change order id on Svea checkout orders

We’re using Svea checkout on a project and we’ve gotten som complaints that it’s hard to track orders. We changed order Id to another sequence in Litium to C10, C11. C12 and so on and we’ve noticed that in Svea it gets a guid as order id. Is it a way to change this without messing anything up in the integration? It would be great if the orders could be called the same as in litium.
I found this row :

paymentInfoCarrier.SetSveaOrderId(scoOrderData.OrderId.ToString(), scoOrderData.ClientOrderNumber);

in Litium.AddOns.Svea and was thinkig it should be right but don’t know how it will sync if I change it. Thought it would be best to check with you guys since we don’t have an test environment in Svea.

Litium version: 7.4

We will test and let you know.

1 Like

As it is today it is not possible to change the Guid Id to something else but maybe it would be possible to expose the interface in coming upgrades, you can ask for that in Ideas portal: https://ideas.litium.com/

Ok that’s too bad. Alright I’ll do that, thanks!

We do this in our Litium solution, but we had to rewrite the Svea addon basicly.
What you need to do to achieve this is create the order when Svea calls you for validation.
In the validation callback, you can send them the ordernumber in return. It will then be used in svea and shown in their backend.

We set the order payment as “pending” so the order wont get processed to ERP, until the callback from Svea comes that it is finished.

This is a pretty big change… and this was for a customer on litium 4.8 and we got the sourcecode for Svea addon to achieve this… Since the addon does not support 4.8 normally.

  1. Use validation
  2. If order is OK in validation, create in litium with payment “pending” status, return LS-number to Svea
  3. modify the svea addon, so that it supports getting the LS-number back as refernce instead of the Guid (that you spoke about)
  4. Change payment status to “Paid” when Svea returns “FINAL” in the push callback…

Something like that.

maybe litium could add support for this scenario in the addon in the future.

We also asked for Svea to implement javascript-callbacks if validation failed, so that we can inform customer what failed. Like “products are out of stock”. This we also added to the custom 4.8 addon.

1 Like

That’s great! Also, thank you for a detailed flow of the process.

Cheers!

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