ServiceNow integration with Skype, Microsoft Teams
welcome back guys in this video I will demonstrate you how we can integrate Skype for business application with ServiceNow platform so as part of the integration what I am going to do is for all the user specific fields like colorful assigned to field we can display an icon next to the field where in once a person who is working on the ticket clicks on that icon the user profile will open in a separate window for in Skype of business application so to get started with the things let me first start with uploading an image for the icon which I will be displaying over here I will navigate to images module for that and click on new I will give a suitable name for my image I will upload the image now I will click on OK and I will submit this form and we can also copy the code from here which I will be using in my UI macro now I will navigate to one incident form and for a field for which I want to display this particular icon for example let's take into account collar field I will go to the dictionary part of this field and I will add an over here so this attribute which I'm going to add over here is the name of my UI macro so let me give the name as Skype chat and I will update it now I will move ahead to you I'm Ackles I will click on new and I will give the same name over here which I gave in the dictionary part of the caller field which is Skype chat and since I am going to create a link I will be embedding my image into anchor tags okay let's see how this width and height is going to work otherwise we will customize it and on click off this particular image what should happen if it should call a function which will open a pop-up and that pop up will be the window chat window so I will write on length equal to let me give a name of the function for example the name of my function is user window we can give any name and then I will pass the defense over here so this fence first to the current field which I am sn2 okay for example if it is caller field then this reference will hold a value incident dot collar and disco I never incident if the name of the table and collar and disco ID is the name of the field we can also give tabindex so that if we click on tab it directly jumps to this type field so I Skype I can not field now let us just first navigate back to our incident form and see how it displays over there so I'll open the first record oh my god so this is quite big in size this is what we are not looking for and it is not going to be a good user experience so I'll adjust the width and height to let say 25% each now let's see whether it is able to fit into the required field height I will simply reload the form so this looks perfectly fine now we need to work on the click functionality so once I click on this it should open Skype for business app for me and the user who is present in the caller field it should based on the user's email ID it should open the window so that I can chat with that particular user now we will work on the proper part so I will create my function within the script and so the name of my function is use your window and I am passing the offense over there which is the reference field as I already told you so let's give the name as reference over here now within this function I need to get the details of the user for example users email ID from that reference feed now how I'm going to do that so what I am going to do is first of all since as I told you this references you can put an alert over here and you can check the value of reference the value will be incident thought caller and ESCO ID for caller feed so I will split the reference from here I will give the name as reference Val ok so I will split it on the basis of dot next step is I will fetch the name of the field only the name of the field I want over here so field name is so the as well is the name of the array which contains incident at the 0th position and collar and the square ID at the first position so i want to fetch the name of the field from the first position so what i will do is if well one will give me the name collar underscore ID now from this corner ID I will fish the society after their card since it is a reference field and I will pass the name of my license field over here okay now since I have the Society of the use of over here based on the society I will fetch the detail of the user for example uses email ID from the user table you I can do is I can directly use this condition over here if using dot dead then I can pass the society to fetch the details okay now within this I will fetch the email ID of the user user dot email and we can also convert it into string dot two strength and I haven't declared this variable named email ID so I will declare it on top now I have the email ID of the user over here what I'm going to do is if email ID is not empty then it should open the pop-up for me it should open the Skype window for me so that I can chat with the user so for that I will be using a function named open and I will give this evil as IP sim and I will pass the email ID of the user comma this function accepts two parameter either I can use get top window or either I can use this function with two parameters and the second parameter being underscore top now what this underscore top will do is it will display my chat window on top of other windows which are open in my system and else we can show another is email id is empty we can show particular error for example email is empty something like that okay so this part of the code is done now let me just go ahead and save my code once and for all now I know there will be a few confusions over here that why I have used s IP what is the meaning of s IP so s IP refers to session initiation protocol okay so this protocol is defined in the back end of every system so let me just show it to you I can navigate to default apps it is configured in every single system so tooth default apps are protocol there's something named link present over here and once this opens we will be able to see a list of applications which this particular protocol supports see here it is since I have selected default application for this protocol as Skype for business so once I click on that icon Skype window will open so based on your organization whatever chart application your organization is using for communication purpose you can give the default name of that application over here be it teams be it Skype for business or any of the application if you don't select anything over here so once you click on that icon on the incident forum you will get an option whether you want to select my calls of teams whether you want to select Skype for business but since I selected Skype for business by default it will show and open the chat window from Skype for business app for me okay so now let me go back to my code and I will go back to this incident forum let me just reload it and let's see how it works once I click on it see it is asking me whether I want to open Skype for business app or not if I click yes open it will go ahead and it will search for that particular user and open the chat window so that I can chat with this user whether I want to follow for something or whether I want to discuss a couple of things I can do anything on the chart officially so this is how it works so this is how we can integrate Skype for business application with ServiceNow thanks for watching guys and do let me know your comments in the comment section and if you want me to create some other we'd use or do you have any pain points you can also let me know in the comment section and I can create my next video on those topics thank you so much
https://www.youtube.com/watch?v=Gtstq2PUCms