What is your goal?
i am setup a module to receive a date from webhook and then search for appointment slots on that date if the slot is found the available slots are aggregated and then sent back through webhook response , and if the slots are not available for that date it will look slots on later date and then the generated bundles will be aggregated and the sent through webhook response
What is the problem & what have you tried?
the route where the slot is found is working properly , but the one where slot is not available is returning as output even after finding , aggregating and then sending the bundles to webhook response . at the start the problem was different the bundle was reaching aggregator but the column names were not appearing against the fields only the column numbers were against them then also the output was same just the bundles were not reaching webhook response . to counter that i replaced search rows advanced with normal search rows and aggregator to array with array aggregator the webhook starting getting the data as string but the output didnot change
Screenshots (scenario flow, module settings, errors)
if any one knows whats wrong please hep
While multiple modules can run, only one Webhook response module that runs gets sent back to the caller. Check which one actually fires. Open the run in the execution history and see how many operations ran in modules 5 and 23.
If 5 ran too, it means your “available” filter on the first route is probably letting an empty bundle through. This can sometimes happen if the search is set to continue when it finds no results. You should try to tighten that filter for example requiring the row count to be greater than 0, so only the right route fires.
If it was only 23 that ran, check that its body maps the Aggregate to JSON output and that the Content-Type header is application/json.
Hello,
Start with basics and learn more about the HTTP protocol - there could be only one response to one request.
But that’s probably not solving your issue. If you got an empty array ([]) that means there is a mapping problem or your scenario generated an empty array due to lack of data.
What I suggest:
- Change Array Aggregator to aggregate to JSON, as you did with route no. 2. Webhook response probably should return JSON, so that’s the easiest method to debug.
- Share with us how your Webhook response module is configured. Right now we don’t have any strong point to suggest further solutions.
what you told was right in the case when no slots are available both the routes were executing i made some changes in the filters but its still the same
i have attached the photos in reply can you tell me the solution now
On the fallback branch (no slots that day, search later dates), an empty [] usually means Webhook Response is mapping an empty array, or it is responding before that branch finishes aggregating. Confirm the Array Aggregator on that route is the exact source mapped into the response body, and that only one Webhook Response can run for the request. A quick check is to temporarily respond with a hard-coded JSON object on that branch. If that returns fine, the aggregator mapping on the fallback path is the problem.
Try making the two filters mutually exclusive, so only one route can pass.
Open the run and click the bubble on module 2 to see what the empty bundle actually contains. Then pick a field that is blank on the no-slots run but filled when a real row is found. This could be a row number or a date column. Then use it in both filters so the filter looks as follows:
Route 1: that field “Exists”
Route 2: that field “Does not exist”
Also check the filter logic uses AND/OR in the way that you intend as commonly they get mixed up and both routes end up passing. If this still happens, share a screenshot of both those filters and the module two output from the run.