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

Fulfillment Strategies #6813

Open
zenweasel opened this issue Feb 23, 2023 · 0 comments
Open

Fulfillment Strategies #6813

zenweasel opened this issue Feb 23, 2023 · 0 comments

Comments

@zenweasel
Copy link
Collaborator

zenweasel commented Feb 23, 2023

This is a sub-ticket of Multi-Warehouse Location.

"Strategies" is what I am calling the code that decides what warehouse an order should ship from.

Reason: Different businesses have different rules for how they want to fulfill an order when there are multiple warehouse to ensure every order is profitable as it can be. We need to build a couple of fulfillment strategies into MOC, but also allow people to build their own.

(this also interplays with "Allow Backorder" setting on each product. For purposes of this discussion we will assume that Allow Backorder is set)

Some examples of fulfillment strategies would be:

1. Fulfill order from a single warehouse:
Check default warehouse, try to fulfill from that, if you can't try to fulfill entire order from each of the other locations. If you can't fulfill it completely from any of the warehouses then fulfill what is in stock from the default warehouse and backorder the remainder.

2. Fulfill order from Default warehouse, but complete from others:
Try to fulfill entire order from default warehouse, but if any items are out of stock in this warehouse, search each of the other locations for inventory by priority and fulfill from that warehouse, splitting the order. This could have a parameter where we only allow X number of splits. Then backorder the remainder

3. Fulfill from closest warehouse first:
From the destination address determine the distance from each warehouse location and fulfill from the closest warehouse first, the second closest next, etc. If the distance is within X miles, then use the warehouse priority and the decider.

Each strategy should basically be a function that takes the cart and returns the allocation and should be extensible (e.g. add a new strategy to the dropdown of available strategies, we would also need an endpoint that returns the available strategies). The cart then consumes the allocation and splits the order accordingly. The new Split order would need to then be displayed to the customer with shipping quotes for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants