Add the CountryId to the OrderId mask


Currently we are using standard OrderId generation resulting something like PO85055360. As the site is going to be multinational there was an idea to add CountryId to the mask of the order. So result will be UKPO85055360 or smth like that.

Is there any option to get it configurated without the code changes?

I see the approach of a complete overriding the OrderId in code here:

But is it possible to add a subsctring to already generated one but not to create the whole sequence on our side?

We are using EPiServer Commerce 10.2

Edited, Aug 29, 2017 17:18


There is no APIs to change the tracking number of already created POs. Your options are use direct SQL (Fast, but risky, should be avoided), or load the order one by one, update the tracking number and save it back (slow, but safe) 

Aug 29, 2017 18:21

Thank you Quan Mai!

And what will be the best option if we leave old orders as they are and update pattern only for new ones?

Aug 29, 2017 20:05

Now I fully understand your question - no - it must be changed by code.

Aug 29, 2017 20:54

That's answers the first question.

Do you know if I override the existing OrderId during the mapping from Cart to Order could I use the existing OrderId generation just to extend it but to add a new one?

Aug 29, 2017 21:40
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.