Need help debugging graphQL handlebars template

I'm getting handlebar_template_parse_errors when attempting to apply fulfillments to my shopify order. The order is created fine, the next step is creating the fulfillment. The error data being reported in the error console is truncated and not useful. I've tried turning on debug, both at the flow level and the step level, but because there isn't a request made there are no logs generated. When I take the data that's errored and reformat it for one-to-many and test template generation the template doesn't error and the request data looks fine. On top of that, if I take the generated request and drop it into Postman I can post the fulfillment to Shopify without error. Would someone please take a look at my data below and tell me if I'm crazy? I feel like I'm missing something very simple.

Thanks!

Template:

{
  "fulfillment": {
    "lineItemsByFulfillmentOrder": [
      {
        "fulfillmentOrderId": "{{record.fulfillmentOrderId}}",
        "fulfillmentOrderLineItems": [
          {{#each record.shippedItems}}
          {
            "id": "{{this.fulfillmentOrderLineItemId}}",
            "quantity": {{this.quantity}}
          }{{#unless @last}},{{/unless}}
          {{/each}}
        ]
      }
    ],
    {{#if record.trackingNumbers}}
    {{#compare record.trackingNumbers.length ">" 0}}
    "trackingInfo": {
      "company": "{{record.company}}",
      "numbers": [
      {{#each record.trackingNumbers}}
        "{{this}}"{{#unless @last}},{{/unless}} 
      {{/each}}
      ]
    },{{/compare}}{{/if}}
    "notifyCustomer": false
  }
}

Generated request:

{
  "fulfillment": {
    "lineItemsByFulfillmentOrder": [
      {
        "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/11838683447590",
        "fulfillmentOrderLineItems": [
          {
            "id": "gid://shopify/FulfillmentOrderLineItem/33455889547558",
            "quantity": 36
          },
          {
            "id": "gid://shopify/FulfillmentOrderLineItem/33455889613094",
            "quantity": 30
          },
          {
            "id": "gid://shopify/FulfillmentOrderLineItem/33455889580326",
            "quantity": 1
          }
        ]
      }
    ],
    "trackingInfo": {
      "company": "FedEx",
      "numbers": [
        "874068785189" 
      ]
    },
    "notifyCustomer": false
  }
}

Raw record data, formatted for one-to-many (unnecessary data removed for length/privacy):

{
"orderId": "48228898",
"itemFulfillmentName": "IF-7108351",
"shippingMethod": "FedEx Ground®",
"company": "FedEx",
"trackingNumbers": [
"874068785189"
],
"shippedItems": [
{
  "sku": "BVMSK49-SM",
  "quantity": 36,
  "fulfillmentOrderLineItemId": "gid://shopify/FulfillmentOrderLineItem/33455889547558"
},
{
  "sku": "COL-INTRO-MIG",
  "quantity": 30,
  "fulfillmentOrderLineItemId": "gid://shopify/FulfillmentOrderLineItem/33455889613094"
},
{
  "sku": "MB49-70-OWB",
  "quantity": 1,
  "fulfillmentOrderLineItemId": "gid://shopify/FulfillmentOrderLineItem/33455889580326"
}
],
"fulfillmentOrderId": "gid://shopify/FulfillmentOrder/11838683447590",
  "_PARENT": {
  "id": "48228898",
  "documentNumber": "SO-7068088",
  "shippingAddressId": "18385228",
  "billAddressee": "Example",
  "billAddress1": "address 1",
  "billAddress2": "",
  "billCity": "City",
  "billState": "IL",
  "billCountryCode": "US",
  "shipAddressee": "Example",
  "shipAddress1": "address1",
  "shipAddress2": "",
  "shipCity": "City",
  "shipState": "IL",
  "shipZip": "60025",
  "shipCountryCode": "US",
  "customerId": 3864219,
  "addressLabel": "Example",
  "currency": "USD",
  "paymentMethod": "VISA",
  "paymentTerms": "",
  "total": "526.50",
  "taxTotal": ".00",
  "shippingTotal": "39.00",
  "shopifyStoreId": "96091701542",
  "tags": "Sales Channel: Direct",
  "isTransaction": true,
  "orderDate": "2026-07-06T00:00:00-05:00",
  "shipDate": "2026-07-07T00:00:00-05:00",
  "closeDate": "2026-07-07T00:00:00-05:00",
  "lineItems": [
    {
        ...
    }
  ],
  "shippingLines": [
    {
        ...
    }
  ],
  "taxData": [
    {
        ...
    }
  ],
  "fulfillmentData": [
    {
      "orderId": "48228898",
      "itemFulfillmentName": "IF-7108351",
      "carrier": "FedEx Ground®",
      "shippingMethod": "FedEx Ground®",
      "trackingNumbers": "874068785189",
      "shippedItems": "BVMSK49-SM:36,COL-INTRO-MIG:30,MB49-70-OWB:1"
    }
  ],
  "isCustomerArranged": false,
  "addresses": [
    {
      "id": "292121",
      "recordType": "customer",
      "name": "Example",
      "internalId": "18385227",
      "addressInternalId": "18216221",
      "address": "Example\nAddress 1\nCity IL 60025\nUnited States"
    },
    {
      "id": "292121",
      "recordType": "customer",
      "name": "Example",
      "internalId": "18385228",
      "addressInternalId": "18513592",
      "address": "Example\nAddress 1\nCity IL 60025\nUnited States"
    }
  ],
  "shippingAddressInternalId": "18513592",
  "netsuiteAddressLocationData": {
    "id": "5920",
    "recordType": "customrecord_etail_b2b_locations_map",
    "relatedCompany": "Example",
    "relatedLocation": "",
    "relatedAddress": "Address 1",
    "shopifyCompanyID": "gid://shopify/Company/8869052710",
    "shopifyLocationID": "gid://shopify/CompanyLocation/10346856742",
    "shopifyCustomerID": "gid://shopify/Customer/23772574548262",
    "netsuiteCompanyId": "3864219",
    "netsuiteAddressId": "18513592"
  },
  "shopifyOrderData": {
    "id": "gid://shopify/Order/10961344659750",
    "name": "SO-7068088",
    "fulfillments": [],
    "fulfillmentOrders": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/FulfillmentOrder/11838683447590",
            "lineItems": {
              "edges": [
                {
                  "node": {
                    "id": "gid://shopify/FulfillmentOrderLineItem/33455889547558",
                    "sku": "BVMSK49-SM",
                    "totalQuantity": 36,
                    "remainingQuantity": 36,
                    "lineItem": {
                      "id": "gid://shopify/LineItem/33411933339942"
                    }
                  }
                },
                {
                  "node": {
                    "id": "gid://shopify/FulfillmentOrderLineItem/33455889580326",
                    "sku": "MB49-70-OWB",
                    "totalQuantity": 1,
                    "remainingQuantity": 1,
                    "lineItem": {
                      "id": "gid://shopify/LineItem/33411933372710"
                    }
                  }
                },
                {
                  "node": {
                    "id": "gid://shopify/FulfillmentOrderLineItem/33455889613094",
                    "sku": "COL-INTRO-MIG",
                    "totalQuantity": 30,
                    "remainingQuantity": 30,
                    "lineItem": {
                      "id": "gid://shopify/LineItem/33411933405478"
                    }
                  }
                }
              ]
            }
          }
        }
      ]
    }
  }
  }
}

FWIW, I added a preMap script to log the data prior to the request, this is the data that was used:

{
  "record": {
    "orderId": "48227036",
    "itemFulfillmentName": "IF-7104735",
    "shippingMethod": "UPS® Ground",
    "company": "UPS",
    "trackingNumbers": [
      "1ZX477W80393XYZPDQ"
    ],
    "shippedItems": [
      {
        "sku": "CV-2L",
        "quantity": 1,
        "fulfillmentOrderLineItemId": "gid://shopify/FulfillmentOrderLineItem/33455889514790"
      }
    ],
    "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/11838683414822",
    "_PARENT": {
      "id": "48227036",
      "documentNumber": "SO-7068050",
      "shippingAddressId": "25448210",
      "billAddressee": "Sum Boddy",
      "billAddress1": "123 Main Street",
      "billAddress2": "",
      "billCity": "Long Branch",
      "billState": "NJ",
      "billCountryCode": "US",
      "shipAddressee": "Example",
      "shipAddress1": "456 Main St",
      "shipAddress2": "",
      "shipCity": "Atlanta",
      "shipState": "GA",
      "shipZip": "30344-1008",
      "shipCountryCode": "US",
      "customerId": 1717944,
      "addressLabel": "Example",
      "currency": "USD",
      "paymentMethod": "VISA",
      "paymentTerms": "",
      "total": "32.63",
      "taxTotal": "2.63",
      "shippingTotal": "5.00",
      "shopifyStoreId": "96091701542",
      "tags": "Sales Channel: Direct",
      "isTransaction": true,
      "orderDate": "2026-07-02T00:00:00-05:00",
      "shipDate": "2026-07-06T00:00:00-05:00",
      "closeDate": "2026-07-06T00:00:00-05:00",
      "lineItems": [
        {
          "itemId": "3337",
          "lineId": 1,
          "rate": 25,
          "quantity": 1,
          "isBusinessItem": true,
          "itemSKU": "CV-2L",
          "itemDescription": "CVAULT - 2 LITER (d018)",
          "taxLines": [
            {
              "title": "City-Local Sales and Use Tax",
              "rate": 0.01,
              "amount": 0.25,
              "currency": "USD"
            },
            {
              "title": "County-Local Sales and Use Tax",
              "rate": 0.0275,
              "amount": 0.69,
              "currency": "USD"
            },
            {
              "title": "District-Local Sales and Use Tax",
              "rate": 0.01,
              "amount": 0.25,
              "currency": "USD"
            },
            {
              "title": "State-Sales and Use Tax",
              "rate": 0.04,
              "amount": 1,
              "currency": "USD"
            }
          ],
          "shopifyProductData": {
            "id": "155667",
            "recordType": "customrecord_celigo_shopify_shpfitem_map",
            "NetSuite Item": "ACC : HLD-MCV : CV-2L",
            "Shopify Variant Id": "52105952657702",
            "Shopify Product Id": "10408555938086",
            "Shopify Inventory Item Id": "54259564904742",
            "Shopify Store": "Boveda Business",
            "Shopify Store Id": "96091701542"
          }
        }
      ],
      "shippingLines": [
        {
          "amount": 5,
          "title": "Standard (under $250)",
          "taxLines": [
            {
              "title": "City-Local Sales and Use Tax",
              "rate": 0.01,
              "amount": 0.05,
              "currency": "USD"
            },
            {
              "title": "County-Local Sales and Use Tax",
              "rate": 0.0275,
              "amount": 0.14,
              "currency": "USD"
            },
            {
              "title": "District-Local Sales and Use Tax",
              "rate": 0.01,
              "amount": 0.05,
              "currency": "USD"
            },
            {
              "title": "State-Sales and Use Tax",
              "rate": 0.04,
              "amount": 0.2,
              "currency": "USD"
            }
          ]
        }
      ],
      "taxData": [
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".0275",
          "taxAmount": ".14",
          "taxLineType": "FREIGHT",
          "taxJurisdiction": "FULTON",
          "taxJurisdictionLevel": "COUNTY",
          "taxImpositionType": "Local Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".01",
          "taxAmount": ".05",
          "taxLineType": "FREIGHT",
          "taxJurisdiction": "EAST POINT",
          "taxJurisdictionLevel": "CITY",
          "taxImpositionType": "Local Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".01",
          "taxAmount": ".05",
          "taxLineType": "FREIGHT",
          "taxJurisdiction": "METROPOLITAN ATLANTA RAPID TRANSIT AUTHORITY",
          "taxJurisdictionLevel": "DISTRICT",
          "taxImpositionType": "Local Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".04",
          "taxAmount": ".20",
          "taxLineType": "FREIGHT",
          "taxJurisdiction": "GEORGIA",
          "taxJurisdictionLevel": "STATE",
          "taxImpositionType": "Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".04",
          "taxAmount": "1.00",
          "taxLineType": "item",
          "taxJurisdiction": "GEORGIA",
          "taxJurisdictionLevel": "STATE",
          "taxImpositionType": "Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".01",
          "taxAmount": ".25",
          "taxLineType": "item",
          "taxJurisdiction": "METROPOLITAN ATLANTA RAPID TRANSIT AUTHORITY",
          "taxJurisdictionLevel": "DISTRICT",
          "taxImpositionType": "Local Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".0275",
          "taxAmount": ".69",
          "taxLineType": "item",
          "taxJurisdiction": "FULTON",
          "taxJurisdictionLevel": "COUNTY",
          "taxImpositionType": "Local Sales and Use Tax",
          "taxLineItemNumber": "1"
        },
        {
          "id": "48227036",
          "internalId": "48227036",
          "taxRate": ".01",
          "taxAmount": ".25",
          "taxLineType": "item",
          "taxJurisdiction": "EAST POINT",
          "taxJurisdictionLevel": "CITY",
          "taxImpositionType": "Local Sales and Use Tax",
          "taxLineItemNumber": "1"
        }
      ],
      "fulfillmentData": [
        {
          "orderId": "48227036",
          "itemFulfillmentName": "IF-7104735",
          "carrier": "UPS® Ground",
          "shippingMethod": "UPS® Ground",
          "trackingNumbers": "1ZX477W80393209068",
          "shippedItems": "CV-2L:1"
        }
      ],
      "isCustomerArranged": false,
      "addresses": [
        {
          "id": "251519",
          "recordType": "customer",
          "name": "Exmple",
          "internalId": "17028285",
          "addressInternalId": "8199065",
          "address": "Shipping Address\nSum Boddy\n123 Main St\nLong Branch NJ 07740\nUnited States"
        },
        ...
        {
          "id": "251519",
          "recordType": "customer",
          "name": "Example",
          "internalId": "23672657",
          "addressInternalId": "27338277",
          "address": "Someone\nExample\n234 Main St/ 788\nWarrenton OR 97146\nUnited States"
        }
      ],
      "shippingAddressInternalId": "29571455",
      "netsuiteAddressLocationData": {
        "id": "42602",
        "recordType": "customrecord_etail_b2b_locations_map",
        "relatedCompany": "Example",
        "relatedLocation": "",
        "relatedAddress": "Test User",
        "shopifyCompanyID": "gid://shopify/Company/8859124006",
        "shopifyLocationID": "gid://shopify/CompanyLocation/13199769894",
        "shopifyCustomerID": "gid://shopify/Customer/23772512190758",
        "netsuiteCompanyId": "1717944",
        "netsuiteAddressId": "29571455"
      },
      "shopifyOrderData": {
        "id": "gid://shopify/Order/10961344594214",
        "name": "SO-7068050",
        "fulfillments": [],
        "fulfillmentOrders": {
          "edges": [
            {
              "node": {
                "id": "gid://shopify/FulfillmentOrder/11838683414822",
                "lineItems": {
                  "edges": [
                    {
                      "node": {
                        "id": "gid://shopify/FulfillmentOrderLineItem/33455889514790",
                        "sku": "CV-2L",
                        "totalQuantity": 1,
                        "remainingQuantity": 1,
                        "lineItem": {
                          "id": "gid://shopify/LineItem/33411933307174"
                        }
                      }
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    }
  },

I also removed the linebreaks from both the graphQL body and the variables but I still get the same error:

mutation fulfillmentCreate($fulfillment: FulfillmentInput!) { fulfillmentCreate(fulfillment: $fulfillment) { fulfillment { id name order { id name } } userErrors { field message } } }
{ "fulfillment": { "lineItemsByFulfillmentOrder": [ { "fulfillmentOrderId": "{{record.fulfillmentOrderId}}", "fulfillmentOrderLineItems": [ {{#each record.shippedItems}}{ "id": "{{this.fulfillmentOrderLineItemId}}", "quantity": {{this.quantity}} }{{#unless @last}},{{/unless}}{{/each}} ] } ], {{#if record.trackingNumbers}}{{#compare record.trackingNumbers.length ">" 0}} "trackingInfo": { "company": "{{record.company}}", "numbers": [ {{#each record.trackingNumbers}}"{{this}}"{{#unless @last}},{{/unless}} {{/each}} ] },{{/compare}}{{/if}} "notifyCustomer": false } }

  Message:
    Failed to generate request body from template: {"query":"mutation fulfillmentCreate($fulfillment: FulfillmentInput!) { fulfillmentCreate(fulfillment: $fulfillment) { fulfillment { id name order { id name } } userErrors { field message } } }","variables":"{ \"fulfillment\": { \"lineItemsByFulfillmentOrder\": [ { \"fulfillmentOrderId\": \"{{record.fulfillmentOrderId}}\", \"fulfillmentOrderLineItems\": [ {{#each record.shippedItems}}{ \"id\": \"{{this.fulfillmentOrderLineItemId}}\", \"quantity\"...

  Code: handlebars_template_parse_error

  Source: Resource

  Timestamp: 2026-07-27T14:17:06.060Z

  Error ID: 2662325205
  

Again, if I copy the output rendered in the Handlebars editor and plug it into Postman the request succeeds. Completely stumped.