Hello,
I have a lookup step that uses a HubSpot connection configured with the One to Many setting to access product ids in a line item array and then use those values in a HubSpot search filter to pull the product data. However, the value I'm trying to access is always returned empty and the step fails.
Here is the mock data that I'm working with:
{
"page_of_records": [
{
"record": {
"Line": [
{
"Sku": "Sku1",
"Rate": "14.99",
"Quantity": 1,
"Amount": "14.99",
"Description": "Sku 1"
},
{
"Sku": "Sku2",
"Rate": "24.99",
"Quantity": 1,
"Amount": "24.99",
"Description": "Sku 2"
}
],
"Subtotal": "38.98",
"PO": 1259,
"Order Id": 4678010896538
}
}
]
}
Here is the configuration I have for the lookup step. I have One to Many selected, and I've entered "Line" as the Path to Many.
Next, I've configured the filter groups in the body parameters as such:
However, when I run this I get the following error:
and if I look in the debug logs I see an empty value for {{Sku}}:
To troubleshoot I moved the Sku field to the root of "record" and left everything else as it was:
{
"page_of_records": [
{
"record": {
"Line": [
{
"Sku": "Sku1",
"Rate": "14.99",
"Quantity": 1,
"Amount": "14.99",
"Description": "Sku 1"
},
{
"Sku": "Sku2",
"Rate": "24.99",
"Quantity": 1,
"Amount": "24.99",
"Description": "Sku 2"
}
],
"Subtotal": "38.98",
"PO": 1259,
"Order Id": 4678010896538,
"Sku": "Sku1"
}
}
]
}
Running this succeeds and I get back a valid response for the lookup. What this tells me is that either the One to Many/Path to Many is not correct or appropriate here or the handlebar statement I have in my search filter is not correct. Either way it doesn't appear that Line is being iterated over, instead it's looking at the root of "record". I've tried to set One to Many to No and rewrite the handlebars as {{Line[*].Sku}} but that fails as well with a parse error, "Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'.","
Does anyone have any insight here? This has been driving me crazy all day.
Thanks!