Get inventory quantity on new order email template

Get inventory quantity on new order email template

jaircuevajr
Tourist
4 0 2

Hello,

 

When a new order is made, the administrators receives an email with the order details. It's ok.

I'd like to edit this notification template to display the information if the products are in inventory or if I would have to manufacture them (or some).

 

Reading the guide for Notification Variable Template (https://help.shopify.com/en/manual/orders/notifications/email-variables) it seems there's no variable available that could bring me that information. Is it right? Or am I missing something?

 

Would be there any workaround?

 

Thanks

Replies 8 (8)

jaircuevajr
Tourist
4 0 2

I wonder, if it is not possible, then would it be possible to have the inventory qty information on the orders page inside admin area? I mean, after clicking on a specific order.

 

The admin area allow this kind of customization?

oeshop
Visitor
3 0 0

We are looking the same, it will be great if the new order email can show the available quantity too. Do you have any luck in finding a solution? 

jaircuevajr
Tourist
4 0 2
Sorry dude, we simply gave up due to this lack of support. 😞

amanda-91
Shopify Partner
84 0 50

Did you figure out a way to do this?


i have a similar desire of showing a line item value in order confirmation emails based on inventory state at a location. The only way I've come up with is to use Shopify flow and an inventory-change trigger to update the value of a variant metafield containing an integer of current stock value at a location. Was wondering if you came up with a way using less moving parts. 

jaircuevajr
Tourist
4 0 2
Sorry,

I could not accomplish that so we changed the project specs.

oeshop
Visitor
3 0 0

We are looking the same, I can now see there is a variable called `line.current_quantity` which I thought would show the inventory quantity, but it doesn't. 

 

https://help.shopify.com/en/manual/orders/notifications/email-variables

 

Would anyone share the workaround or solution if you find it? Thanks so much. 

oeshop
Visitor
3 0 0

Ha, @jaircuevajr  @amanda-91  I finally found a way to do this. Use this variable {{ line.variant.inventory_quantity }} to get the inventory stock, and then substract the {{line.quantity}}. So this should get what you need {{ line.variant.inventory_quantity - line.quantity }}

RunnsSommen
Tourist
7 0 0

Hi

Can you help me how the code should look?