Deliver to Store
Deliver to Store
All about Deliver to StoreAlthough similar to a Click-and-Collect and Interbranch flow, a Deliver-to-Store flow always leads to the creation of a PO for the PickupOU in question - meaning it's more akin to a replenishment. This makes the whole flow different under the hood and requires its own configuration and befitting of its own piece of documentation.
Where a regular C&C order leads to order orchestration and a consequent shipment from either a store or a warehouse, a "Deliver to Store" flow's main difference is that we're replenishing the store by means of a PO. To configure this, we'll be writing a script to find our perfect SoldFrom OU and only then will we let order orchestration take over to find us an OU that can actually source the neccesary stock.
Step-by-step flow
Before heading into actual configuration, let's first map the steps taken in this flow.
- Once the order is created, the LineActionType of the line must be changed to OrderLine - this can be done immediately when you add the line to the order in
AddProductToOrder
and specify a LineActionType for it.- Alternatively, you can call
ChangeOrderLinesToCarryOut
and set MustBeOrdered to true.
- Alternatively, you can call
- The consumer can then be attached to the order and the order can be placed.
In any other order flow, this will lead to orchestration of the consumer's order, which is what we want to avoid here. Instead we'll be creating an ad-hoc PO: it's just a replenishing of the OU's stock.
- Thus, after placing the order, instead of orchestration for the consumer's order, a new PO is created.
- We find the right SoldFrom for the PO (see the following section)
- This PO is then orchestrated - which means we try to find the best supplier for the stock.
- The PO is exported to the supplier, which will ship the stock to the OU.
- The shipment is then received in the shop.
- The PO lines are linked to the consumer's order's lines
This means the products will be reserved and a mail can be sent out to the consumer.
- The LineActionType of the OrderLine goes from OrderLine to ShipLine after the shipment has been received.
- The StockLabel of the OrderLine is set to the Reserved stock label.
End result: if the consumer now comes into the store, there is stock available and their order can be shipped.
Finding the right SoldFrom for the PO
When the consumer's order is placed, a new PO is created. Practically, all the shop has done is indicate a demand for stock, which means the very next step needs to be to find an OU that can sell the stock to the OU.
In any other scenario, EVA would create a PO with ShipFrom = Warehouse and continue. But that isn't correct in the case where the shop doesn't have a direct relationship with the Warehouse. Although that is where the stock is available, it does not mean it's where the shop buys its stock - it's more likely to buy stock from HQ instead.
Since there is no universal rule for who to buy the stock from with this PO, we use one of the following two ways to find the right SoldFrom:
- Create a script, allowing for full control.
- Determine it from the OU tree structure.
With a script
The extension point called FindSoldFromForPurchaseOrder lets you fine-tune your search for the perfect SoldFromOU.
Use the OU structure
If there isn't a script, or the script doesn't return a proper result, a fallback is attempted by traversing the OU structure from the shop upwards until an OU is encountered of type Container.
Orchestration sheet for the PO
At this point, we just have a PO with SoldFrom = the OU that sells us the stock, and SoldTo = the shop. We still need a source for the actual stock. This could be a warehouse, another shop or a dropshipment supplier. Which one is best, is up to your orchestration and the configured sheets.
fulfillment Warehouse
action 'EXPORT_ORDER'
option OrderIntents as 'Purchase', 'Sales' // without Purchase here, it will not be active for a PO
scope Supplier
require Supplier.BackendID = 'WAREHOUSE'
data ExporterName as 'TEST_SUITE'
Informing the consumer
Once you've set up the necessary script and sheet for delivering the product(s) to the store, you can follow the regular Click & Collect flow for informing your consumers.