Adding a line item to an order for free

I’m creating a Shopify flow that tags certain customer orders placed by Recharge, and adds a free gift to the order. The action in the flow is “Add order line item.” Will this add the line item for free? Or require the customer to pay? If it requires the customer to pay, how can I make the product free when it is added to their order?

1 Like

It would add the new amount to their balance on the order - like this:

Depending on the details of what you are adding for free to their order, you might be able to use a Buy X Get Y discount to make it free. Is it the same product every time that you’re adding as a free gift?

Currently the action does not discount items that it adds, so if the item has price, it won’t work via Flow. This will be possible soon via Flow’s recently recently Send Admin API request (when ability to return data is available)

Got it, thank you for sending that screenshot! It is the same product, but the gift will be added based on order tags, so I don’t think a Buy X, Get Y discount code would work here.

Gotcha. In that case, it might make sense to use some custom graphql api calls to do it. I can help with this on a paid basis if that’s of interest - there’s a link below in my footer.

Hi @paul_n

Looks like “Send Admin API request” already available in early access, so can you please share details on what is the best way via Shopify Flow to implement this case - after creating an order add a line item to it with a 100% discount?

This one isn’t quite possible with Send Admin API request because the action doesn’t yet return data for the mutations. You need that return data, because editing an order will require multiple API calls that pass a Calculated Order ID. We are working on that part now.

1 Like