{
“storeId”: “test-hubspot-store”,
“objectType”: “LINE_ITEM”,
“messages”: [
{
“action”: “UPSERT”,
“externalObjectId”: “Lineitem_xx12345_0012345”,
“properties”: {
“product_quantity”: 2
},
“associations”: {
“PRODUCT”: [
“145747165”
]
}
}
]
}
I was trying to sync product quantity to the product that is also created using ecommerce sync message api but i’m not able to sync external properties using line items or association of product .
AnotherQuery :
Line item object id can be anything ?
Hey @testuser27,
Just to clarify, are you looking to associate a product with a line item while creating a line item via the ecommerce sync message endpoint? However, you’re not seeing the association? In this case, are you seeing the line item?
If not, could you share with me the portal ID in question? Are you using the hapikey or oauth authentication?
Hey @WendyGoh
I was trying to associate line items with a product. Actually i want to sync product quantity in Hubspot product but as per doc quantity can be sync using line item only so that’s why i’m syncing line item with product.
Are you using the hapikey or oauth authentication?
I’m using hapikey.
Portal id : 7943290
Thanks
Hey @testuser27,
Thanks for providing the following.
Taking a look at the sync message using this endpoint: Get all sync errors for a specific account > I’m able to see the following:
{
portalId:7943290,
storeId:"test-hubspot-store",
objectType:"LINE_ITEM",
externalObjectId:"Lineitem_xx12345_0012345",
changedAt:1599198216453 (September 4, 2020, Fri, 1:43:36pm UTC+08:00),
erroredAt:1599198216570 (September 4, 2020, Fri, 1:43:36pm UTC+08:00),
type:"MISSING_REQUIRED_PROPERTY",
details:"Message missing required fields [hs_assoc__deal_id]",
status:"OPEN"},
This error indicate that when sending the sync message, you didn’t include the `hs_assoc__deal_id` field. For example:
{
"storeId": "test-hubspot-store",
"objectType": "LINE_ITEM",
"messages": [
{
"action": "UPSERT",
"externalObjectId": "Lineitem_xx12345_0012345",
"properties": {
"product_quantity": 2,
"hs_assoc__deal_id": "0000"
},
"associations": {
"PRODUCT": [
"145747165"
]
}
}
]
}
Let me know if this works!
Thank you for support @WendyGoh
It works now.
Hi, I am struggling with a similar issue.
What is the value of the hs_assoc__deal_id property and PRODUCT association in the example?
Are they the externalObjectId we assign or is it the hubspot generated id?