Giftcard:
1. The user makes a giftcard request the information of that request can be obtained through the webhook: return.created. This webhook allows the creation of the
return in your management system.
2. Depending on the configured trigger, the creation will be executed from the giftcard:
- Automatically in the creation of the return
- Refund when the shipment is in progress
- Refund when the shipment is completed
- Automatically after validation
- Automatically after approval
To know more about these triggers please refer to the article that explains them:
Note: Keep in mind that the creation of the giftcard does not go directly
related to the increase in inventory.
3. Once the giftcard has been created, the webhook: refund.created It allows to receive the information related to it. Different than when a refund is made that the attributes
ecommerceRefundId or a change that the attributes ecommerceExchangeOrdername, ecommerceExchangeOrderId contain the information of each in this this case are the
attributes ecommerceGiftCardCode and ecommerceGiftCardId the that they will have the relevant information to the giftcard created.
In addition to the information transmitted by the webhook, in Shopify you leave notes and tags relating order and giftcard. A tag with the giftcard code is placed on the order and in
the notes of the giftcard indicate the order number by which i believe this giftcard.