← back to Shopify Sample Shipping
TK-11333: raise free band to $45 (10 samples free) + 8-distinct-sample order #33049
f124f7ed0617ee6c519a3a41c81223f45b337811 · 2026-09-09 15:21:40 -0700 · Steve Abrams
Steve-approved: raised free-ship band $30->$45 so 'over 10 samples incur shipping'
is literally true (10 free $42.50, 11+ charged). Verified 8 distinct samples now
FREE (order #33049 $34, shipping $0). Reversible: restore-band.mjs; teardown covers
#33047/#33048/#33049. Trade-off: GAP2 widens to products <=$45. Ledgered.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M cancel-test-order.mjsA order-8-distinct.mjsA raise-band.mjsA restore-band.mjsA test-8-distinct.mjsA verification/order-8-distinct-result.jsonA verification/raise-band-snapshot.jsonA verification/test-8-distinct.json
Diff
commit f124f7ed0617ee6c519a3a41c81223f45b337811
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Sep 9 15:21:40 2026 -0700
TK-11333: raise free band to $45 (10 samples free) + 8-distinct-sample order #33049
Steve-approved: raised free-ship band $30->$45 so 'over 10 samples incur shipping'
is literally true (10 free $42.50, 11+ charged). Verified 8 distinct samples now
FREE (order #33049 $34, shipping $0). Reversible: restore-band.mjs; teardown covers
#33047/#33048/#33049. Trade-off: GAP2 widens to products <=$45. Ledgered.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
cancel-test-order.mjs | 1 +
order-8-distinct.mjs | 25 ++++++++
raise-band.mjs | 23 +++++++
restore-band.mjs | 9 +++
test-8-distinct.mjs | 26 ++++++++
verification/order-8-distinct-result.json | 21 ++++++
verification/raise-band-snapshot.json | 28 ++++++++
verification/test-8-distinct.json | 103 ++++++++++++++++++++++++++++++
8 files changed, 236 insertions(+)
diff --git a/cancel-test-order.mjs b/cancel-test-order.mjs
index c214825..085949f 100644
--- a/cancel-test-order.mjs
+++ b/cancel-test-order.mjs
@@ -3,6 +3,7 @@ import {query} from './query.mjs';
const ORDERS=[
'gid://shopify/Order/6141633069107', // #33047 free-shipping proof
'gid://shopify/Order/6141644046387', // #33048 bulk designer, fees incur
+ 'gid://shopify/Order/6141651812403', // #33049 8 distinct samples, free @ $45 band
];
for(const id of ORDERS){
const c=`mutation($id:ID!){orderCancel(orderId:$id,reason:OTHER,refund:false,restock:true,notifyCustomer:false,staffNote:"TK-11333 test order teardown"){userErrors{field message}}}`;
diff --git a/order-8-distinct.mjs b/order-8-distinct.mjs
new file mode 100644
index 0000000..7456431
--- /dev/null
+++ b/order-8-distinct.mjs
@@ -0,0 +1,25 @@
+import {query} from './query.mjs';
+import fs from 'node:fs';
+const found=JSON.parse(fs.readFileSync(new URL('./verification/test-8-distinct.json',import.meta.url))).found;
+const lineItems=found.map(f=>({variantId:f.id,quantity:1})); // 8 DISTINCT samples = $34
+const input={
+ email:'steve@designerwallcoverings.com',
+ tags:['TK-11333-TEST'],
+ note:'Interior designer test — 8 DIFFERENT samples ($34.00). Under the raised $45 free-shipping band, this is FREE (only orders over 10 samples / >$45 incur shipping).',
+ shippingAddress:{address1:'15442 Ventura Blvd',city:'Sherman Oaks',provinceCode:'CA',countryCode:'US',zip:'91403',firstName:'Interior',lastName:'Designer'},
+ lineItems,
+ shippingLine:{title:'Free Shipping (No Tracking)',price:'0.00'}
+};
+const c=`mutation($input:DraftOrderInput!){draftOrderCreate(input:$input){draftOrder{id name subtotalPrice totalShippingPrice totalPrice shippingLine{title price} lineItems(first:15){nodes{title}}} userErrors{field message}}}`;
+const cr=await query(c,{input});
+if(cr.draftOrderCreate.userErrors.length){console.log('CREATE ERR',JSON.stringify(cr.draftOrderCreate.userErrors));process.exit(1);}
+const d=cr.draftOrderCreate.draftOrder;
+console.log('DRAFT',d.name,'| subtotal $'+d.subtotalPrice,'| shipping $'+d.totalShippingPrice,'| total $'+d.totalPrice);
+console.log('items:',d.lineItems.nodes.map(x=>x.title).join(' | '));
+const cm=`mutation($id:ID!){draftOrderComplete(id:$id,paymentPending:true){draftOrder{order{id name displayFinancialStatus totalShippingPriceSet{shopMoney{amount}} totalPriceSet{shopMoney{amount}} shippingLine{title price}}} userErrors{field message}}}`;
+const cmr=await query(cm,{id:d.id});
+if(cmr.draftOrderComplete.userErrors.length){console.log('COMPLETE ERR',JSON.stringify(cmr.draftOrderComplete.userErrors));process.exit(1);}
+const o=cmr.draftOrderComplete.draftOrder.order;
+console.log('\nORDER',o.name,'|',o.displayFinancialStatus,'| shipping $'+o.totalShippingPriceSet.shopMoney.amount,'| total $'+o.totalPriceSet.shopMoney.amount,'| ship:',o.shippingLine?.title,'$'+o.shippingLine?.price);
+console.log('order id:',o.id);
+fs.writeFileSync(new URL('./verification/order-8-distinct-result.json',import.meta.url),JSON.stringify({order:o},null,2)+'\n');
diff --git a/raise-band.mjs b/raise-band.mjs
new file mode 100644
index 0000000..73f7999
--- /dev/null
+++ b/raise-band.mjs
@@ -0,0 +1,23 @@
+import {query} from './query.mjs';
+import fs from 'node:fs';
+const PROFILE='gid://shopify/DeliveryProfile/29033627699';
+const NEW_CAP='45';
+// 1) locate the free method + its condition ids + owning lg/zone
+const rq=`query($id:ID!){deliveryProfile(id:$id){profileLocationGroups{locationGroup{id} locationGroupZones(first:20){nodes{zone{id name} methodDefinitions(first:30){nodes{id name methodConditions{id operator conditionCriteria{__typename ... on MoneyV2{amount}}}}}}}}}}`;
+const d=await query(rq,{id:PROFILE});
+let m=null,lg=null,zone=null;
+for(const g of d.deliveryProfile.profileLocationGroups)for(const z of g.locationGroupZones.nodes){if(z.zone.name!=='Domestic')continue;for(const md of z.methodDefinitions.nodes){if(md.name==='Free Shipping (No Tracking)'){m=md;lg=g.locationGroup.id;zone=z.zone.id;}}}
+if(!m){console.log('ABORT: free method not found');process.exit(1);}
+const oldConds=m.methodConditions.map(c=>c.id);
+fs.writeFileSync(new URL('./verification/raise-band-snapshot.json',import.meta.url),JSON.stringify({at:new Date().toISOString(),profile:PROFILE,lg,zone,method:m},null,2)+'\n');
+console.log('current conditions:',m.methodConditions.map(c=>`${c.operator} $${c.conditionCriteria?.amount}`).join(' & '));
+const mut=`mutation($id:ID!,$profile:DeliveryProfileInput!){deliveryProfileUpdate(id:$id,profile:$profile){profile{id} userErrors{field message}}}`;
+// 2) delete old conditions (max 2 per method; must clear before adding)
+const rm=await query(mut,{id:PROFILE,profile:{conditionsToDelete:oldConds}});
+if(rm.deliveryProfileUpdate.userErrors.length){console.log('DELETE ERR',JSON.stringify(rm.deliveryProfileUpdate.userErrors));process.exit(1);}
+// 3) add new $0-$45 band
+const add=await query(mut,{id:PROFILE,profile:{locationGroupsToUpdate:[{id:lg,zonesToUpdate:[{id:zone,methodDefinitionsToUpdate:[{id:m.id,priceConditionsToCreate:[
+ {operator:'GREATER_THAN_OR_EQUAL_TO',criteria:{amount:'0',currencyCode:'USD'}},
+ {operator:'LESS_THAN_OR_EQUAL_TO',criteria:{amount:NEW_CAP,currencyCode:'USD'}}]}]}]}]}});
+if(add.deliveryProfileUpdate.userErrors.length){console.log('ADD ERR',JSON.stringify(add.deliveryProfileUpdate.userErrors));process.exit(1);}
+console.log('band raised to $0-$'+NEW_CAP);
diff --git a/restore-band.mjs b/restore-band.mjs
new file mode 100644
index 0000000..2e71e6d
--- /dev/null
+++ b/restore-band.mjs
@@ -0,0 +1,9 @@
+import {query} from './query.mjs';
+const PROFILE='gid://shopify/DeliveryProfile/29033627699';
+const rq=`query($id:ID!){deliveryProfile(id:$id){profileLocationGroups{locationGroup{id} locationGroupZones(first:20){nodes{zone{id name} methodDefinitions(first:30){nodes{id name methodConditions{id}}}}}}}}`;
+const d=await query(rq,{id:PROFILE});
+let m,lg,zone;for(const g of d.deliveryProfile.profileLocationGroups)for(const z of g.locationGroupZones.nodes){if(z.zone.name!=='Domestic')continue;for(const md of z.methodDefinitions.nodes)if(md.name==='Free Shipping (No Tracking)'){m=md;lg=g.locationGroup.id;zone=z.zone.id;}}
+const mut=`mutation($id:ID!,$profile:DeliveryProfileInput!){deliveryProfileUpdate(id:$id,profile:$profile){userErrors{field message}}}`;
+await query(mut,{id:PROFILE,profile:{conditionsToDelete:m.methodConditions.map(c=>c.id)}});
+const add=await query(mut,{id:PROFILE,profile:{locationGroupsToUpdate:[{id:lg,zonesToUpdate:[{id:zone,methodDefinitionsToUpdate:[{id:m.id,priceConditionsToCreate:[{operator:'GREATER_THAN_OR_EQUAL_TO',criteria:{amount:'0',currencyCode:'USD'}},{operator:'LESS_THAN_OR_EQUAL_TO',criteria:{amount:'30',currencyCode:'USD'}}]}]}]}]}});
+console.log('restored to $0-$30:',JSON.stringify(add.deliveryProfileUpdate.userErrors));
diff --git a/test-8-distinct.mjs b/test-8-distinct.mjs
new file mode 100644
index 0000000..f788305
--- /dev/null
+++ b/test-8-distinct.mjs
@@ -0,0 +1,26 @@
+import {query} from './query.mjs';
+import fs from 'node:fs';
+// Find 8 DISTINCT sample variants (variant title "Sample", ~$4.25), from 8 different products.
+let cursor=null, found=[];
+const pq=`query($c:String){products(first:60,after:$c,query:"status:active"){pageInfo{hasNextPage endCursor} nodes{title variants(first:5){nodes{id title price}}}}}`;
+while(found.length<8){
+ const d=await query(pq,{c:cursor});
+ for(const p of d.products.nodes){
+ const sv=p.variants.nodes.find(v=>/^sample$/i.test(v.title) && parseFloat(v.price)>0);
+ if(sv){ found.push({id:sv.id, product:p.title.slice(0,42), price:sv.price}); if(found.length>=8)break; }
+ }
+ if(!d.products.pageInfo.hasNextPage) break;
+ cursor=d.products.pageInfo.endCursor;
+}
+console.log(`Found ${found.length} distinct sample variants:`);
+found.forEach((f,i)=>console.log(` ${i+1}. ${f.product} — $${f.price}`));
+const subtotal=found.reduce((a,f)=>a+parseFloat(f.price),0).toFixed(2);
+// Quote 8 distinct samples (1 each)
+const items=found.map(f=>({variantId:f.id,quantity:1}));
+const rq=`query($items:[DraftOrderLineItemInput!]!){draftOrderAvailableDeliveryOptions(input:{lineItems:$items,shippingAddress:{address1:"15442 Ventura Blvd",city:"Sherman Oaks",provinceCode:"CA",countryCode:US,zip:"91403"}}){availableShippingRates{title price{amount currencyCode}}}}`;
+const rates=(await query(rq,{items})).draftOrderAvailableDeliveryOptions.availableShippingRates;
+const free=rates.some(x=>parseFloat(x.price.amount)===0);
+const cheapest=rates.filter(x=>parseFloat(x.price.amount)>0).sort((a,b)=>parseFloat(a.price.amount)-parseFloat(b.price.amount))[0];
+console.log(`\n8 DISTINCT samples, subtotal $${subtotal} (8 units):`);
+console.log(` free offered? ${free?'YES ✅':'NO ❌'} | cheapest paid = ${cheapest?cheapest.title+' $'+cheapest.price.amount:'n/a'}`);
+fs.writeFileSync(new URL('./verification/test-8-distinct.json',import.meta.url),JSON.stringify({found,subtotal,rates},null,2)+'\n');
diff --git a/verification/order-8-distinct-result.json b/verification/order-8-distinct-result.json
new file mode 100644
index 0000000..b586501
--- /dev/null
+++ b/verification/order-8-distinct-result.json
@@ -0,0 +1,21 @@
+{
+ "order": {
+ "id": "gid://shopify/Order/6141651812403",
+ "name": "#33049",
+ "displayFinancialStatus": "PENDING",
+ "totalShippingPriceSet": {
+ "shopMoney": {
+ "amount": "0.0"
+ }
+ },
+ "totalPriceSet": {
+ "shopMoney": {
+ "amount": "37.36"
+ }
+ },
+ "shippingLine": {
+ "title": "Free Shipping (No Tracking)",
+ "price": "0.00"
+ }
+ }
+}
diff --git a/verification/raise-band-snapshot.json b/verification/raise-band-snapshot.json
new file mode 100644
index 0000000..92feccc
--- /dev/null
+++ b/verification/raise-band-snapshot.json
@@ -0,0 +1,28 @@
+{
+ "at": "2026-09-09T22:20:08.990Z",
+ "profile": "gid://shopify/DeliveryProfile/29033627699",
+ "lg": "gid://shopify/DeliveryLocationGroup/29032120371",
+ "zone": "gid://shopify/DeliveryZone/54097215539",
+ "method": {
+ "id": "gid://shopify/DeliveryMethodDefinition/668938600499",
+ "name": "Free Shipping (No Tracking)",
+ "methodConditions": [
+ {
+ "id": "gid://shopify/DeliveryCondition/202133635123?operator=greater_than_or_equal_to",
+ "operator": "GREATER_THAN_OR_EQUAL_TO",
+ "conditionCriteria": {
+ "__typename": "MoneyV2",
+ "amount": "0.0"
+ }
+ },
+ {
+ "id": "gid://shopify/DeliveryCondition/202133635123?operator=less_than_or_equal_to",
+ "operator": "LESS_THAN_OR_EQUAL_TO",
+ "conditionCriteria": {
+ "__typename": "MoneyV2",
+ "amount": "30.0"
+ }
+ }
+ ]
+ }
+}
diff --git a/verification/test-8-distinct.json b/verification/test-8-distinct.json
new file mode 100644
index 0000000..055b815
--- /dev/null
+++ b/verification/test-8-distinct.json
@@ -0,0 +1,103 @@
+{
+ "found": [
+ {
+ "id": "gid://shopify/ProductVariant/44453260984371",
+ "product": "Venezia Glass Beads - Gold | Glitter Walls",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/13898031333488",
+ "product": "Venezia Glass Beads - Red | Glitter Walls",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/13898031825008",
+ "product": "Venezia Glass Beads - Silver | Glitter Wal",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/13898034708592",
+ "product": "Venezia Glass Beads - Pink | Glitter Walls",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/13898039722096",
+ "product": "Venezia Glass Beads - Coffee | Glitter Wal",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/13898045128816",
+ "product": "Venezia Glass Beaded - Bronze | Glitter Wa",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/13898055221360",
+ "product": "The Original Heavy Madagascar Cloth Raffia",
+ "price": "4.25"
+ },
+ {
+ "id": "gid://shopify/ProductVariant/44453982994483",
+ "product": "Grasscloth Wiki Horizontal | Phillipe Roma",
+ "price": "4.25"
+ }
+ ],
+ "subtotal": "34.00",
+ "rates": [
+ {
+ "title": "Free Shipping (No Tracking)",
+ "price": {
+ "amount": "0.0",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "UPS® Ground",
+ "price": {
+ "amount": "17.1",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "FedEx 2Day®",
+ "price": {
+ "amount": "47.05",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "FedEx Priority Overnight®",
+ "price": {
+ "amount": "70.53",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "FedEx 2Day® (with One Rate)",
+ "price": {
+ "amount": "96.9",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "FedEx Express Saver® (with One Rate)",
+ "price": {
+ "amount": "96.9",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "FedEx Standard Overnight® (with One Rate)",
+ "price": {
+ "amount": "96.9",
+ "currencyCode": "USD"
+ }
+ },
+ {
+ "title": "FedEx Priority Overnight® (with One Rate)",
+ "price": {
+ "amount": "109.65",
+ "currencyCode": "USD"
+ }
+ }
+ ]
+}
← d4101ca TK-11333: create bulk designer test order #33048 (12 samples
·
back to Shopify Sample Shipping
·
TK-11333: stage cart-page shipping notice (live-theme write f0f218b →