on 03-05-2016 3:41 PM
When we are submitting an order from B2B portal, there are 2 orders getting created (one with a version number and other without version number). We haven't done any customization for order submission process. Is this an out-of-the-box behavior ?
Hi Bikram,
This should be related to the order history snapshot functionality. By default, there are some order history entries that add a snapshot of the order, meaning it creates a copy of the order with all the data.
I think in the B2B scenario this happens as you enter the approval process. You can override this and avoid creating a snapshot (but still create a order history entry) but it should not affect normal behaviour like: hmc order search, customer order history, etc.
You can check the Order History & Versioning documentation for more information.
Regards, Leandro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bikram, Even i noticed this from 5.3. But we need to consider only version id is null. even thought we see two entries in database. But only one order data will be processed. Even when you search from HMC you can see one order. Because by default version id is empty selected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit/Leandro,
We have a strange situation now. Sometimes, it is creating 2 orders in Hybris but sometimes it is creating a single order without a version id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bikram,
It may depend on how the order is processed (e.g: if the order needs approval or not, etc). The service that creates the snapshot (the one with the version_id) is OrderHistoryService.createHistorySnapshot. Maybe you can search in the code where this method is called.
As Vinay says, you should select the order with a null version_id as that is the correct one. This is already done in hMC and should also work on the accelerator storefront, like the order history pages.
Best, Leandro
Yes,
You need to use an appropriate order taking strategy to avoid this as the second order is used for review before being discarded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.