Exploring Azure Graph API Notification to connect Teams Voice with ServiceNow
what we try to achieve is the following from microsoft teams where a customer's service desk works in they can receive a voice call and when they pick it up they would like to create an interaction with the relevant details so i have a demo environment with teams so i'm calling myself from my from my cell phone i'm accepting the call and at that point an interaction should be created and that is exactly what is being done now so i'm gonna leave the call for now and in that interaction the details of the caller should be visible and also if there was previous engagement with this caller it should all be visible at once so i hope you get the understanding but this was actually simulated the way i did it so in this document i have summed up what i have done so far and i am exploring the microsoft graph api for this so what i'm doing is i'm getting a token then i am subscribing to the communications call record event so when i am subscribed the next three days it will send a api call towards a predefined endpoint in servicenow whenever a call record is created and in that call records we only have the reference to the call record so not the full details so immediately after that call i can do a counter call back to the graph api to get the details of that call record so who is the agent and who is uh who is calling if we if that's a known number we can do a lookup uh by that number in in servicenow or maybe there are other identifiers already in that payload of that graph api call so that is the id and it works but the problem is that the delete that there is a delay of seven minutes so when a call is received it takes on average seven minutes before the call is done to service now and that must be real time in order to get this to work so yeah here i have a few calls that i am making so this is first getting an access token whenever that is done i can do a call to make a subscription to the graph api and in this case i'm subscribing to the communication call records and whenever there is that event occurs then the end point where the notification should be sent is this is this script addressed api i've created on on service now so it basically all works and there's also another call i could make uh for example this one this will get this is a will get the details of that uh rest of that call record so it has all the details so that would be the follow-up once i am getting the notification that a new core record is created i immediately do a call back to get the full payload and details of that call so that is the idea uh as you could see uh in the beginning of the video it all works pretty seamlessly so the only thing is really the delay so my question is is there another way to achieve the same thing what you see here is some authorizations i have granted the application and also here this is the documentation of the graph api here you already see that the graph the latency of this uh call record can be uh to maximum 60 minutes and on average less than 50 minutes so what i'm really looking to is is there a way to get this real time so whenever there is a call when it's accepted immediately have that call out to the endpoint at surface now and get back the details so that in a flash the user will be presented with that notification that there is a new call and he can pick it up and have all the details of that of the caller at hand so the call history maybe open issues and so on so that would really beneficial so hopefully there is yeah there's an opportunity to [Music] fulfill this demand in the near really near future so reach out to me if there are more questions and thank you so far
https://www.youtube.com/watch?v=A2Y7VuAbpZo