Hi,
First off let me say this software is amazing. Exactly what I was looking for. As the title states I am trying to create a deal and contact in hubspot from woocommerce. So far I have everything working but the line items. I can not figure out the correct code to get hubspot to add the line items in deals. When we were on magento we have a plugin that connected to hubspot and done this. My current setup is woocommcer->webhooks=>woocommerce’n8n’->triggers=>hubspot->createdeals.
thanks
Welcome to the community @trainingday, glad that you like the project.
So far I have everything working but the line items. I can not figure out the correct code to get hubspot to add the line items in deals
Can you please elaborate?
-
Is it that you do not find the line item fields in the Hubspot node?
-
Is it that you do not know how to get the line items from Woocomerce and then save it to Hubspot?
-
How does a line item look like? Can you share an example?
-
In which field of the deal do you want to save the line item?
Hi @RicardoE105 ,
I appreciate your reply. I can not figure out how to get the line items from woocommerce to hubspot. To further clarify.. Line items are what was sold in the order. I have included a screenshot of what that looks like when we had magento. Also here is what he line item json looks like:
[ { “id”: 4096, “name”: “Jamaican Spicer”, “product_id”: 14701, “variation_id”: 0, “quantity”: 1, “tax_class”: “taxable-goods”, “subtotal”: “4.97”, “subtotal_tax”: “0.00”, “total”: “4.97”, “total_tax”: “0.00”, “taxes”: , “meta_data”: [ { “id”: 51899, “key”: “Sold By”, “value”: “Liberton Industries”, “display_key”: “Sold By”, “display_value”: “Test Vendors" }, { “id”: 51900, “key”: “_vendor_id”, “value”: “95”, “display_key”: “_vendor_id”, “display_value”: “95” }, { “id”: 51901, “key”: “_inventory_source”, “value”: “Merchant Inventory”, “display_key”: “_inventory_source”, “display_value”: “Merchant Inventory” }, { “id”: 51924, “key”: “_reduced_stock”, “value”: “1”, “display_key”: “_reduced_stock”, “display_value”: “1” } ], “sku”: “test-ski”, “price”: 4.97, “parent_name”: null } ]
That JSON you shared above I guess is what the Woocomerce trigger returns when an order is created right? Ok, I did some digging and It seems like to do such thing, you need the resources: line item and the deal line item. Sadly, those resources are not currently available in the node.
You have two options:
- Make a feature request here in the community.
- Use the HTTP node to consume those APIs.
The flow should look something like this:
Trigger start the workflow every time on order.created - Woocomerce Trigger
Using the information from the order you create a line time in Hubspot - HTTP node
You create a deal in Hubspot - Hubspot node or HTTP node
You associate the deal with the line item - HTTP node