query getInventoryItems($afterCursor: String) { inventoryItems(first: 200, after: $afterCursor, query: “sku:${itemSku}”) { nodes { id sku tracked } pageInfo { hasNextPage endCursor } } }
Category: Shopify
Bulk Edit in Shopify
The Shopify Bulk Editor allows to efficiently edit multiple products at once, saving time and streamlining product management process. The Bulk Editor presents a spreadsheet-like interface where we can see all selected products and their properties. We can click on Add fields at the top of the Bulk Editor to include more options for editing.… Continue reading Bulk Edit in Shopify
Collaborator Accounts in Shopify
When there is a user limit in Shopify, you can utilize collaborator access instead of normal user access. Collaborators don’t count towards your store’s user limit. To request collaborator access, you need a Shopify Partner account. From this account, you can send a collaborator access request to the store admin. The store admin must accept… Continue reading Collaborator Accounts in Shopify
Fetch Gift Card details from Shopify
Pass the customer email to the query to fetch the gift cards for that customer. The Gift Card Id is generated in NetSuite once the order is fulfilled. The gift card can then be applied to any payment. Use the following query to fetch gift card details from Shopify: giftCards(first: 10, query: “abc@xyz.com”) { … Continue reading Fetch Gift Card details from Shopify
Fetch Payment method in Shopify using GraphQL
While fetching orders through Shopify using graphql query, we can fetch the transaction payment information. The gateway field of transactions info provides the payment method. transactions { receiptJson id amount gateway … Continue reading Fetch Payment method in Shopify using GraphQL
Delete Fulfillment in Shopify using GraphQL Mutation
A mutation is used to delete fulfillment in Shopify using GraphQL. mutation { fulfillmentCancel(id: “gid://shopify/Fulfillment/${fulfillmentId}”) { fulfillment { id status } userErrors { … Continue reading Delete Fulfillment in Shopify using GraphQL Mutation
GraphQL query to fetch all the inventory item details from Shopify
GraphQL query to retrieve all inventory items. Utilize afterCursor for pagination to fetch all orders, as each query instance can return a maximum of 250 orders. query getInventoryItems($afterCursor: String) { inventoryItems(first: 250, after: $afterCursor) { … Continue reading GraphQL query to fetch all the inventory item details from Shopify
GraphQL query to fetch all the sales orders from Shopify
GraphQL query to retrieve all sales orders with a status of “paid.” Utilize afterCursor for pagination to fetch all orders, as each query instance can return a maximum of 250 orders. query getOrders($afterCursor: String) { orders( … Continue reading GraphQL query to fetch all the sales orders from Shopify
Create Fulfillment in Shopify using GraphQL Mutation
A mutation is used to create fulfillment in Shopify using GraphQL. The data is passed as variables to the fulfillment orders object obtained for the order. Mutation: mutation fulfillmentCreate($input: FulfillmentInput!) { fulfillmentCreate(fulfillment: $input) { fulfillment { id status } userErrors { field message } } } Variable: { “input”: { “lineItemsByFulfillmentOrder”: [ { “fulfillmentOrderId”: “gid://shopify/FulfillmentOrder/${FULFILLMENT_ORDER_ID}”,… Continue reading Create Fulfillment in Shopify using GraphQL Mutation
Query to get Fulfillment Orders object in Shopify
In order to sync the item fulfillment details from NetSuite to Shopify, it is required to get the fulfillment orders object for the order in Shopify. Then, the line items in NetSuite are compared to the fulfillment orders object and update the quantity via mutation. Query: query getFulfillmentOrders($afterCursor: String) { order(id: “gid://shopify/Order/${ORDER_ID}”) { id fulfillmentOrders(first:… Continue reading Query to get Fulfillment Orders object in Shopify