I use draftOrderCreate and draftOrderComplete to create orders to log sales from elsewhere.
Sometimes items will sell for a different price to Shopify. So I use productVariantsBulkUpdate to update the price before referencing the item by Shopify Variant Id when creating an order via draftOrderCreate.
When I check the item itself (listing page), the price update worked. However the problem is the price change does not reflect in the order, neither under list item pricing nor for subtotals, both of which you cannot change from DraftOrderCreate.
Please help me with a solution. I have been struggling for months. Have already tried spacing out time between price update and order creation (15 minute delay)
Hey @FLUF_Team - hoping I’m understanding things correctly here, but if you’re looking at overriding a draft order’s pricing for a particular item while it’s being created, you should be able to do that on the line items themselves like this (more info here):
mutation draftOrderCreateWithCustomPrice($input: DraftOrderInput!) {
draftOrderCreate(input: $input) {
draftOrder {
id
name
email
lineItems(first: 10) {
edges {
node {
id
title
variant {
id
price
}
quantity
}
}
}
}
userErrors {
field
message
}
}
}
Oh my goodness. I can’t believe I haven’t seen that. I’m embarrassed and ashamed :D. Thanks so much. I had to be reading old docs (see it got added in the 2025-01 version)