VoiceflowVVoiceflow
Powered by
faint-whiteF
Voiceflow•2y ago•
14 replies
faint-white

API variable always = 0

hey guys, i get this API Response :

{
"count": 3,
"rooms": [
{
"id": 1,
"name": "Deluxe Room",
"status": "available",
"price": 120,
"description": "A spacious room with a king-sized bed, en-suite bathroom, and a beautiful city view.",
"amenities": [
"WiFi",
"Air conditioning",
"Flat-screen TV",
"Room service",
"Mini-bar"
],
"occupancy": {
"maxAdults": 2,
"maxChildren": 1
},
"size": "30m²",
"bedType": "King",
"images": [
"http://localhost:3000/images/room1.jpg"
],
"cancellationPolicy": "Free cancellation within 48 hours of booking. After that, cancel up to 24 hours before check-in for a full refund."
},
{
"id": 2,
"name": "Standard Room",
"status": "available",
"price": 80,
"description": "Comfortable room with a queen-sized bed, private bathroom, and modern amenities.",
"amenities": [
"WiFi",
"Air conditioning",
"Flat-screen TV"
],
"occupancy": {
"maxAdults": 2
},
"size": "20m²",
"bedType": "Queen",
"images": [
"http://localhost:3000/images/room2.jpg"
],
"cancellationPolicy": "Non-refundable."
},
{
"id": 3,
"name": "Suite",
"status": "available",
"price": 200,
"description": "An elegant suite with separate living area, king-sized bed, and panoramic views.",
"amenities": [
"WiFi",
"Air conditioning",
"Flat-screen TV",
"Room service",
"Mini-bar",
"Jacuzzi"
],
"occupancy": {
"maxAdults": 2,
"maxChildren": 2
},
"size": "50m²",
"bedType": "King",
"images": [
"http://localhost:3000/images/room3.jpg"
],
"cancellationPolicy": "Free cancellation up to 7 days before check-in. After that, cancel up to 48 hours before check-in for a 50% refund."
}
],
im trying to get the "count" variable in a local "total_rooms" variable (response.count) It always displays '0' when display {total_rooms} into a textbox, i dont know why.

Thanks for your time and help !
Voiceflow banner
VoiceflowJoin
Voiceflow is your community to get help, stay up to date on product releases, and connect with builders, experts, and the Voiceflow team⚡
13,087Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements
Recent Announcements
jacklyn

# Let your agents search the web 🔎 Hey everyone! We just released the web search tool for the agent step! Your agents can now automatically search the web for information, letting your agent supplement the LLM's knowledge and the data in its knowledge base with live, up-to-date information. Plus.... * You can restrict searches to specific domains, so your agent only searches sites that you own * This is a tool, so you remain in control of when the agent searches the web * Results are automatically summarized in a way that your agent can automatically understand Under the hood, we're using OpenAI's web search API. Give it a try, and let us know what you think! https://docs.voiceflow.com/changelog/native-web-search-tool

jacklyn · 3mo ago

jacklyn

jacklynbiggin's Thread

jacklyn · 3mo ago

hurt-tomato

connor_maclean's Thread

hurt-tomato · 3mo ago

Similar Threads

API Step sent always 0
uncertain-scarletUuncertain-scarlet / ❓┃help
2y ago
ERROR: Voiceflow variable update API stopped working
Pavel Čermák 🦾PPavel Čermák 🦾 / ❓┃help
4mo ago
API get call. Whole response in a variable?
worthy-azureWworthy-azure / ❓┃help
2y ago
Variable Issue
NeelNNeel / ❓┃help
3mo ago