Microsoft Kaizala Sample Case Studies

We have seen in my earlier posts how we can integrate Kaizala with other business applications. Now let us see where we can actually use Kaizala i.e what would be the  use cases for Kaizala.

Microsoft has published various case studies where Kaizala is either implemented or being piloted. Since the product is originated in India, it shows early adaption in India by Indian customers like YES Bank, Apollo Telemedicine, Republic TV, United Phosphorous Limited and Kendriya Vidyalaya Sangathan etc. In addition to these Indian organisations, Government of Andhra Pradesh is the first Government organisation which has adapted Kaizala for day to day governance.

You can visit Microsoft site for details of these published cases studies to understand the scenarios which are addressed and how Kaizala can help in day to day governance and work management.

Let us take an example of Indian media company and it’s needs to become the top positioned media company.

The biggest challenge in media industry is to get access to real time news and understand how viewers are responding to the  news. It is very important to understand the viewer’s sentiment to make the channel popular.  The speed and the accuracy of the news is very important along with the pulse of the viewer.

Every channel has its resources spread across the locations, then how do you map the resources, how fast the resources can be moved from one location to another. Whether a reporter is enough or entire broadcast van is required, what is the current location etc.

Another need is to collect the feedback from the viewer. Broadcasting the breaking news to subscribed users and involving the viewers in live debates, discussions, executing live polls etc. involvement of citizens to encourage the citizen journalism during disaster news reporting would bring the powerful impact on the Channel’s growth.

For all such needs Microsoft Kaizala comes as a complete solution. Kaizala allows to submit the real time tracking of the resources. Reporters can submit their attendance as many times as required along with the Geo location and a real time selfie as well. Having correct data helps to take correct decisions and impacts on the channel growth.

There is a feature to create a public groups in Kaizala, which can be subscribed by citizens /viewers.  Unlike any other social connectivity App providers, it has no limit on number of users to be added in a group. Various announcements can be sent to viewers. We can have live surveys, or polls during live debates and results can be seen directly live on the Kaizala Management Portal. We can even use PowerBI to view the dashboards. Viewers’ feedback can be collected from this group and analysed.  Citizens can  directly click the photos, videos and upload in case they want to report something. Viewers can directly write to the chief editor if  permitted.

As you would have realized, Kaizala has solution to almost all challenges we discussed in the media industry.

Stay tuned for more information.

Please hit the like button if you like my post and share with others.  Continue reading “Microsoft Kaizala Sample Case Studies”

Data Binding in PowerApps

Let us see how data binding works in PowerApps. In this blog let us see how to fetch data from various data sources in PowerApps. It’s very intuitive and easy to achieve the same.

PowerApps can connect to various data sources, let us take an example of Dynamics 365 CE. It can connect to Dynamics 365 online directly and for on premise, it can connect to SQL server via Gateway.

We want to create an app for the sales executive to create an opportunity on the mobile. Instead of entering whole lot of  information, he can just enter few mandatory fields and  create the opportunity.

We can achieve the requirement by building a PowerApps which connects to Dynamics 365 CE with below easy steps

  • Create data source for Dynamics 365 connectivity
  • Create UI to view the Opportunities, create new Opportunity and edit existing opportunity
  • Publish the PowerApps to make it available for the users to use

In case you already have data in the opportunity entity, you can create entire app just in few minutes.

Go to PowerApps

Build POwerAppS
Select PowerApps from Office Portal
Start from Data
Click on the start from data

You have to select the data source as Opportunity and click on phone layout. PowerApps will create the entire application in few minutes

This App would consist of  the three screens

  • Browse Screen – List screen to view the existing opportunities
  • Detailed Screen – Details of the single opportunity
  • Edit Screen- To edit  the existing opportunity

Once you look at these screens you would realise that how powerful and helpful PowerApps is.

 

The Browse screen would by default have the search and sorting feature . Along with this , it would have the ability to select any record and go to detailed view of the same. We can click to create new record as well from this screen. Don’t you think it’s really easy to create simple app using PowerApps. We really do not have to worry about the data connectivity, any SQL queries etc 🙂

Edit screen is also used for creating new record and its interesting  to see that PowerApps does everything on its own.

