Reporting a bug: Custom action - URL not open in a dynamic carousel with 2 or more cards
Hi, I want to report a bug. I created a dynamic carousel in Custom action step. Each card contains a button. The button should open a URL upon clicking. The problem is, that the URL is not opened upon clicking, if the carousel contains 2 or more cards. To prove this, I've also tried to create a carousel in Carousel step, copied the JSON response from my browser and pasted it into the Custom action step in order to replicate the same carousel. Again, the URL got opened upon clicking the button, only if the carousel had 1 card, but not if it had 2 or more cards. Additional remark: You should make it obvious in the Documentation, that carousel works in Custom action step only if you type the Custom action name as "carousel." It won't work if you name it "Carousel" or any other way. Difficult to send print screens, but I can send the .vf file if needed. Just let me know where to send it.
2 Replies
Hey there đ
What youâre running into is a current limitation of the Web Chat renderer rather than something wrong with your JSON.
⢠Buttons inside a true Carousel (i.e. a trace of type
"carousel"
that contains 2 + cards) can only send a request back to the conversation path today â they donât yet support the open_url
action.
⢠When your payload only has one card, the renderer silently downgrades the response to a single Card component. Card buttons do support the open_url
action â thatâs why the link opens in the 1-card case but not when you add more cards.
Work-arounds
------------
1. If you need buttons that open external links, send each card separately with the Card step (or emit multiple cardV2
traces from a Custom Action) instead of grouping them in a Carousel.
2. Keep the Carousel, but make each button a normal request
button (e.g. { "request": { "type": "card-1-button" } }
). Capture the click in your wrapper with the last_event
variable or your front-end code and call window.open(url)
yourself.
Other notes
-----------
⢠Youâre absolutely right about the name field â trace types are case-sensitive. To have a Custom Action render as a carousel, the Custom Action name must be exactly carousel
(all lower-case).
Docs for reference:
⢠Carousel & Card step behaviour â https://docs.voiceflow.com/creating/steps/card-and-carousel
⢠Custom Action step & trace types â https://docs.voiceflow.com/creating/steps/custom-action
Hope that clarifies why the link only opens with one card and helps you move forward! If anythingâs unclear just let me know.How come then, that Carousel step with 2+ cards opens all the URLs via buttons? It was working before, as shown in one of your Tutorial videos: https://www.youtube.com/watch?v=X439vDIQKfI So again, I think this is a bug and not a limitation of the Web Chat renderer.