What is the point of Reserve Items on a Draft order?

Highlighted
Excursionist
28 1 7

This would be handy, seems silly to reserve the item and not have it be removed off the inventory, since it says it will be "automatically restocked" at the particular time and date! Anyone know a Shopify expert partner they can tag?

Highlighted
New Member
2 0 4

I would like an update on this as well.

Highlighted
New Member
2 0 12

Yes, Shopify. For REAL. This is completely obtuse and absurd. I ran into oversell issues of my own today for this very reason. What on EARTH is the point of having a "Reserve Items" feature on draft invoicing when it doesn't actually deduct the stock from inventory? Like a couple others had mentioned in this thread previously, the shop will instead pretend like the item is in stock on the product page, but then display a "SOLD OUT" error during checkout.

Earlier today, I had 4 or 5 customers get in touch with me about this problem and I ended up manually invoicing them for the technically "out-of-stock" items, which the store let me sell because quantity was still showing from what turned out to be "reserved" inventory. Now, I'm oversold on two products and it's very frustrating to have to contact customers and tell them that I don't have what they wanted after they have already paid. Again, what the heck is the point of having this feature at all when it doesn't actually deduct from inventory? This is beyond frustrating, guys.

 

 

Highlighted
Tourist
3 0 6

I need to chime in here as I have the same question, and would love to hear Shopify's handling of this. I very much need the ability to have an item be removed from inventory when 'reserve item' is selected for a draft order.

Highlighted
Explorer
50 1 20

HELLO SHOPIFY DEVELOPMENT TEAM!

DO YOU READ THIS AT ALL?

ANYONE OUT THERE?

THIS IS DIRECT CUSTOMER FEEDBACK... YOU DIDN'T EVEN HAVE TO SOLICIT IT... GRANTED, NOT A PROBLEM WITH 1000's OF LIKES... BUT SOME REACTION WOULD BE AWESOME... ACKNOWLEDGEMENT, TREAT US WITH SOME DIGNITY!!!

Highlighted
Excursionist
40 0 31

Pleassee help us address this!  If a customer checks out from the cart the inventory is automatically adjusted for the item and they are allowed to check out.  If the customer uses a checkout url from a draft order to enter checkout then they see the same "Inventory Issues" warning but are not given the option to continue checkout with the lowered inventory level.

This is causing merchants running our app to lose sales and their customers are getting frustrated.  Can Shopify at least apply the same logic to draft order checkouts as regular checkouts?

Highlighted
Highlighted
New Member
2 0 6

This doesn't address why this thread has been ignored for years by Shopify, and as you can see on the thread you linked to, the Shopify response hasn't really solved the issue in a way that suits either retailers or customers. We still need a system for holding inventory that actually, you know, holds the inventory.

Highlighted
New Member
7 0 0

SOLUTION? or at least step in the right direction:

 

1: Create the draft order for the customer.

2: Do not hit "email invoice".

3: Instead hit "mark as pending". Popup> choose "other" payment method, hit "create order".

- Your shop will send an email to the customer thanking them for their "purchase". Perhaps update this email format to say the correct thing such as "order".

- Your shop takes that item(s) out of inventory. So it cannot be accidentally purchased by someone else, and negates the bollocks of a customer getting to checkout to realise something is out of stock.

4: If you want them to pay remotely from their location,  hit "collect payment".

- Choose "send invoice" and it will send an email inviting them to pay for the order by any usual means on your checkout.

- Or if they call you to pay over the phone, choose "pay by c card" using their credit card.

 

5: If the customer then comes into store,

- It seems that the order is NOT available for credit card payment on either the POS app or the shopify app on mobile. Which is shit.

- It is possible to bring up the order on your usual shopify admin, hit "collect payment" and put a credit card through, same as phone method.


Cheers

Joel

0 Likes
Highlighted
New Member
2 0 0

In case anyone wants to develop this using the Shopify API, follow the tutorial below. Please note that this is a very elaborated version so that people can understand the development process. This can be further enhanced in many possible ways. Also, please do this at your own risk. I am not responsible for any losses. I'd suggest you to build a dev store and try this on that.

Step 1) Create a private app

  • Login to admin
  • Click on Apps
  • Click 'Manage private apps'
  • Click 'Create new private app'
  • Fill in the details.
  • Under Admin API give read/write access to: Draft orders, Inventory, Products, Product listings, Orders, Order editing.
  • Under Storefront API, check the allow box and then check all boxes under it.
  • Click Save then click Create App
  • Copy the password field.
  • Go to Settings > Locations > Select your Location > Copy the id from the address bar of your browser (only the number part at the end after locations/ )
  • Copy the location id