PowerApps decides which fields to be displayed on its own however we can change the fields later. You can just try creating such default app and we can further edit the functionality as we need. We will see in my upcoming blogs.

Thank you very much for reading my blogs and please hit the like button if you think the content is useful and leave comments here. Your comments really mean a lot for me.

Happy making PowerApps which is need of the hour !!!

Continue reading “Data Binding in PowerApps”

Kaizala – How to integrate with business applications – Dynamics CRM – part4

I am sure that you have understood how we can call the Kaizala APIs from dynamics CRM along with the webhook concept to get the response from Kaizala on real-time.

As we move further, let us see actual usage of webhook in Kaizala and Dynamics CRM integration. Kaizala provides multiple webhook subscriptions such as

postman webhook

As shown in above screenshot, at the moment Kaizala provides three webhooks/ subscription APIs

  • Subscribe to all events at group level
  • Subscribe to all events at action level
  • Subscribe to all events at action level with action package id

We can subscribe to any of the above APis based on the  requirement. Let us see how to use”Subscribe to all events at group level” webhook. Below is the code we can see in the body of this subscription in Postman. If we read this, it is quite intutve.

{
“objectId”:”{{test-group-id}}”,
“objectType”:”Group”,
“eventTypes”:[
“ActionCreated”,
“ActionResponse”,
“SurveyCreated”,
“JobCreated”,
“SurveyResponse”,
“JobResponse”,
“TextMessageCreated”,
“AttachmentCreated”,
“Announcement”,
“MemberAdded”,
“MemberRemoved”,
“GroupAdded”,
“GroupRemoved”
],
“callBackUrl”:”https://requestb.in/12786un1″,
“callBackToken”:”tokenToBeVerifiedByCallback”,
“callBackContext”:”Any data which is required to be returned in callback. Current webhook data can be seen by refreshing: https://requestb.in/12786un1?inspect”
}

You have to pass the groupID for which you need to get the response. You need to keep the events on which you need a response from Kaizala. If you need response  only  when the survey is responded by anybody, then just keep the “SurveyResponse” event and remove rest of the events. If you keep the unwanted events, you would get the response for each and every event unnecessarily.

You need to replace the callbackUrl with your Url which would be registered in the Kaizala for posting the response. To test the response, you can just register the same Url and try to respond to the survey. This would post the survey response to this url and you can see the output which would get by accessing the Url.

Kaizala would post a Json file containing the data of the response and you need to access this Json file and  get the content as required by your integration.For e,g  you can store these details in Dynamics CRM or create new entity and track the responses etc.

You can view all the webhooks registered for the group by using the API “Get all webhooks” on a group and if required even unsubscribe the registered webhook by using “Unsubscribing a webhook”

we have come to end of the integration series. I am still working on how to create custom actions in Kaizala. I would share my finding about the same in my further posts.

Kindly comment in case you want me to write on something specific on the Kaizala integration, I would definitely try to respond to your comments.

Hit the like button/ follow my blog / share my blog  if you like the content.

Keep reading my blog to know more about latest Microsoft SaaS products. Continue reading “Kaizala – How to integrate with business applications – Dynamics CRM – part4”

What is Webhook?

We must understand the concept of webhook as most of the websites provide webhooks to subscribe their events.

When I heard this concept for the first time, I was amazed and really wondering how to actually use it. Then  I researched on it and found the concept interesting and would like to share the same with you.

Let us look at a scenario in real life. you have to pick up someone who has gone for a live concert and not sure when the concert would be over. You are calling that person around the estimated time and asking after every 10 mins if the concert is over and he/she should be picked up. Here instead of you calling that person again and again, you both mutually decide that  the person will call you once the concert is over and then you will come and pick up.  This is like call me up once done :). This is exactly what webhook does.

The Wikipedia definition of webhook is

“A webhook in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating website or application. The term “webhook” was coined by Jeff Lindsay in 2007 from the computer programming term hook.[1]

Most of us are familiar with the word API which stands for Application Programming Interface. Whenever we need data or  any functionality, we call the APIs and get  required data such as find the good restaurants in this area. We use APIs to send the survey. However when we need real-time response when anyone responds to the survey, our program cannot keep calling the API frequently and check if there is any response. Instead of doing this tiresome job, we register the webhook and it informs us whenever there is any response.

