Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi there,
I'm trying to automatically add a gift card to my orders using Flow, and I want it to be added for free without increasing the order total. I've tried two methods:
- Using "add order line" and then marking the order as paid. This automatically sends the gift card to the customer, but it changes the order total amount by adding the gift card's value.
- Using the officially recommended "Add free (discounted 100%) item to new orders" method. Although this adds the gift card as a free item, it doesn't automatically send the gift card; I have to manually click "send gift" for it to be delivered.
I also checked some App, such as rise.ai, but they use another template but not my own gift card email template.
Any help would be greatly appreciated,
Thanks
Solved! Go to the solution
This is an accepted solution.
Try the "Mark as fulfilled" action instead
It's not possible yet in Flow because to send the gift card you would need to call an API that was introduced in 2024-10 and Flow is currently using 2024-04. Flow's currently working to adopt 2024-07
Docs on the new mutations to send the gift card to a customer or the recipient https://shopify.dev/docs/api/admin-graphql/2024-10/objects/GiftCard#mutations
Hi Paul
Thanks for your reply. Do you have a rough timeline for when 2024-07 and 2024-10 will be adopted into Flow? I need to determine whether it’s worth creating my own server to call this API first.
It has to be done by October. I don't have a solid timeframe as upgrading API versions is currently a high amount of effort and we are working to make it faster.
Hi Paul,
I'm currently trying to use `giftCardSendNotificationToRecipient` on my server, but I don't have the gift card ID until it's fulfilled (after clicking the "Send the gift card" button).
Do you know if there's a way to achieve this using giftCardSendNotificationToRecipient, or do I need to use another API to handle the fulfillment?
Thanks
I don't think it's true that you don't have the gift card until after fulfillment. If you create the gift card, you should have the ID.
Hi Paul,
In my workflow, I add a gift card product variant to my order and mark it as free. However, I don't see any new gift card appearing on the gift_cards page in the admin UI, and I can't find the gift card ID in the `order.json` either; only the LineItem is available for it.
Could you have any idea where I can find the related gift card ID?
I see. There are gift card products and gift cards. You are adding a gift card product to the order, which must then be fulfilled in order to create the gift card. You must have auto-fulfillment turned off?
Usually on fulfillment I think it would email the gift card out. Is that what happens when you fulfill from the Admin?
Yes, auto-fulfillment is enabled. When I add an order line using the "Add Order Line" action in the flow (which I can't manage to mark as it as free), it is auto-fulfilled. However, when I add a gift card via the Flow Admin API (which I can mark it as free), it is not fulfilled automatcically. I'm stuck at this point.
That difference doesn't make sense to me unless the fulfillment logic is taking into account the $0 price of the gift card and not auto-fulfilling because of that. The process we use for the action is basically the same, except that we didn't have the step to discount the line item.
I think I would focus on fulfilling as part of the same workflow. I think it will send the gift card as part of fulfilling.
Something like this may work:
You might also just be able to use the output of the OrderCommit step. I think it outputs the new Order.
In that case, you could instead:
Thank you so much for your insights! Your explanation really helped me understand the possible issue.
I tried following your solutions, but I encountered a couple of issues:
You connected the condition to the wrong port on the "For each" step. You need "do this for each item".
The condition is incorrect. Because you were not in the loop, you did not see the variable for the individual fulfillment order.
Thank you for pointing that out. I’ve corrected the issue by connecting the condition to the right port on the "For each" step and using "do this for each item." I’m now able to run the process up to the final step. However, when I try to run the "Submit fulfillment request," I encounter an error:
I checked and noticed that for gift card order line, the "fulfillment_service" is "gift_card." Could that be causing the issue? I’d appreciate any further advice you might have.
This is an accepted solution.
Try the "Mark as fulfilled" action instead
It works ! Thank you so much Paul !
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025