• Resolved Politechnica

    (@robinradut)


    Hello,

    I’m trying to attach a custom field (serialnumber) from a line item inside a woocommerce order to a line item inside a hubspot deal.

    I found some other post, that showed how to add a custom field to a deal and i tried to find a similar solution for line items inside a deal. This is what i got so far:

    add_filter(“hubwoo_line_item_properties”, “customLineItemProperties”, 99, 3);
    
    
    function customLineItemProperties($item_properties, $productId, $orderId){
    
    $item_properties[‘serialnumber’] = “serial number goes here…”;
    
    return $item_properties;
    
    }

    I found the filter “hubwoo_line_item_properties” inside the Plugin code. Just wanted to check if my code makes sense?

    Question is also, where i could create the custom field on Hubspot side. Since there is no line item object, should i go for the product object? That way all product would have a “serialnumber” field, which will then be populated when a deal with that line item gets created…

    Regards,

    Robin

Viewing 1 replies (of 1 total)
  • Plugin Author MakeWebBetter

    (@makewebbetter)

    Hello,

    I hope you are doing well!?

    We have checked that the code that you have used is correct for syncing the line items. The property for the line items needs to be created under the product object.

    If you have any further queries, feel free to connect with us.

    Thank you?

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Field sync Line Item’ is closed to new replies.