Webhook is HTTP call back and it shares the data whenever it is available.

Similar concept is used in Kaizala or many other websites to provide us the response. We need to register web URL with their service and whenever event happens it would post the data to your url. Now it is up to you what you want to with this data.Most of webhooks I have come across, post the data in the form of  JSON format.

You can just create an event handler, host it on Azure and register its url to the webhook.

Please go through the below link for webhook reference.

https://www.chargebee.com/blog/what-are-webhooks-explained/

In my next blog let us see how to use the webhook in Kaizala and get the survey response on real time.

Thank you for reading for my blog. Please comment and share if you like if you find the write up useful.

Kaizala – How to integrate with business applications – Dynamics CRM – Part-3

In the previous post I have explained the usage of Postman and authentication APIs of Kaizala. Now let us see how to perform some Kaizala action from your business application and get the response back on real-time

We are going to see integration with Dynamics CRM

The above scenario would consist of two interfaces

  • Create an action from CRM in Kaizala
  • Get response back from Kaizala to CRM on real-time

To perform actions from CRM , you might create a group based on the opportunity details etc, You can user Group management KPIs for the same.

You can create a web service which would connect to Kaizala and create a group and then this web service can be called in any of the CRM plugin based on the requirements.

How to create a group

Use the Create group API and enter group details as mentioned below

  • Name of the Group
  • Welcome message
  • Phone numbers to be added in the group

Don’t miss to add access Token in headers which was created in previous step.

Postman -CreateGrp1

Now you can click on Code and copy the C# code which can be added in your web service.

You can use variables and replace the group name and other details dynamically.

Postman -CreateGrp

If you run the same API in Postman, you can see it returns you a JSON file containing the groupId, groupName  etc as mentioned below

{
“groupId”: “31ddc7bc-b657-49ac-a707-655666c904e3”,
“groupName”: “CRM Kaizala Group”,
“membersAdded”: true
}

You can either store these details in CRM for further reference.

Once the group is created, you can now  send a survey to this group.

I had tried to call the Kaizala API directly from CRM plugin, however it did not work for me. Some sandbox restriction was not allowing me to do so. You can also try direct calling otherwise use the web service to call the Kaizala API.

Hence the steps to be followed are as mentioned below

  • Develop a web service which can be called by CRM plugin.
  • Add add below code in the web service in the function whcih is from Content creation APIs – send survey on a group

