Facebook Messenger Dropdown

Hi.
I implement a street Dropdown width data from Api good in Emulator. But in Messenger Facebbok not Show the dropdown?
Some where implement Dropdown in Facebook Messenger?

Tanks.
Jose.

Hi @joseo,

Unfortunatly, this is normal. I assume you have created your “street” dropdown using custom content types?

If this is the case, you’ll need a different JSON payload for the webchat (the emulator) and for facebook messenger.

For an example, checkout our dropdown implentation here. Look for renderElement function which calls a different renderer for each channel.

Hope this information helps,

François

How can I have different JSON payloads to consume in an NodeJS app? I made a question that need this clarification.

Could you help me on this? @frank_levasseur ???

Hi @LuizCesarLeite,

I’m not sure I really understand your question, but just look at the example:

function renderElement(data, channel) {
  if (channel === 'web' || channel === 'api') {
    return render(data)
  } else if (channel === 'slack') {
    return renderSlack(data)
  } else if (channel === 'smooch') {
    return [data]
  } else if (channel === 'teams') {
    return [{ ...data, type: 'dropdown_choice' }]
  }

  return []
}

renderSlack and render both return different JSON payloads.

If this doesn’t answer your question, can you try to ask it differently?

François

I want to use the values that I setted in Delay action outside Botpress, let’s say, a NodeJS app.

I can retrieve the JSON with the Dropdown info in my app, but how can I have the action’s values that is showed in the raw JSON at emulator?

Thanks in advance, @frank_levasseur !

@LuizCesarLeite,

This question is unrelated to this post. Please post it directly at the forum’s root.

François

I done it @frank_levasseur