Solved

how to build the giftcard mail

omriWedev
Shopify Partner
12 0 2

Hey everyone,
i tried to build an app for custom gift card,
one of the features is that customer can schedule the time to send the gift card mail,and also to who to send the gift card.
this info attached to the gift card product with line item properties.
any ideas how to implement functionality like this ? i really break my head to find a solution 😫
thanks for any help !

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1322 217 457

This is an accepted solution.

Hey @omriWedev - there isn't a way to control when the gift card email sends out through the API other than when it is first created.


That said, one possible way you could build a scheduled time to send the gift card out would be to query the Gift Card object in GraphQL (or REST). This would allow you to pull the Gift Card's full number by pulling the values of the masked code and last characters fields. These two fields would give you the full number of a gift card. Then, you could import into an email template that is sent out by your app. This would still depend on the access to the gift card API, which is a Shopify Plus only API.


I'm not sure which framework you're using, but you might want to look into using our Node.JS library to build the backend for your app. You could then using a node package like this one here to build the email templates.


We can't fully help with app development, but I hope this helps point you toward a solution. Sounds like it could be a useful app!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1322 217 457

This is an accepted solution.

Hey @omriWedev - there isn't a way to control when the gift card email sends out through the API other than when it is first created.


That said, one possible way you could build a scheduled time to send the gift card out would be to query the Gift Card object in GraphQL (or REST). This would allow you to pull the Gift Card's full number by pulling the values of the masked code and last characters fields. These two fields would give you the full number of a gift card. Then, you could import into an email template that is sent out by your app. This would still depend on the access to the gift card API, which is a Shopify Plus only API.


I'm not sure which framework you're using, but you might want to look into using our Node.JS library to build the backend for your app. You could then using a node package like this one here to build the email templates.


We can't fully help with app development, but I hope this helps point you toward a solution. Sounds like it could be a useful app!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog