Personalized checkout and custom promotions with Shopify Scripts
I'm trying to build a solution to prevent customers from checking out with an item if the item within checkout is a specific vendor and the discount code used is a specific code. I'm new to Shopify dev scene and am trying to learn myself. I am not sure if I should build a Shopify function or a Shopify Checkout UI extension. I tried to achieve this using Checkout UI extension and using GraphQL query to get the vendor data using useApi. My GraphQL query is:
query GetCheckoutData($checkoutId: ID!) { node(id: $checkoutId) { ... on Checkout { id lineItems { nodes { id variant { id product { id vendor } } } } } } }
but I don't get any return. I tried console logging this data and this is what I saw:
Object { message: "Internal error. Looks like something went wrong on our end.\nRequest ID: f30dcd81-3eb3-4b04-82e6-095f8df2577a-1709906907 (include this in support requests).", extensions: {…} }
I'm not sure what I'm doing wrong. Also, where I should request support. Thank you in advance for any help.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025