Skip to main content

I have create a zap to send orders to a Google sheet with an order is fulfilled. One thing I notice is that I cant seem to find the ‘Net Payment’. I see all of the line items and line item discounts so I can of course bring it all together and make the calculation, but seems strange that I cant find it. Or have I missed it?

It would also be good to know how Zapier handles partial-refunds (post sale date) and refunds. I was  kind of hoping that a zap would serve as a nice short cut instead of me developing a webhook. Ultimately, the data is going to end up in a MySQL database and used for sales tax calculations, so its important to see refunds that negate previous sales tax paid.

Any input feedback appreciated.

Welcome to the Community @phil_greenphones🎉

I have create a zap to send orders to a Google sheet with an order is fulfilled. One thing I notice is that I cant seem to find the ‘Net Payment’. I see all of the line items and line item discounts so I can of course bring it all together and make the calculation, but seems strange that I cant find it. Or have I missed it?

There isn’t a field called “Net Payment” but there is a Subtotal Price field:
92c72c5f126974406b5631fa73e44b94.png
Would that give you the desired amount? 

It would also be good to know how Zapier handles partial-refunds (post sale date) and refunds. I was  kind of hoping that a zap would serve as a nice short cut instead of me developing a webhook. Ultimately, the data is going to end up in a MySQL database and used for sales tax calculations, so its important to see refunds that negate previous sales tax paid.

There’s a New Refund trigger which can trigger both on full and partial refunds. I believe there’s fields available with that trigger which would give the tax amount, but I can’t see a real refund sample on my end to confirm that. So I’d suggest testing out that trigger in a new Zap to see if it’s got all the desired information regarding any sales tax that was paid.

Looking forward to hearing from you on this!


Hi - thank you for the feedback.

I found a field called ‘Total Price’ and need to run this a few times to see if its showing the correct order total. I find it difficult to know exactly what each field is as I cant seem to find a clear explanation anywhere. Although this URL https://shopify.dev/docs/api/admin-rest/2024-04/resources/order Seems to cover most I think.

For some reason or another the zap missed an order which is a little annoying because if I cant rely on the zap pushing orders to my Google Sheet or MySQL database then I will have to create a web hook. The refund is a tricky one because we often have both partial and full refunds with anything up to 30 days past the purchase date. 
what I am doing here is building a custom receipt that is either emailed or printed out in-store. If a customer returns an item then ideally I should create a new refund receipt based upon exactly what was refunded.

So I am curious to whether this new refund trigger updates the same order and thus row in my sheet or in fact writes a new row. Which could become tricky as well.


Thanks for getting back to me @phil_greenphones. 🙂


I don’t have any documentation on this end that would give an explanation of all the available fields for the Shopify app’s triggers and actions, but the documentation you found for Shopify’s API should help to give an explanation of the different fields. If it’s not the right total amount, and there’s another field listed in Shopify’s API documentation that should have the right value perhaps you could use Shopify’s API Request (Beta) action to make a request to retrieve the necessary field? Check out our Set up an API request action guide for more details on how to use that sort of action.

I did some searching on this end but couldn’t see any existing bug reports relating to the New Fulfilled Order trigger not triggering on some orders. I’d suggest reaching out to the Support team here to help identify why the order was missed. They’ll have access to the logs for your Zap so they’ll be able to check whether any information for the order was sent from Shopify to better determine whether there’s a bug or some other reason why the order failed to trigger the Zap as expected.

With the New Refund trigger, there should be a Order ID field returned that relates to the order that is fully or partially refunded. So you could use that order ID in Google Sheet or MySQL app search action to ensure the Zap then updates the relevant row instead of creating a new row. There should be a list of the refunded items output as line items so you could potentially use that information to create the custom receipt. Though you’ll likely need to convert those line items into text so that they can be included in the body of the email. Formatter’s Utilities action has a Line-item to Text transform option that could be used for that: Convert line items into text strings 

Hope that helps to get you pointed in the right direction. If you run into any issues on that or have further questions at all please let me know.


Hi again - just a short follow up. I think the missed deal was due to me perhaps being in edit mode at the time the deal happened and somehow missed the deal. Not a huge issue as I am still in the testing stage. I am using Google Sheets for now as its just easier to manage. But when I am confident that the data is coming through with the required fields then I will migrate this to MySQL database.

I need to look into the refund trigger and run some tests. We are investigating whether we are actually obliged to create a new receipt. Long story short we sell used cell phones and sometime we get customers who after receiving the phone are not happy with the quality to which we then offer them a ‘discount/refund’. As I understand it a fulfilled order cannot not be edit and thus a refund needs to be given. Thus actually what I am curious about is how this Zapier Shopify API / webhook solution works. I guess I have to create a new zap with the update trigger that sends the necessary data to my Google Sheet or if its the case of MySQL I would simply run an update SQL query using the Order ID.

Thanks for your input. Always valuable to share knowledge.

 


Thanks for the update here @phil_greenphones. Glad to hear the missed deal was likely just a one-off occurrence due to you being in edit mode at the time! 😅

I need to look into the refund trigger and run some tests. We are investigating whether we are actually obliged to create a new receipt. Long story short we sell used cell phones and sometime we get customers who after receiving the phone are not happy with the quality to which we then offer them a ‘discount/refund’. As I understand it a fulfilled order cannot not be edit and thus a refund needs to be given. Thus actually what I am curious about is how this Zapier Shopify API / webhook solution works. I guess I have to create a new zap with the update trigger that sends the necessary data to my Google Sheet or if its the case of MySQL I would simply run an update SQL query using the Order ID.

That sounds like a good plan to me! Setting up Zaps to confirm whether the Shopify triggers are able to send the necessary data and then test sending that over to Google Sheets as well as MySQL definitely be the recommended approach here. 

If you run into any issues in setting that up at all just let us know - happy to assist further! 


Reply