DEV Community

loading...

Integrate your No-Code Power Virtual Agents with Low-Code Bot Framework Composer

arafattehsin profile image Arafat Tehsin Originally published at arafattehsin.com ・4 min read

Microsoft Build 2020 has been quite interesting; not because it was virtual but because I got a chance to represent the Australian Developer Community for Azure & we witnessed a new way of integration between Bot Framework Composer and Power Virtual Agents using Composer Topics.

If you know me or you've been a frequent reader of my blog then you will know what Conversational AI mean to me. I've covered several topics on Bot Framework SDK, Bot Framework Composer, Power Virtual Agents and their integration with each other.

As a Conversational AI enthusiast, I was following that new integration very closely. Later during Ignite 2020, this was changed to have even deeper integration with Bot Framework Composer rather than just getting exposed as a Skill (I'll discuss why it's better in a bit). More exciting!

Finally, the day has arrived when Microsoft Power Virtual Agents can be integrated seamlessly with the powerful Bot Framework Composer. You can simply download the latest Bot Framework Composer from here.

I will not go in to the basics as this post is mainly targeted for the integration. Therefore, if you're looking for some basic tutorials on getting started with either Power Virtual Agents or Bot Framework Composer, you can always check out this and this!

Where should we begin?

As I knew (from Ignite 2020), this was coming so I started playing with stuff when it was in a Preview. The fantastic Bot Framework Composer team has always been responsive, super supportive and patient with me. Eventually, when I got this working, I thought to write a step by step guide for you to get yourself started!

First of all, for some clarity, I'd like to tell you that this capability of integration works both ways (i.e. Power Virtual Agents ↔ Bot Framework Composer). However, as Bot Framework Composer's default schema is not compatible with Power Virtual Agents therefore, it's always safe to start your activity of extending it from Power Virtual Agents.

Import PVA Assets to Bot Framework Composer

As I mentioned earlier, you must have Bot Framework Composer installed on your machine. Once you have that, clicking on Open Bot Framework (Preview) option will take you to the Composer. You just have to define your Bot's name in Composer and rest of the work will be handled by the process itself.

Import PVA with Bot Framework Composer

Create a Trigger & Dialog

Then, all you have to do is to define a trigger; a trigger is an action that gets executed when it meets a certain criteria. In this example, we're using Intent Recognized trigger. This means that whenever this specific intent is recognized from the utterance provided by the user, this will be triggered.

So what does it take to define an Intent Recognized trigger? You need to provide a name and the trigger phrases. Now, these trigger phrases can be written in an LG format.

Currently, PVA intent triggers do not support the ML entities such as {@account=savings} so please avoid using them

Once you're done creating the Trigger, you can just route it to the Dialog (see below ⬇). In the BeginDialog trigger, you can write your message that needs to be sent to your customer / user of PVA (once this intent is triggered). For the sake of simplicity (extreme simplicity), I have just written a message as This message is from the Bot Framework Composer dialog.

Create Trigger and Dialog from Bot Framework Composer for PVA

Publish your changes back to PVA

Lastly, from the menu, click on Publish icon, choose your Publish profile and hit the Submit button! It will take some time but eventually, this will be published with the hyperlink to your Power Virtual Agent bot.

You can then see that all the changes have come through and test it in a similar way as I did.

Some key takeaways

  1. Unlike Bot Framework Skills, you do not need a separate license / Azure Bot Service registration to embed any of this functionality.
  2. You can embed rich content such as Adaptive Cards without any hassle
  3. You can also integrate with the natural language capabilities very easily from Composer.
  4. Adaptive Expressions to accelerate your bot's logic.
  5. Multi-select options for your customers
  6. You can use Bing Search as a Fallback intent
  7. PVA variables can also be accessed through Composer.
  8. ..and many more.. (not explored by me..)

This has just gone LIVE so there's a lot to explore.. and at the time of writing this, I am confident that this is going to be a game changer for friends who're already creating Bots.

Until next time.

Discussion (0)

pic
Editor guide