https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hello, We are implementing a survey flow inside a ...
# ask-retell-partners
b
Hello, We are implementing a survey flow inside a voicebot, and we need some guidance regarding the best way to handle a dynamic number of questions. Here is the scenario: We have an endpoint to retrieve all survey questions (each question includes its id and text). Then, for each customer answer, we need to call another endpoint to register the response, which requires the specific questionId, the apiKey, and the customer’s response. The challenge is that the number of questions is not fixed (it can be 7, 9, or more). We want the voicebot to: Fetch all questions at the start. Ask them one by one, waiting for the customer’s response. After each answer, immediately call the register endpoint with the proper id. Continue until all questions are answered. Close the survey politely. Could you confirm if this iterative logic can be implemented directly in RetellAI? Or do you recommend another approach (e.g., preloading all questions vs. handling them dynamically)?