Step 2) On a separate web server, create 3 files:

  • create.php
  • update.php
  • delete.php

    Let's assume your domain is mydev.com and the folder you create these files in is called api. Your api urls would be:

    (make sure SSL is properly installed on your domain)

Step 3) Create/register webhooks (whenever a draft order is created, shopify will send a post request of the order data to our server)

Step 4) Add logic for inventory update

  • edit create.php
    • catch json post data — eg: $catch = json_decode(file_get_contents('php://input'), true);
    • loop through $catch['line_items']
      • store variant id - eg: $variant_id = $loop_item['variant_id'];
      • store quantity - eg: $quantity = $loop_item['quantity'];
      • send a GET request to https://yourstore.myshopify.com/admin/api/2020-10/variants/{$variant_id}.json
      • store inventory_item_id - eg: $inv_item_id = $get_data['variant']['inventory_item_id'];
      • send a POST request to https://yourstore.myshopify.com/admin/api/2020-10/inventory_levels/adjust.json, postfields: '{"location_id": location-id-from-step-1, "inventory_item_id": $inv_item_id, "available_adjustment": -$quantity}', headers will be same as webhooks (notice the - sign before $quantity)
      • from the response, you will get the new quantity which should be stored - eg: $new_quantity = $post_data['inventory_level']['available'];
      • create a database on your server and store the following information there: $catch['id'], $variant_id, $new_quantity, $quantity, $inv_item_id
  • edit update.php
    • catch json post data — eg: $catch = json_decode(file_get_contents('php://input'), true);
    • loop through $catch['line_items'] 
      • store variant id - eg: $variant_id = $loop_item['variant_id'];
      • store quantity - eg: $new_qty = $loop_item['quantity'];
      • send a GET request to https://yourstore.myshopify.com/admin/api/2020-10/variants/{$variant_id}.json
      • store inventory_item_id - eg: $inv_item_id = $get_data['variant']['inventory_item_id'];
      • fetch latest details from your database where id = $catch['id'] and variant = $variant_id
      • store old available - eg: $old_avail = $db_data['old_avail'];
      • store old quantity - eg: $old_qty = $db_data['old_qty'];
      • if($new_qty > $old_qty)
        • add old quantity with old available
        • subtract new quantity with the addition
        • subtract the subtraction from old quantity
        • store the final value - eg: $calc
        • send a POST request to https://yourstore.myshopify.com/admin/api/2020-10/inventory_levels/adjust.json, postfields: '{"location_id": location-id-from-step-1, "inventory_item_id": $inv_item_id, "available_adjustment": -$calc}', headers will be same as webhooks (notice the - sign before $calc)
      • else if($new_qty < $old_qty)
        • add old quantity with old available
        • subtract new quantity from the addition
        • subtract old available from the subtraction
        • run abs on the final value and store it - eg: $calc
        • send a POST request to https://yourstore.myshopify.com/admin/api/2020-10/inventory_levels/adjust.json, postfields: '{"location_id": location-id-from-step-1, "inventory_item_id": $inv_item_id, "available_adjustment": $calc}', headers will be same as webhooks (notice there is NO - sign before $calc)
      • from the response, you will get the new quantity which should be stored - eg: $new_quantity = $post_data['inventory_level']['available'];
      • update the details in database where id = $catch['id'] and variant = $variant_id
  • edit delete.php
    • catch json post data — eg: $catch = json_decode(file_get_contents('php://input'), true);
    • fetch details from database where id = $catch['id'];
    • store old item id - eg: $inv_item_id = $db_data['inv_item_id'];
    • store old quantity - eg: $old_qty = $db_data['old_qty'];
    • send a POST request to https://yourstore.myshopify.com/admin/api/2020-10/inventory_levels/adjust.json, postfields: '{"location_id": location-id-from-step-1, "inventory_item_id": $inv_item_id, "available_adjustment": $old_qty}', headers will be same as webhooks (notice there is NO - sign before $old_qty)
    • it's upto you if you want to keep the entry in the database or delete it. make sure to update it if you decide to keep it.

Step 5) Test it (let's assume your inventory count of a product is 100)

  • Go to shopify admin
  • Click on orders in left menu
  • Click on drafts in left menu
  • Click Create draft order
  • Add customer (always add first and do not press Enter key)
  • Add product (do not press Enter key)
  • Set the quantity (let's say 5)
  • Click Save draft order (or press the Enter key)

You should see 95 remaining inventory for the product. (be patient, sometimes it can take upto 1-2 minutes for shopify to hit our servers). Try changing the quantity of the draft order to 10, you should see 90 remaining now. Try making it back to 5 and you should see inventory go back to 95. Try deleting it now and your inventory should be 100 again. Hope it helps. Feel free to contact me if you need help with the development. Search my username on Google and i'll be on top  

0 Likes