Using pipelines, the listener is working and the JSON is coming in from the website (webhook). I’m able to map all the other fields, but it keeps skipping the ‘items name’ text field without any error messages.
The array looks like this (trying to get “Sample Item” back:
{
"create_time": "2015-09-25T23:14:14Z",
"event_type": "INVOICING.INVOICE.PAID",
"event_version": "1.0",
"id": "XXXXXXXX",
"resource": {
"billing_info": [
{
"business_name": "Test Company",
"email": "[email protected]",
"language": "en_US"
}
],
"id": "INV2-XXXX-XXXX-XXXX-XXXX",
"invoice_date": "2015-09-28 PDT",
"items": [
{
"name": "Sample Item",
"quantity": 1,
"unit_of_measure": "QUANTITY",
"unit_price": {
"currency": "USD",
"value": "1.00"
}
}
],
"total_amount": {
"currency": "USD",
"value": "1.00"
}
},
"resource_type": "invoices",
"summary": "An invoice was created"
}
My code in pipelines is {{a.body_params.resource.invoice.items[0].name}}
The code format will work fine for other arrays and other fields in the JSON, it’s only this object that won’t import and skip. My conclusion is it has to do with it being mixed with text and numbers?
Gibblove is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.