UsingBot Framework with IBM Watson - Response Types

Hi guys,

I’m more or less new to programming and thought about creating a chatbot. I want to use IBM Watson for the conversation and Bot Framework for a Webchat or Skype channel (e.g. like Vincent Perrins bot).

Passing only text is working well, but I would also like to use buttons etc. And this is where I’m stuck: I want to use IBM Watson’s response type “Option” to make Bot Framework create buttons out of it.

I’m fetching Watsons response with output type “generic” in my watsonAssistantConversationHandler.ts script (using response.output.text is working well) and try to define the webchat output type with a switch case in my index.ts. However, I don’t even get this far as I do not know how to “address” the response type properly in the switch case. 

public async getConversationResponse(message: string, context: any):
...
                } else {
                    resolve({
                        responses: response.output.generic,
                        context: response.context
                    });

const { responses, context } = await watsonAssistantConversationHandler.getConversationResponse(session.message.text, session.privateConversationData);

        switch( **responses.output.generic** ){
            case "text":
            logger.debug(`You made it into output type text`);
            response => session.send(response)
        }

Above attempt of mine is obviously wrong. I’m new to it, reusing a lot of code and try to understand what’s happening there, so maybe here is someone who already had the same idea and can provide me an example on how to make this work?

Any hint or example would be welcome, thanks in advance!