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.

“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.


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”

Microsoft Kaizala -Initial setup with trial version

Microsoft has launched Kaizala app which works both on android and iOS versions. It is competitor to WhatsApp, The name Kaizala is probably based on Marathi word which means “what’s up?” 🙂

At the moment very limited documentation is available from Microsoft for Kaizala development.

Major URLs you get for Kaizala developer reference are as mentioned below

Set up Trial version of Kaizala

Kaizala APIs for developers

As a first step you need to set up trail instance of Kaizala. Steps to be followed are-

  • In Office 365 trial instance, go to the Office 365 Admin center and go to Billing section and click on Add Subscription.
  • Search for Kaizala Pro app and you can get the trial version of the same.
  • Once you get the trial version, go to Set up section in Admin center and  assign the license of Kaizala app to one user.
  • Now go to users and assign license to the users.
  • Once you complete this activity, you would be able to see Kaizala in Apps section.

With this we have completed the Kaizala initial configuration  with Dynamics 365 CE.

Now you can go ahead and start configuring the Kaizala for you organisation

You can create groups, add/invite users, create various surveys, announcements , Feedback, Polls etc This we will see in my next blog.






About Myself

Hi Everyone,

I am Vrushali Pandurang Ranjalkar. I am IT professional with global experience of 14 years dotted with impactful roles in Solution Architecture, Project Management, Enterprise Consulting, Business Analysis and leadership. I have Vast Experience in Microsoft dynamics CRM on-premise, Dynamics 365 CRM sales, service and field service SaaS offering. I have been part of successful business integration (CRM with legacy on premise systems through Azure and integration technologies) and defining business strategies to generate profitability for various clients
I always wanted to have a platform where I can share my ideas, my experiences with the world. Now since I have got such platform, I would keep writing my blogs. Kindly read my blogs and if you found those interesting please post your comments. I would be writing about mainly Microsoft technology stack, the products such as Microsoft Dynamics 365 CE, Azure, Power BI, Kaizala etc.


Keep reading and commenting on my blogs. Thank you!

Continue reading “About Myself”