Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DFC Orders] Compute stock of retail variants from wholesale variants #12928

Open
mkllnk opened this issue Oct 16, 2024 · 1 comment
Open

[DFC Orders] Compute stock of retail variants from wholesale variants #12928

mkllnk opened this issue Oct 16, 2024 · 1 comment

Comments

@mkllnk
Copy link
Member

mkllnk commented Oct 16, 2024

A shop sells a stock-controlled retail variant but backorders are placed for the wholesale variant. The current implementation tracks the stock of the retail variant only and doesn't take into account the stock of the wholesale variant.

Example:

  • 5 cans retail in stock
  • 4 cases wholesale in stock, containing 6 retail each
  • The shop would like a stock level of 4 * 6 = 24.

Compatibility questions:

  • What if a shop wants to be able to sell all of it? 4 * 6 + 5 = 29
    The backordering logic would need to check stock and choose from several offers to fulfill all orders.
  • What if a shop wants to sell the wholesale variant as well?
    In OFN, they are two different products with their own stock, not shared stock. At the moment, customers could buy the retail variant and the wholesale variant. But because both are mapped to the wholesale variant, it would be oversold.
@mkllnk
Copy link
Member Author

mkllnk commented Oct 16, 2024

From @RaggedStaff

For Mapped Variants, ignore (zero) the stock for the retail variant & set it to backorder the wholesale variant... we need to track stock for the wholesale variant (unless it's set to unlimited i.e. we receive a dfc-b:stockLimitation of -1).

There's an assumption here that one retail product is linked to one wholesale product for backordering and the stock is synced. But I see the DFC world with more flexibility. From my perspective, a customer is ordering a retail product and then the platform decides how to fulfill this. There could be one wholesale product in a 1-to-1 relationship or with a transformation. But there could also be multiple sources, for example three suppliers for wheat flour and the platform could backorder whatever is the best deal.

So I guess, whatever the backordering logic sees as available, would need to be added up in the local stock level for the retail variant. This is quite different to the simple product import sync we are doing at the moment where we have a 1-to-1 copy process. I think I'm just worried that we'll make this part complicated and then some people will want the simple 1-to-1 copy later. I guess that we are missing some UX to let the user decide what they want to happen. So for now, we can go with mapping the backorderable stock.

@mkllnk mkllnk changed the title [DFC Orders] Combine stock of retail and wholesale variants [DFC Orders] Compute stock of retail variants from wholesale variants Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: All the things 💤
Development

No branches or pull requests

2 participants