Dropdown option

Hi,
Can we add dropdown into BOT ,for selecting a particular value.
Scenario:
We are having API for IFSC Code details by using bank and branch name. In API response ,we are getting many branches for particular bank, around 60 and above. How can we display on chatbot to select a particular branch. (Except carousal card options).
Is there any dropdown option can we create into web and mobile app? Please suggest on this.

1 Like

Hi @Aishwarya.Gandhi
The app code goes like this:

app.sendCards({
        title: 'Title',
        dropDown: [
            {
                name: 'Pizza Size',
                defaultValue: 'medium',
                options: [
                    {
                        key: 'large',
                        value: 'large'
                    },
                    {
                        key: 'medium',
                        value: 'medium'
                    }
                ]
            },
            {
                name: 'Crusts',
                defaultValue: 'pan-pizza',
                options: [
                    {
                        key: 'Classic Handtossed',
                        value: 'handtossed'
                    },
                    {
                        key: 'PAN Pizza',
                        value: 'pan-pizza'
                    }
                ]
            }
        ],
        // input: [
        //     {
        //         type: "number",
        //         text: "Quantity",
        //         min: 1,
        //         max: 20
        //     }, {
        //         type: "number",
        //         text: "Quantityds",
        //         min: 1,
        //         max: 20
        //     }
        // ],
        actions: [
            {
                title: "Confirm",
                text: "@@pizza_item",
                sendEvent: "get-selected-item"
            }
        ]
    })

You will pass in cards the object, and you will get the payload in the event and drive that data from wherever you want.

Hey @Aishwarya.Gandhi

We have different types of nodes as can be viewed in this doc specifically.
I believe the List node might be what you’re looking for and would work on web.

The code shared by @Subhrajit_Gupta is for the app platform.

2 Likes

Yep I think it’s better to go this way as app properties might not work in cloud.

Hi @gautham @Subhrajit_Gupta
We want to develop list node for web and mobile app, In mobile app will it work same like web app?
Please suggest on this.

Hey @Aishwarya.Gandhi

Yes, List would be supported on Mobile

1 Like