Skip to content
Handling Multiple B...
 
Notifications
Clear all

Handling Multiple Booking Requests Using the Iterator

3 Posts
2 Users
0 Reactions
6 Views
Dan_Vrancic
(@dan_vrancic)
Posts: 2
New Member
Topic starter
 

I am attempting to utilize the iterator to send multiple booking HTTP requests to callin.io's Booking API. I have configured a test playground scenario. In this setup, the initial JSON module mirrors the webhook output received from VAPI. I've employed a JSON module to conserve callin.io operations.

The booking API for callin.io functions as an HTTP POST request. The final module is currently JSON, but in the production version, I intend to use a request module for this action. If you examine the final JSON module, you'll notice my goal is for the iterator to dispatch distinct names and their corresponding times for each individual request. At present, it's consolidating all names and times into a single request.

I was hoping the iterator would process the two arrays – names and decidedTimes – allowing me to map them into the JSON for the HTTP Booking API Request. My expectation was to have 4 bundles:

Bundle 1:
Person 1 at 10
Person 2 at 10:15
Person 3 at 10:30
Person 4 at 10:45

With each of these submitted as a separate booking request.

Instead, I am receiving one request:
Name: Person 1, Person 2, Person 3, Person 4
Time: 10, 10:15, 10:30, 10:45

I suspect I need to implement a function within the iterator to correctly handle both arrays, but I'm currently unsure how to proceed. I'm seeking assistance from the community.

My desired workflow is as follows:
A webhook receives the necessary JSON properties for booking. Each name and requested time is then sent individually via an HTTP booking request to callin.io. After all names and times have been processed by the iterator, the information will be relayed to the VAPI webhook module.

I would appreciate guidance on how to achieve this.

 
Posted : 26/07/2024 10:07 pm
L_Duperval
(@l_duperval)
Posts: 39
Eminent Member
 

Hi and welcome!

You forgot to provide the most important information: the input bundles.

It’s possible that somewhere in your flow something happens to the input which makes it give the output you see.

At a minimum, we need the input of the iterator, but it would be best to show the input/output of each module.

L

Please provide the rewritten markdown content *it should be in the markdown format.

 
Posted : 26/07/2024 11:11 pm
Dan_Vrancic
(@dan_vrancic)
Posts: 2
New Member
Topic starter
 

Apologies for that! Here is all the information I can provide, along with the JSON. Thanks for the prompt response, by the way!

Playground.json (36.3 KB)

 
Posted : 27/07/2024 12:54 am
Share: