Messaging extensions

%3CLINGO-SUB%20id%3D%22lingo-sub-339580%22%20slang%3D%22en-US%22%3EMessaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339580%22%20slang%3D%22en-US%22%3E%3COL%3E%3CLI%3EIs%20it%20possible%20to%20develop%20a%20messaging%20extension%20layout%20that%20matches%20that%20of%20the%20native%20Stickers%20extensions%3F%20I'm%20keen%20to%20explore%20using%20the%20same%20left-side%20menu%20to%20conquer%20the%20current%20restriction%20of%20only%20a%26nbsp%3Bsingle%20messaging%20extension%20per%20Teams%20app.%3C%2FLI%3E%3CLI%3EAre%20there%20plans%20to%20allow%20more%20than%20one%20messaging%20extension%20per%20Teams%20app%3F%3C%2FLI%3E%3CLI%3EIn%20the%20Node.js%20code%20sample%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fmessaging-extensions%2Fsearch-extensions%23sdk-support%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E%2C%20the%20server%20is%20listening%20on%20the%20endpoint%20'api%3CEM%3E%2FcomposeExtension%3C%2FEM%3E'%2C%20can%20you%20elaborate%20why%20this%20is%3F%20I%20can't%20find%20any%20mention%20of%20it%2C%20let%20alone%20reasoning%20for%20it%20anywhere%3B%20and%20as%20far%20as%20I'm%20aware%2C%20a%20bot%20and%20messaging%20extension%20sit%20on%20the%20same%20endpoint%2C%20so%20I%20don't%20understand%20how%20this%20would%20work%20in%20conjunction%20with%20a%20bot%3F%3C%2FLI%3E%3CLI%3EThe%20only%20way%20I've%20been%20able%20to%20have%20my%20server%20provide%20Teams%20with%20a%20successful%20response%20is%20using%20the%26nbsp%3BBot%20Builder%20SDK%20Teams%20extension's%20'TeamsChatConnector'%20'listen()'%20hook%20on%20the%20'api%3CEM%3E%2Fmessages%3C%2FEM%3E'%20endpoint%3B%20can%20I%20instead%20eliminate%20the%20SDK%20Teams%20extension%2C%20use%20the%20'BotFrameworkAdapter'%20from%20the%20Bot%20Builder%20SDK%20v4%20and%20listen%20for%20the%20Activity%20type%20'invoke'%3F%20In%20the%20past%20when%20I've%20sent%20back%20the%20correct%20JSON%20through%20the%20'sendActivity()'%20method%2C%20it's%20caused%20a%20500%20Bad%20Response.%3C%2FLI%3E%3CLI%3EAs%20I've%20only%20been%20able%20to%20get%20a%20messaging%20extension%20working%20with%20the%20hook%20method%20as%20mentioned%20in%20my%20previous%20question%2C%20how%20can%20I%20provide%20bot%20message%20responses%20through%20the%20same%20endpoint%20to%20all%20channels%2C%20not%20just%20Teams%3F%3C%2FLI%3E%3CLI%3EAre%20there%20plans%20to%20improve%20the%20documentation%20on%20messaging%20extension%20development%3F%20There%20is%20a%20lack%20of%20code%20samples%20and%20clarity%20regarding%20the%20Bot%20Builder%20SDK%20and%20the%20Teams%20extension%20to%20it%20-%20how%20they%20can%20be%20utilised%20together%20and%20apart.%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-339580%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339650%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339650%22%20slang%3D%22en-US%22%3E%3CP%3EDefinitely!%20Please%20do%20submit%20it%20in%20our%20Uservoice%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%3C%2FA%3E%20.%20It'll%20help%20us%20get%20more%20feedback%20and%20prioritize%20the%20feature.%20We%20are%20looking%20at%20ways%20to%20allow%20more%20control%20within%20that%20search%20box.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339646%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339646%22%20slang%3D%22en-US%22%3E%3CP%3EWe're%20just%20now%20starting%20to%20roll%20out%20our%20SDK%20support%20for%20Bot%20Builder%20v4.%20You%20can%20find%20more%20information%20on%20our%20roadmap%20here%3A%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Foffice%2Fblogs%2Fpreview-release-of-net-teams-bot-builder-v4-sdk%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Foffice%2Fblogs%2Fpreview-release-of-net-teams-bot-builder-v4-sdk%2F%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20be%20clear%2C%20there%20isn't%20really%20an%20%22upgrade%22%20from%20Bot%20Builder%20v3%20to%20Bot%20Builder%20v4.%20You%20need%20to%20pretty%20much%20re-write%20the%20entire%20thing.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339638%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339638%22%20slang%3D%22en-US%22%3EBrilliant.%20Thanks%2C%20Andrew.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339637%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339637%22%20slang%3D%22en-US%22%3EThank%20you%20for%20touching%20on%20my%20first%20question%2C%20it's%20a%20shame%20it%20can't%20be%20exactly%20replicated%20-%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202488%22%20target%3D%22_blank%22%3E%40msft%3C%2FA%3E%20if%20this%20is%20something%20that%20could%20be%20made%20available%20to%20developers%20I%20think%20a%20lot%20of%20people%20would%20benefit!%20A%20big%20thank%20you%20for%20suggesting%20alternatives%2C%20the%20multiple%20search%20commands%20is%20something%20I%20haven't%20tried%2C%20and%20the%20'initiate%20action%20option'%20also%20seems%20like%20an%20interesting%20one%20to%20give%20a%20go%20-%20time%20to%20explore...%3CBR%20%2F%3E%3CBR%20%2F%3EWIth%20the%20documentation%2C%20I'd%20also%20suggest%20providing%20more%20clarity%20with%20the%20upgrade%20from%20SDK%203%20to%204%2C%20and%20how%20that%20impacts%20the%20Teams%20extension%20and%20the%20Teams%20capabilities.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339631%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339631%22%20slang%3D%22en-US%22%3EI%20clearly%20glossed%20over%20the%20onQuery%20bit%2C%20I'll%20take%20a%20closer%20look%20at%20that%20along%20with%20the%20multiple%20compose%20extension%20commands.%3CBR%20%2F%3E%3CBR%20%2F%3ENot%20seen%20that%20Yeoman%20before%20-%20thanks%20for%20sending!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339613%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339613%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20use%20App%20Studio%20to%20package%20your%20app%20it%20will%20guide%20you%20through%20adding%20multiple%20commands%20in%20the%20manifest.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339609%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339609%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%0A%3COL%3E%0A%3CLI%3EIs%20it%20possible%20to%20develop%20a%20messaging%20extension%20layout%20that%20matches%20that%20of%20the%20native%20Stickers%20extensions%3F%20I'm%20keen%20to%20explore%20using%20the%20same%20left-side%20menu%20to%20conquer%20the%20current%20restriction%20of%20only%20a%26nbsp%3Bsingle%20messaging%20extension%20per%20Teams%20app.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EYou%20can't%20create%20that%20exact%20layout%20that%20stickers%20have.%20But%20you%20can%20have%20multiple%20search%20commands%20within%20the%20same%20messaging%20extension.%20They%20show%20up%20as%20tabbed%20search%20options%20within%20the%20flyout.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20other%20option%20would%20be%20to%20use%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fmessaging-extensions%2Fcreate-extensions%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Einitiate%20action%20option%3C%2FA%3E%26nbsp%3Band%20display%20the%20layout%20you%20want%20within%20a%20task%20module%20which%20accepts%20HTML%20or%20an%20adaptive%20card%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EAre%20there%20plans%20to%20improve%20the%20documentation%20on%20messaging%20extension%20development%3F%20There%20is%20a%20lack%20of%20code%20samples%20and%20clarity%20regarding%20the%20Bot%20Builder%20SDK%20and%20the%20Teams%20extension%20to%20it%20-%20how%20they%20can%20be%20utilised%20together%20and%20apart.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EGreat%20feedback!%20Point%20noted%2C%20we%20do%20have%20some%20plans%20to%20update%20the%20documentation%20there%20and%20add%20more%20examples%20for%20different%20scenarios.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-339603%22%20slang%3D%22en-US%22%3ERe%3A%20Messaging%20extensions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-339603%22%20slang%3D%22en-US%22%3E%3CP%3EI%20can%20answer%20a%20couple%20of%20these%2C%20and%20also%20summoning%20the%20Teams%20product%20group%20for%20the%20rest..%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2)%20Yes%20that%20works%20now.%20Use%20schema%201.3%20and%20just%20add%20multiple%20commands%20to%20the%20composeExtension%3C%2FP%3E%0A%3CP%3E3%2F4%2F5)%20For%20a%20bot%20to%20listen%20to%20the%20commands%20(Bot%20Fx%203)%20then%20you%20use%20the%20onQuery%20method%20of%20the%20connector%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you're%20into%20node.js%20use%20the%20Teams%20Yeoman%20generator%20aka.ms%2Fyoteams%2C%20and%20this%20will%20all%20be%20handled%20for%20you%20-%20and%20you%20can%20take%20a%20look%20at%20the%20generated%20code%20for%20this%20scenario%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor
  1. Is it possible to develop a messaging extension layout that matches that of the native Stickers extensions? I'm keen to explore using the same left-side menu to conquer the current restriction of only a single messaging extension per Teams app.
  2. Are there plans to allow more than one messaging extension per Teams app?
  3. In the Node.js code sample here, the server is listening on the endpoint 'api/composeExtension', can you elaborate why this is? I can't find any mention of it, let alone reasoning for it anywhere; and as far as I'm aware, a bot and messaging extension sit on the same endpoint, so I don't understand how this would work in conjunction with a bot?
  4. The only way I've been able to have my server provide Teams with a successful response is using the Bot Builder SDK Teams extension's 'TeamsChatConnector' 'listen()' hook on the 'api/messages' endpoint; can I instead eliminate the SDK Teams extension, use the 'BotFrameworkAdapter' from the Bot Builder SDK v4 and listen for the Activity type 'invoke'? In the past when I've sent back the correct JSON through the 'sendActivity()' method, it's caused a 500 Bad Response.
  5. As I've only been able to get a messaging extension working with the hook method as mentioned in my previous question, how can I provide bot message responses through the same endpoint to all channels, not just Teams?
  6. Are there plans to improve the documentation on messaging extension development? There is a lack of code samples and clarity regarding the Bot Builder SDK and the Teams extension to it - how they can be utilised together and apart.
8 Replies

I can answer a couple of these, and also summoning the Teams product group for the rest..

 

2) Yes that works now. Use schema 1.3 and just add multiple commands to the composeExtension

3/4/5) For a bot to listen to the commands (Bot Fx 3) then you use the onQuery method of the connector 

 

If you're into node.js use the Teams Yeoman generator aka.ms/yoteams, and this will all be handled for you - and you can take a look at the generated code for this scenario

  1. Is it possible to develop a messaging extension layout that matches that of the native Stickers extensions? I'm keen to explore using the same left-side menu to conquer the current restriction of only a single messaging extension per Teams app.

You can't create that exact layout that stickers have. But you can have multiple search commands within the same messaging extension. They show up as tabbed search options within the flyout. 

The other option would be to use a initiate action option and display the layout you want within a task module which accepts HTML or an adaptive card

Are there plans to improve the documentation on messaging extension development? There is a lack of code samples and clarity regarding the Bot Builder SDK and the Teams extension to it - how they can be utilised together and apart.

 

Great feedback! Point noted, we do have some plans to update the documentation there and add more examples for different scenarios. 

 

If you use App Studio to package your app it will guide you through adding multiple commands in the manifest.

I clearly glossed over the onQuery bit, I'll take a closer look at that along with the multiple compose extension commands.

Not seen that Yeoman before - thanks for sending!
Thank you for touching on my first question, it's a shame it can't be exactly replicated - @msft if this is something that could be made available to developers I think a lot of people would benefit! A big thank you for suggesting alternatives, the multiple search commands is something I haven't tried, and the 'initiate action option' also seems like an interesting one to give a go - time to explore...

WIth the documentation, I'd also suggest providing more clarity with the upgrade from SDK 3 to 4, and how that impacts the Teams extension and the Teams capabilities.
Brilliant. Thanks, Andrew.

We're just now starting to roll out our SDK support for Bot Builder v4. You can find more information on our roadmap here: https://developer.microsoft.com/en-us/office/blogs/preview-release-of-net-teams-bot-builder-v4-sdk/

 

Do be clear, there isn't really an "upgrade" from Bot Builder v3 to Bot Builder v4. You need to pretty much re-write the entire thing.

Definitely! Please do submit it in our Uservoice https://microsoftteams.uservoice.com/forums/555103-public . It'll help us get more feedback and prioritize the feature. We are looking at ways to allow more control within that search box.