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
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”