Hi everyone,
I’m currently working on a rather complex (for me) Shopify Flow.
The gist of the idea is that we want to continue selling out of stock products on our webshop when a purchase trough our fulfillment software is done. So stock is on its way to our warehouse in a few days and can be ordered trough our shop with the right delivery date added to our shops date picker.
We are currently working on a webhook that sends data from our fulfillment software to Shopify and adds this to several metafields.
One of the things I run into now that I want to change the ‘productVariant.inventoryPolicy’ to be set to CONTINUE based on a check. But I can’t seem to find an action that does this? I can only find it in a check.
Another thing I’d like to know is how a date in a metafield can be updated to be X days above a current date metafield.
At last, I’m looking for a way to add this incoming inventory to an inventory spot (so we don’t over-sell our incoming inventory).
Long story short:
- Based on a trigger we want to set inventoryPolicy:continue on a product variant.
- Based on date input being mutated in a metafield called variant.metafields.purchasing.delivery_date we would want this to update a metafield called variant.metafields.datepicker.available_from with that date + 2 days.
- Based on a numeric input coming from the webhook into variant.metafields.purchasing.amount_to_receive we need some kind of way to add this incoming inventory to an inventory spot (so we don’t over-sell our incoming inventory).
Hope this helps understanding the challenge a bit more! Feel free to ask questions about the setup.