How to add custom properties to line items via Shopify draft order module?

The aim of this scenario is to create a draft order in Shopify using data captured via a form submission on a Shopify product page. The draft order will include the line item from the page the customer is browsing, along with custom properties related to that line item such as:

  • Material colour
  • Shape
  • Unit
  • Length A
  • Length B
  • Fixing type

Here’s what I’m doing in detail:

Using a webhook, we’re grabbing data from a form on a Shopify product page:

Then searching for the Shopify product based on product_handle captured via the webform to get the variant_id

Then parsing some of the output from the webhook:

Then finally creating a draft order in Shopify using customer_email and price obtained from the webhook along with variant_id from the Shopify search product module:

This all works and a draft order is created in Shopify, but what I’m trying to do is get the dpoData, i.e.: this stuff:

To appear as custom properties below the line item. Something like this:

I’m using the parser as mentioned above to sort this data so it’s readable by Shopify:

The problem is this:
I cannot figure out how to get this parsed data onto the Shopify order as custom properties of the line item.

Can anyone offer any advice here as I’m going around in circles at this point. Here’s an overview of the scenario: