Custom output response


#1

Hi,

Is there a way to return custom output as a response, for example, a JSON? In my case, I need to render the Map component in the Jovo Web platform chatbot (using https://github.com/jovotech/jovo-starter-web-chatwidget-react)..

I tried to return a custom JSON but seems like it is ignored when generating the response.

this.$send({
  type: 'map',
  location: 'Hyderabad'
});

Below is the Jovo Debugger RIDR log:

Thanks


#2

You can find an example here: https://github.com/jovotech/jovo-starter-web-chatwidget-react/blob/68dc0982df2f09d837825056e358b913351ef851/app/src/components/OpenDocumentationComponent.ts#L11

return this.$send({
      message: 'Great! Opening now...',
      listen: false,
      platforms: {
        web: {
          // custom property used for this example
          redirectTo: 'https://v4.jovo.tech/docs',
        },
      },
    });

#3

Excellent. However the properties I added in ‘web’ are not seen in Jovo Debugger as expected. To see those in Jovo Debugger, I’m sending those using ‘core’ platform key. Thanks for the suggestion.