Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering channel specific payloads #3666

Closed
vidyakdil opened this issue Mar 25, 2020 · 7 comments
Closed

Rendering channel specific payloads #3666

vidyakdil opened this issue Mar 25, 2020 · 7 comments
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. P1 Painful if we don't fix, won't block releasing R9 Release 9 - May 15th, 2020
Milestone

Comments

@vidyakdil
Copy link

The button types for which we’ve support in LG is openUrl and imBack and postBack. In Facebook, we’ve another button type called web_view configurable in buttons of generic templates which will open a webview inside the chat screen.

Queries:
a) How can we render Generic templates with button type as web view for Facebook bots using Composer?
b) How can channel specific button types be rendered using bots created using Composer?

@vishwacsena vishwacsena transferred this issue from microsoft/BotFramework-Composer Apr 2, 2020
@vishwacsena vishwacsena added LG R9 Release 9 - May 15th, 2020 labels Apr 2, 2020
@vishwacsena
Copy link
Contributor

@boydc2014 do we have existing card action validations? If so, we should consider lifting it to match the underlying type.

@vishwacsena
Copy link
Contributor

related #3667

@mrivera-ms mrivera-ms added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Issue is created by anyone that is not a collaborator in the repository. labels Apr 2, 2020
@zidaneymar
Copy link
Contributor

currently LG only handles the following buttons types:

public static class ActionTypes
{
public const string OpenUrl = "openUrl";
public const string ImBack = "imBack";
public const string PostBack = "postBack";
public const string PlayAudio = "playAudio";
public const string PlayVideo = "playVideo";
public const string ShowImage = "showImage";
public const string DownloadFile = "downloadFile";
public const string Signin = "signin";
public const string Call = "call";
[Obsolete("Bot Framework no longer supports payments.")]
public const string Payment = "payment";
public const string MessageBack = "messageBack";
public const string openApp = "openApp";
}

botbuilder will only accept these types and transform activities to facebook channel, so maybe this is a channel related issue.
For LG buttons, you can refer:

# card
[HeroCard 
        title=Cheese gromit!
        subtitle=title
        text=This is some text describing the card, it's cool because it's cool
        buttons=${button()}
]
# button
[CardAction
    Title = More information
    Value = https://www.microsoft.com
    type = openUrl
]

@vishwacsena vishwacsena added the P1 Painful if we don't fix, won't block releasing label Apr 8, 2020
@cleemullins cleemullins added the customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. label Apr 8, 2020
@cleemullins
Copy link
Contributor

@vishwacsena, I'm not sure what we're doing with this issue given @zidaneymar's response. Should we close this, or is there a work item for us?

@vishwacsena
Copy link
Contributor

@cleemullins I know LG is un-opinionated. If the customer ask is possible via a non adaptive bot, then it should be made possible via adaptive/ LG as well. I sent you a mail on this as well. Can we get someone familiar on the team with FB messenger to work with the STCA team on this? I'd like to see the customer scenario unblocked.

@boydc2014
Copy link
Contributor

boydc2014 commented Apr 9, 2020

@vishwacsena

LG support render all BF defined common card types (hero, thumbnail) and BF defined action types like the list above, those will be translated to channel specific button type.

For example

[CardAction
    Title = More information
    Value = https://www.microsoft.com
    type = openUrl
]

will be render to facebook's format as

{
   "type": "web_url"
   "url":  "http://..."
   "title":  "More ..."
}

Which we tested and verified it works. So for Rendering common card in FB channel, i think it works good.

But there is two more issues

  1. How much we support render+run channel specific type of data like "facebook tempaltes", we do have a designed mechanism called "ChannelData", but we will need to verify that on Adaptive+LG.
    it looks promising to me, this will be supported.

  2. Even we successfully rendered the card, it's not working as expected. Because the runtime doesn't fit in. And for most cases, it's because of Composer's way to use runtime or serialize data, it's highly likely that problem, for example, a known issue is facebook, not sending locale field, and maybe other like settings errors. That's something I will work with Lu and ChrisW to unblock that soon.

For this issue, i think we can merge this into https://github.com/microsoft/botbuilder-dotnet/issues/3667, as a single place for following up on facebook templates

@boydc2014
Copy link
Contributor

@vidyakdil see the above for facebook's web_url action, and I'm closing this in favor of #3667 as once place to follow up "facebook tempaltes" support? feel free to reopen if you think this is for another intention.

@munozemilio munozemilio added this to the R9 milestone Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. P1 Painful if we don't fix, won't block releasing R9 Release 9 - May 15th, 2020
Projects
None yet
Development

No branches or pull requests

7 participants