mjv001
Member
Is it possible to use Iterator and construct a nested json?
I want to retrieve the list of abandoned carts from Shopify but the response payload doesn't include the product Images for each line Items.
So I plan to use Iterator to loop through each line items per customer and retrieve the product image/details then reconstruct the JSON payload
Highlevel workflow is like this
I want to retrieve the list of abandoned carts from Shopify but the response payload doesn't include the product Images for each line Items.
So I plan to use Iterator to loop through each line items per customer and retrieve the product image/details then reconstruct the JSON payload
Highlevel workflow is like this
- Shopify-Abandoned Carts
- Iterator per Customer
- Iterator per Customer - Line Item
- Shopify-Get Product Images
- Construct a JSON
- POST to my API
{
"Customer": [
{
"id": "UID001",
"email": "[email protected]",
"line_items": [
{
"product_id": "PID001",
"quantity": 1,
"title": "Prouct 1",
"line_price": "100.00",
"image_src": "https://xxx"
},
{
"product_id": "PID002",
"quantity": 1,
"title": "Prouct 2",
"line_price": "200.00",
"image_src": "https://xxx"
}
]
},
{
"id": "UID002",
"email": "[email protected]",
"line_items": [
{
"product_id": "PID001",
"quantity": 2,
"title": "Prouct 1",
"line_price": "100.00",
"image_src": "https://xxx"
},
{
"product_id": "PID002",
"quantity": 2,
"title": "Prouct 2",
"line_price": "200.00",
"image_src": "https://xxx"
}
]
}
]
}