var client = new RestClient(“https://api.kaiza.la/v1/groups/31ddc7bc-b657-49ac-a707-655666c904e3/actions”);
var request = new RestRequest(Method.POST);
request.AddHeader(“postman-token”, “b6175d67-fe97-9cb2-3454-5b45d5091f9e”);
request.AddHeader(“cache-control”, “no-cache”);
request.AddHeader(“accesstoken”, “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cm46bWljcm9zb2Z0OmNyZWRlbnRpYWxzIjoie1wicGhvbmVOdW1iZXJcIjpcIis5MTk5MjA5NDcyODlcIixcImNJZFwiOlwiXCIsXCJ0ZXN0U2VuZGVyXCI6XCJmYWxzZVwiLFwiYXBwTmFtZVwiOlwiY29tLm1pY3Jvc29mdC5tb2JpbGUua2FpemFsYWFwaVwiLFwiYXBwbGljYXRpb25JZFwiOlwiRjg4MjAzNjlDMzU2MzcyQkQ1NkI5NzYyOUM3RDlEMUNDRUUwNUQ0N0NDNzlEQzlCM0JGNzFFNTRBOTg2RUQxQlwiLFwicGVybWlzc2lvbnNcIjpcIjIuMzA6My4zMDo2LjIyOjUuNDo5LjI6MTguMjoxNS4zMDoxNC4zMFwiLFwiYXBwbGljYXRpb25UeXBlXCI6MyxcImRhdGFcIjpcIntcXFwiQXBwTmFtZVxcXCI6XFxcIk15S0FpemFsYUNvbm5lY3RvclxcXCJ9XCJ9IiwidWlkIjoiTW9iaWxlQXBwc1NlcnZpY2U6ZWFhM2RhMjItMTlhOS00ZjdkLWFlOGMtODE2N2Y4ODM0OWNjIiwidmVyIjoiMiIsIm5iZiI6MTUxMzEyMTcyNywiZXhwIjoxNTEzMjA4MTI3LCJpYXQiOjE1MTMxMjE3MjcsImlzcyI6InVybjptaWNyb3NvZnQ6d2luZG93cy1henVyZTp6dW1vIiwiYXVkIjoidXJuOm1pY3Jvc29mdDp3aW5kb3dzLWF6dXJlOnp1bW8ifQ.PehPR8vrgzinn6Ny0bo9XFcUZ7c0V1uCREZERGWMBIA”);
request.AddHeader(“content-type”, “application/json”);
request.AddParameter(“application/json”, “{\n actionType: \”Survey\”,\n actionBody: {\n isAnonymous:false,\n isSenderOnly:false,\n acceptMultipleResponses:true,\n dueDate:10,\n title: \”A test survey!!\”,\n questions: [\n \t{\n \t\ttitle: \”a test question written here\”,\n \t\ttype: \”Text\”\n \t},\n \t{\n \t\ttitle: \”Single select question\”,\n \t\ttype: \”SingleOption\”,\n \t\toptions: [{title:\”Opt1\”},{title:\”Opt2\”}]\n \t},\n \t{\n \t\ttitle: \”Multi select question\”,\n \t\ttype: \”MultiOption\”,\n \t\toptions: [{title:\”MOpt1\”},{title:\”MOpt2\”},{title:\”MOpt3\”}]\n \t},\n \t{\n \t\ttitle: \”Numeric question\”,\n \t\ttype: \”Numeric\”\n \t},\n \t{\n \t\ttitle: \”Location question\”,\n \t\ttype: \”Location\”\n \t},\n \t{\n \t\ttitle: \”DateTime question\”,\n \t\ttype: \”DateTime\”\n \t},\n \t{\n \t\ttitle: \”Image question\”,\n \t\ttype: \”Image\”\n \t}\n \t]\n }\n}”, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

This code can be generated using the Postman, very similar to group creation

Postman -Createsurvey

  • In above  code , the request.Addparameter is the important line of code which has the complete survey information and you can modify the same as per your requirement.You can use string concatenation or string builder to build this survey as run time
  • When you call this method from your web service, Kaizala will return a JSON file containing the below information

{
“referenceId”: “1f8cf8a4-10d9-487f-9277-393b060e0df1”,
“actionId”: “291a91c1-921a-4c26-a463-084dd0806d03”
}

  • You have to store this actionId and referenceId in CRM for further reference. The action ID is nothing but the surveyId which is created and sent to mentioned group
  • You can test your code in postman if you are getting above result
  • Now this particular web service can be called in any of your CRM plugins based on the requirement

With above steps, we have understood how to send Kaizala survey from CRM, now let us see how to capture the response to the survey by the group members at real-time.

You can also use the methods from content query APIs like Fetching survey responses based on the actionId retrieved in above steps, this would not be real-time. If our requirement is capture the survey response as soon as someone responds to the survey you need to register your url to the subscription APIs which is a web hook concept.

To understand how it works, we need to understand the webhook concept. Webhook concept is quite old, but I found it quite interesting and would like to explain you in details in my next blog.

Hence keep reading my blog. If you find it interesting, please follow and leave your comments. Feel free to ask questions in case you have any specific sceanrios in mind.

 

Continue reading “Kaizala – How to integrate with business applications – Dynamics CRM – Part-3”

Kaizala – How to integrate with business applications?- Part 2

In Previous post I have explained how to create the ConnectorID, Connection Secrete and the Access Token in Kaizala, which would be required when you need to use Kaizala APIs for integrations. You should have saved these strings in notepad for further reference or need to visit the page again to refer these.

Let us understand what are Kaizala APIs and how to use those.

Please refer the below Microsoft Docs link for more details

Kaizala APIs | Microsoft Docs

In order to understand the Kaizala APIs schemas and play around it you can import postman collection including sample and schemas for all Kaizala APIs. After importing the Kaizala APIs your Postman screen would look like below screenshot. The Kaizaa APIs would listed in the left frame

Postman homepage

As you an see in the above screen shot, it has 52 requests categorised in 5 different groups such as

  1. Authentication
  2. Group Management
  3. Content Creation APIs
  4. Content Query APIs
  5. Subscription APIs (webhooks)

These APIs cover most of the functionality which can be managed in Kaizala portal.

Now let us go through each of the groups in details and see how to use those in integrations.

Before you start any activity, it is important that you get authenticated. APIs under Authentication are used for the same.

Generate PIN : Generate PIN is the API used to generate PIN to connect to your Kaizala instance from your mobile Refer below screenshot.

Postman -Generate pin

{{api-root}}/v1/generatePin –  {{api-root}} should be replaced by api.kaiza.la.

It expects two parameters as

  • Content-Type – application/json
  • postman-token- Enter the access token generated in previous steps of creating the connectors

Under the Body section you can see below string. Mobile number and application ID placeholders should  be filled with actual phone number and connectorID which you have received in earlier step of creating connector

{“mobileNumber”:”{{mobile-number}}”, applicationId:”{{application-id}}”}

Postman -Generate pin2

Once you enter all details and click on send, it would send the 4 digit PIN to the mentioned mobile number.

Postman -Generate pin3

To call this API from .Net code, you can click on the Code link and see c# code . Same code can be used in  any console application or web service.

You can see the  code generated in below screenshot

Postman -Generate pin Code

Now next step is Login with pin and applicationID to get the refreshToken

Login with pin and applicationID to get the refreshToken

In this step you need pass the mobile number, applicationID and pin which is generated in the previous step

Postman -refreshtoken

This would generate the refreshToken

Postman -refreshtoken1

You need to copy the refreshToken and go to next step.

Note:

  • AccessToken is valid for 24 hours (Hence you need to get fresh access token before doing any action in Kaizala)
  • RefreshToken is valid for 365 days

You should always import latest KPIs as I have observed Kaizala team keeps enhancing these KPIs and there are chances that you would get better functionality with latest APIs.

As you have seen Postman provides you the code in C# which can be used in the web services and you can consume these web services in your business applications.

Let us look at a simple scenario on how I can connect to Kaizala from Dynamics 356 Customer Engagement.

For example: Whenever I create an opportunity in CRM, I want to send a survey to a group of people in Kaizala and track the responses back in terms of activities against the same opportunity.

The above scenario would consist of two interfaces

  • Create an action from CRM in Kaizala
  • Get response back from Kaizala to CRM on real time

I will explain the technical details in my next blog

Keep reading and happy connecting  🙂

Continue reading “Kaizala – How to integrate with business applications?- Part 2”

Kaizala – How to integrate with business applications?

In the previous post I have explained the basic features of  Kaizala and its configuration. Now let us look at Kaizala on how we can integrate Kaizala with various business applications. Kaizala provides bunch of  APIs for the integration. Before we  jump on usage of APIs, we need to first create a connector which would be passed to these APIs for the connection.

Let us see how to create connector. Steps to follow are as mentioned below

  • Click on Kaizala App in Office 365, and Sign in with office 365 credentials
  • Once you sign in, you would be able to see the Kaizala related menu on the left hand  side. The menu is very similar to Office 365.

Kaizala MGMT Portal-Create Connector

Kaizala MGMT Portal-AddConnector

  • Click on Connectors and add new connectors
  • Enter the details and provide required permissions

Kaizala MGMT Portal-AddConnectorDetails

Kaizala MGMT Portal-Connector Permissions

  • Once the connector is added, this step would give you the connector ID and Connection Secrete which is required in further development while accessing the Kaizala APIs
  • With this ready connector, we can generate access token and start using the Kaizala APIs
  • You need to copy the access token and save it for further reference
  • Steps to generate access token as mentioned in below screen shot

Kaizala MGMT Portal-Generate user token

Kaizala MGMT Portal-Copy user token

In next post I will explain how to use the access token and connect to Kaizala through APIs.

Happy reading and connecting 🙂

Continue reading “Kaizala – How to integrate with business applications?”