Skip to main content

Posts

Showing posts with the label Azure

Embedded ChatBot in #MSDyn365FO Help Pane

In this post I will share some code on how to embed a Chat bot into the Help pane in #MSDyn365FO. My full code is available on GitHub . Do share any feedback. I won’t go into detail on how to develop the Chat bot as there are a number of ways to do it.  Options available in the Microsoft world are:  Power Virtual Agent ,  QnA Maker bot   Azure Bot Service bot   The point is you might want to surface that bot in FinOps to help users with their queries or support requests. Below is what it looks like. I added a field to embed the URL in the system parameters. Once you have entered the webbot url, you will see the Chatbot tab appear in the help pane.

Data Management Export - XML to JSON Transformation

In my last post, I wrote about event based integration using Business Events . I used JSON as my export file type. JSON is a lot easier to work with in Microsoft Flow or Azure LogicApp. Below is how I achieved it. Data Management framework doesn’t do JSON by default. However, it does do XML file format. A bit of googling and trial and error. I found this XSLT code that transformed XML to JSON. https://gist.github.com/bojanbjelic/1632534 Here is the authors blog post to give credit. https://www.bjelic.net/2012/08/01/coding/convert-xml-to-json-using-xslt/#code Setup Under the Data management workspace, open the Source data format form. Create new record called JSON and set the default extension to json. File format = XML XML Style = Attribute Root element = Document (I left this as default) Create a new Export and select your entity. In the Source data format, select JSON record that was created in the previous step. Now click on the View map icon. In the mapping...

Event Based Integration using Business Events and Data Management Framework

In this post I will share how I used Business Events for integration. If you have been in the FinOps space, then you know that there is a Recurring integration pattern that uses dequeue concept. The dequeue pattern, requires that you constantly poll the FinOps URL to see if there is a file you can download. https://{base URL}/api/connector/dequeue/{activityID} Then you have to acknowledge the dequeue by calling a second URL https://{base URL}/api/connector/ack/{activityID} Another alternative is to use the Package export method. The advantage of this one is that the external system is doing the polling and executes the export job on request. No need for the FinOps batch job to run. In summary: Both methods use a polling architecture. Both methods produce a zip file which you have to extract Both methods require that you make a second call to check the status or acknowledge the download Now, imagine if you could use the same Data Management framework but have it coupled...

Detailed guide on creating Business Events with Azure Service Bus

I have been working with the new Business Events feature released in FinOps and you should read the docs site first. This blog post focuses primarily on setting up Azure Service Bus endpoint. Setting up the Azure services can be tricky if you are not familiar with Azure Key Vault and application registrations. I have sequenced the post so that you don't have to jump around. There are four key elements to this: Create the app registration Create the service bus Create the key vault secret Configure FinOps Create an App Registration In the Azure Portal, navigate to the Azure Active Directory menu. Click on App registrations (there is the old one and the preview menu - they are the same but the UI is a bit different). I will show the original App registrations way. Create a new Web app/API registration and give it a name. It doesn’t really matter in our case what the sign-on url is. Take note of the Application ID as you will need it later for setting up the...

Send file to temp blob storage in #MSDyn365FO

In this post I will talk about sending a file to a temporary blob storage. A little warning before I get into it. This is using the Microsoft’s blob storage that is provisioned for us. I haven’t given it a lot of thought on how it would behave in production. Take it at your own risk. Lets start by looking back on a couple of posts last month on printing a report to a byte array. http://dynamicsnavax.blogspot.com/2018/09/print-report-as-byte-array-via-x-in.html http://dynamicsnavax.blogspot.com/2018/09/alternate-way-to-print-report-as-byte.html You can use those sample pieces of code to get a report as a stream and send it to the below code. if (stream) { str fileName = 'myfile'; str contentType = 'application/pdf'; str fileExtension = SRSPrintDestinationSettings::findFileNameType(SRSReportFileFormat::PDF, SRSImageFileFormat::BMP); FileUploadTemporaryStorageStrategy fileUploadStrategy = new FileUploadTemporaryStorageStrategy(); FileUploadTemporarySto...

Send to Azure Service Bus in #MSDyn365FO

Sending a message to Azure Service Bus is really simple in FinOps. Below is the job I wrote to send a message to the service bus. It takes a connection string and a queue name for connecting. The message string and key value pair list can be supplied to the properties. static str connectionString = 'Endpoint=sb://navaxservicebus.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=h5KwXSEFIHxxxxxxxxxxxxxxxxxx'; static str queueName = 'navaxqueue'; /// <summary> /// Runs the class with the specified arguments. /// </summary> /// <param name = "_args">The specified arguments.</param> public static void main(Args _args) { if (connectionString && queueName) { Microsoft.ServiceBus.Messaging.QueueClient queueClient = Microsoft.ServiceBus.Messaging.QueueClient::CreateFromConnectionString(connectionString, queueName); Microsoft.Ser...

Top 5 tips for developing a Chatbot

This is different from my usual blog posts but I have been sitting on this for some time. I have been working with Chatbots for about 1 year now. Been on and off various engagements. So, I wrote something to make it a a bit clearer for those wanting to develop it and those wanting to know about it. Chatbots are very trendy these days and thought I would write up some personal learnings I have made. Chatbots have existed for many years but the technology has been democratised like many things in Azure. You can literally build a bot for free of charge (of course you have to invest a bit of your time). A user would generally communicate through a chat window and with the addition of cognitive services, you get a really powerful tool. Below are my top tips for when building your first chat bot. 1. A chat bot must have a purpose There are a few forms of chat bots out there. a) General Chatbots – Alexa, Google, Cortana, Siri, Watson. This is the big problem these major companies mentioned ar...

Build and deploy your chatbot #Dyn365FO

This post is a continuation from the last blog post. We will explore what it takes to build and deploy your bot. In the Azure Portal , create a new “Web App Bot” by searching for “bot”. Select Web App Bot and follow the wizard. Enter the required details. Make sure to change the pricing tier to the free one, if you are experimenting. It is a good idea to select your template here. There are various templates available. Question and Answer one is a good template for fast set up of your QnA maker. If you are intending to use LUIS, select the Language understanding template. It will create LUIS project and connect it up for you. In the App Settings you will all the application ids, secret keys etc to hook it all up. If you used the LUIS template, you will see the LUIS application created here. https://www.luis.ai If you used the QnA template, then you will be required to enter the QnA appkey and password. You can download the source code from the Build blade.

Build a Question and Answer Chatbot #Dyn365FO

I am going to do a series of posts on Chatbots. I have been working on (and off) it for about a year now. I will start slowly and build up on the concepts. The easiest to do is probably Microsofts QnA Maker. QnA Maker can help your create an FAQ type chatbot that has language understanding. You just provide it with a link to an FAQ site or file, it will index all the content. The user then uses natural language to ask their questions. Lets get into it. 1. Navigate to https://qnamaker.ai and sign in with your Microsoft account Accept the terms and conditions. 2. Create a new service. Give it a name and a source for the FAQ. This can be a URL or a flat file. Then click on Create button. 3. This will create a question and answer pair. 4. Lets test it out before we publish it. a) Enter your text b) Best answer it could pick up c) Improve it by adding alternative questions. For a simple greeting intent, you could say it in many ways. Eg. Hello, Hi, Hey etc.. 5. Now that you are happy and S...