I am very confused.
I have a create order service with the following mappings and success event:
The create_order service successfully adds a record to the Orders collection:
The next thing I do is to loop through the order items so that I can add the individual order items to my LineItems collection. The first thing I have to do is get the product id from the ProductItems collection. This is done by the following code snippet:
pre
//get product item id from item
get_product_id.execute( {
data: {"where": '{"Item":"'+item+'"}'},
success: successFunction(data)
});
/pre
When I check the successFunction data response it seems to have the response for the create_order service, rather than the get_product_id service? it returns an object containing the order id rather than an object containing the item id
I can't work out why the response data is from the wrong collection