Hi all
@NigelG @jcindy81 @J805
@whoever can help me out here!
I am struggeling to get following scenario working:
I was setting up a webhook to shopify to inform my app when an order ist fulfilled. The wwebhook is tested, data is coming in.
The goal is quite simple:
- Each Order can contain one or more products.
- Each product has a unique_id, the products are stored in shopify and also in my bubble app, the link is made with this unique_id.
- Also each product has a fulfillment status, wich must be “fulfilled”.
- In 99% cases an order will not contain more than 1 - 10 products.
I was triying for hours now to “make changes to a list of things”, in my case the products.
This is how i try it: (See Screenshot below)
The API Workflow for the webhook looks like this (i am using the “Shopify Custom Apps”-Plugin by @ZeroqodeSupport)
The action looks like this: i am searching for products where the Bubble-Product has the shopify_id = Request Data’s line_items product_id … therefore the same ID as the Shopify-Product wich was sold. (See Screenshot below)
i need some little help, i am totally stuck. I tried many diffrent ways, forth and back. Allways running in the same problem:
When i place an test-order in Shopify with only one product then it works. But somehow there’s a problem with the :each item’s product_id
From what i understand this expressions returns a list of Products from all my products i have wich have the same ID as one of the products from the Requested Data’s products… Or am i wrong?
The Requested Test Data looks as following (i deleted many lines as there are many i am not using)… but the things that i am referencing is there, just for showing purpose.
ORDER FULFILLMENT
{
"id": 820982911946154500,
"fulfillment_status": "fulfilled",
"line_items": [
{
"fulfillment_service": "manual",
"fulfillment_status": fulfilled,
"product_id": 8200133751192,
}
{
"fulfillment_service": "manual",
"fulfillment_status": fulfilled,
"product_id": 7608528653982,
}
]
}
Thanks for any help!!