Shopify Gift Card Setup/Requirements
Integration can only pull manually issued Gift Cards from Shopify when Shopify Gift Card API is unlocked with a Shopify Plus License.
Needed when requiring Gift Cards created Manually to be pulled to NetSuite due to Physical Gift Card or Apps like Loop or Returnly are being used and create them.
Shopify Gift Card API Page Document

The below is the requirement for Gift Card Setup for those coming in on Shopify orders.
In Shopify
Go to Shopify Default Gift Card Product Record

Take the Main Gift Card Shopify Product ID from the URL

Also make sure in Shopify Settings under the Checkout setting to do not auto-fulfill Gift Cards. Integration will fulfill the gift card once NetSuite is creating the Order.

In NetSuite
For Shopify Gift Cards to work with NetSuite Certificates , first enabled Gift Certificates Support in NetSuite:
Under Setup Tab > Company > Enabled Features > Items & Transactions

Then Create a Gift Certificate Item in NetSuite
Under Lists Tab > Accounting > Items > New > Choose Gift Certificate

Name the Gift Certificate Item as needed and include all needed subsidiaries

List the Pricing for this for levels needed @ 0.00

Set the Correct Accounting Information (Income Account, Liability Account, Tax Schedule=No Tax)

Under the Custom SubTab list the Main Shopify Product ID and Site listed it is on

When Buying the Gift Card
During Processing of the Order Pulled from Shopify, if there is a Gift Card listed, there is send a Specific Fulfillment for the Gift Card's In8 Shopify Line ID, to close the Gift Cards lines alone, in order to make the next call for the Gift Card Receipt Data needed to complete the order in NetSuite.
The next call we make to ask for the Fulfilled Gift Card Receipt data, we can set the following data
Gift Certificate From: Gift Card Code: •••• •••• •••• h25f
Gift Certificate Name: Gift Card
Gift Certificate Email: "giftcertificate@in8sync.com"
The request data also includes the gift card Id, so we may store that in NetSuite in order to match when an order that uses this gift certificate is placed.
"receipt": {
"gift_cards": [
{
"id": 133462261818,
"line_item_id": 2421968535610,
"masked_code": "•••• •••• •••• h25f"
}
]
},
Shopify returns a line item with a flag "gift_card", so the order can be identified as a gift card. When this syncs to NetSuite, it is needed to create a "Gift Certificate" record with the same amount.
"line_items": [
{
"id": 2421968535610,
"variant_id": 21932211601466,
"title": "Gift Card",
"quantity": 1,
"price": "50.00",
"sku": "",
"variant_title": "$50.00 USD",
"vendor": "Jack Mason",
"fulfillment_service": "gift_card",
"product_id": 2190826045498,
"requires_shipping": false,
"taxable": false,
"gift_card": true,
"pre_tax_price": "50.00",
"name": "Gift Card - $50.00 USD",
"variant_inventory_management": null,
"properties": [],
"product_exists": true,
"fulfillable_quantity": 0,
"grams": 0,
"total_discount": "0.00",
"fulfillment_status": "fulfilled",
Then the Order is created listing the data for the Certificate in NetSuite on the line item,



Applying the Gift Card
Before an Order can be processes in NS to Apply the Gift Card as Payment. The original Order that Gift Card was Purchased on Should be Billed.
When an order that uses the gift certificate is placed, we may identify it through the payment gateway name (gift_card).
"payment_gateway_names": [
"gift_card",
"shopify_payments"
],
In this case, we need to perform an additional request to the Shopify API calling the "transactions" endpoint, so that we can identify which gift card was used on that transaction and the amount, so that when creating the Sales Order in NetSuite, we can apply the gift certificate.
"transactions": [
{
"id": 1177564381242,
"order_id": 1048246845498,
"kind": "sale",
"gateway": "gift_card",
"status": "success",
"message": null,
"created_at": "2018-12-05T15:36:49-06:00",
"test": false,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2018-12-05T15:36:49-06:00",
"device_id": null,
"receipt": {
"gift_card_id": 133462261818,
"gift_card_last_characters": "h25f"
},
"error_code": null,
"source_name": "web",
"amount": "50.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1177564381242"
},
Then we can successfully create the order when the Gift Card is used for Payment