cancel
Showing results for 
Search instead for 
Did you mean: 

Can I give my own order number to a hybris order or should it always be cart code.

pavan-yvs-1
Explorer
0 Kudos
161

Hi,

We have some OCC integration where another system can place order in hybris via v2 webservices.
They would like to provide their own order number.
Can anyone please let me know if it is possible to overwrite the order number generated by hybris or create the order with the number they provide instead of generating a new one.

Thanks in advance!

View Entire Topic
Harish_Vatsa
Active Contributor
0 Kudos

Hi,

2 ways to do this : 

1. If your external system has a sequence you can create that sequence using the keygenerator in hybris.

de.hybris.platform.servicelayer.keygenerator.impl.PersistentKeyGenerator
keygen.ordernumber.code.name=yourOrderNumberName
keygen.ordernumber.code.digits=8
keygen.ordernumber.code.start=30000000
keygen.ordernumber.code.type=numeric
keygen.ordernumber.code.template=$
 
2. You can write the order prepare interceptor to set the code specifically.