Thank you I have just tried the same wit teams but when I click on teams icon it gives an error saying users doesnt have an email but in user info it shows user has existing mailid. I have teams installed in my system and enabled microsoft teams as default app.
Hi harshad , I have created a custom user ref field , The ui macro is not working for me . While debugging I saw I am not getting any values in fieldName and sysId variables . What can be the reason ?
I think this should be helpful: docs.servicenow.com/en-US/bundle/sandiego-it-service-management/page/product/walk-up-experience/concept/walkup-ms-office-365-integration.html
thanks Harshad for sharing the knowledge. When I am putting alert on reference inside function userWindow(), I am getting $(ref) and not caller_id. It is taking $(ref) as a string I believe. Can you please let me know where I went wrong.
I didn't quite get your query. Do you mean to say that you are not able to see the skype icon next to the caller field? If yes, did you add the macro to the dictionary of caller field?
Thanks for sharing the steps! It's Awesome. When tried to change the SIP Protocol to MS Teams> After clicking the Teams icon in the Incident. Teams Open and gives the error as: We weren't able to find that contact Try typing a name in the To field above to find the person you need. Any Guidance will be appreciated.
The last time when I faced a similar error was when the user whom I was trying to search was from some other organization. And teams works based on the organization. I can find everyone in my organization but if I have to search for a person from some other organization then either their connection should be open or either I should have access.
Very nice session can you please create a session on normal soap and rest integration with third party tools? So that it will be really helpful for beginners
Hi Harshad, thanks for this wonderful video. I was able to implement this on my instance with incidents however when I tried to implement with request, I had some difficulties. Any guidance on this would be very much appreciated.
@@TechByteswithCharles I did not face any such issue. Can you please share a few more details like which field did you try to built this functionality for? are you using the same macro for all? Is there an error in the browser console or in logs?
@@theBeastMastersDojo I built the functionality on the "Requested for" field. I am using the same UI Macro for the three forms. I didn't find any errors in browser console or in logs. Thanks for your feedback.
@@TechByteswithCharles Oh Okhay! Now I know the issue you are facing. It's the field 'Requested For'. For the request form, it is pretty straight forward but for ritm, the dot walking is as "sc_req_item.request.requested_for" and for task, it is "sc_task.sc_req_item.request.requested_for" because requested for is actually a field on the request table and not on request item or task. So you will have to change the line in UI macro from var fieldName = refVal[1]; //This picks up second value from the array which becomes a problem when it is task or ritm to var fieldName = refVal[refVal.length - 1]; //this picks up last value from the array and gets the field name I haven't tried this but this should work or you might have to playaround with this a little more.
Can we inplement the ms teams meeting invite functionality when a p1 incident is created meeting should initiate and it should trigger notifications.Please suggest me the steps
HI Harshad, I followed each step as you demonstrated but it does not seem to work at my end. On debugging i found out that control is not going inside the macro onclick function. Please find the code snippet below and let me know if you see any issue with the code-
function userWindow(reference) {
alert("test");
var refVal= reference.split('.'); var fieldName= refVal[1]; var emailID; var sysID= g_form.getValue(fieldName);
var user= new GlideRecord('sys_user'); if(user.get(sysID)){
emailID = user.email.toString(); }
if(emailID) { open('sip:'+emailID,'_top'); } else { g_form.addErrorMessage("User Does Not have email in Servicenow); }
Just by looking at the code, it looks ok. Are you getting any error in the console? Do u have skype/teams installed on your system? Popups are enabled in your browser?
Hello Harshad...I have added default app under Sip -skype for Business.Also wrote the code as u suggested..but on clicking the icon,the Skype chat window is not opening..Please suggest
looks like some issue with the code. can you try adding an alert or logs inside the function in macro....if that is triggered? Let me know, how it goes...
OOTB I don't think this feature is available. But, as a custom solution this can be implemented. You need to get in touch with your O365 team and think of a possible solution
Try something similar to this one. community.servicenow.com/community?id=community_question&sys_id=bf0d4b69db9cdbc01dcaf3231f961968 I have not tried this but do let me know if it helps or not.
Hi Harshad! Thank you for this amazing content, Unfortunately mine didn't work, i managed to configure the whatsapp integrations that is one of your videos, but regarding the teams is displaying this error on the console Uncaught Reference Error: usersTeamsWindow is not defined at HTMLImageElement.onclick my code is like this:
function usersTeamsWindow(reference){
alert("test"); var refVal = reference.split('.'); var fieldName = refVal[1]; var emailId;
var sysId = g_form.getValue(fieldName);
var user = new GlideRecord('sys_user'); if(user.get(sysId){
emailId = user.email.toString(); }
if(emailId){ open('sip:'+emailId, '_top');
}else{ g_form.addErrorMessage('User does not have email in ServiceNow'); }
Hello, there are two mistakes in your code: 1. there is no closing } brace for the function. Add } before 2. Missing ) at line if(user.get(sysId){ replace with if(user.get(sysId)){
Thanks, Luiz. It should work fine. There are a few things that need to be taken care of. If you are using a windows machine then under default app setting > default apps by protocol > Sip protocol > Select default app as Microsoft teams. Microsoft teams is usually used at the organization level. Hence, click on the icon for a user who is having a valid organization id. Do not test it for your own id as teams will not be able to open a chat window for you to chat with yourself. For users belonging to the same organization, it will open the chat window. For users belonging to a different organization, it will open a window with a title as 'Unknown User'.
@@theBeastMastersDojo For Teams it is not "sip" protocol it shows "im" as the protocol. Luiz - try using im instead of sip and you should be able to see it work.
To make it work, make sure you have no mistakes in your code....check console for any error. Also, you need to have skype for business installed in your system and selected as a default app for sip protocol in the backend as demonstrated in the video.
That might be because there is edge_encryption_enabled=true in the dictionary attribute, Try to remove it and update it. You should be able to see the icon
Thank you for explaining every line will try it and very helpful👍
Best teaching skills you've got. Thank you so much, it helped alot for me!!
It was amazing buddy!! You are great, keep sharing :) Thank you
Very useful Video Harshad , Thanks...
Marvellous Harshad. It's very useful. 😊🙏
Thank you for sharing this
Hello, im doing the exact same steps but the icon does not get added on the form
hey Harshad, It's awesome, Thanks for the detailed explanation!
just wanted to check if you figured out a way to copy the conversation on worknotes?
That feature is already available OOTB provided by Servicenow.
@@theBeastMastersDojo is it via the Spoke?
@@saisailesh5476 virtual agent
Great! It is Useful :)
Is it possible to capture the chat conversation back to the incident on the closure of chat window ?
I have not tried that yet. But, if it is feasible I will surely take a look and share it with everyone.
Thank you
I have just tried the same wit teams but when I click on teams icon it gives an error saying users doesnt have an email but in user info it shows user has existing mailid.
I have teams installed in my system and enabled microsoft teams as default app.
Hi harshad ,
I have created a custom user ref field , The ui macro is not working for me . While debugging I saw I am not getting any values in fieldName and sysId variables . What can be the reason ?
Hi Harshat,
Can we have integration with Outlook calendar with servicenow for checking caller availability
I think this should be helpful:
docs.servicenow.com/en-US/bundle/sandiego-it-service-management/page/product/walk-up-experience/concept/walkup-ms-office-365-integration.html
thanks Harshad for sharing the knowledge. When I am putting alert on reference inside function userWindow(), I am getting $(ref) and not caller_id. It is taking $(ref) as a string I believe. Can you please let me know where I went wrong.
try with ${ref} instead of $(ref). If it still doesn't work, pls share ur code.
I am unable to see the image behind caller filed. Did coding as per in video.ans solution for this..?
I didn't quite get your query. Do you mean to say that you are not able to see the skype icon next to the caller field?
If yes, did you add the macro to the dictionary of caller field?
excellent work and it's quite useful..
Thanks for sharing the steps! It's Awesome. When tried to change the SIP Protocol to MS Teams> After clicking the Teams icon in the Incident. Teams Open and gives the error as:
We weren't able to find that contact
Try typing a name in the To field above to find the person you need.
Any Guidance will be appreciated.
The last time when I faced a similar error was when the user whom I was trying to search was from some other organization. And teams works based on the organization. I can find everyone in my organization but if I have to search for a person from some other organization then either their connection should be open or either I should have access.
@@theBeastMastersDojo Thank You for your reply! I will check on it.
It was Awesome 👍
Very nice session can you please create a session on normal soap and rest integration with third party tools? So that it will be really helpful for beginners
Yes, that's part of the plan
Hi Harshad, thanks for this wonderful video.
I was able to implement this on my instance with incidents however when I tried to implement with request, I had some difficulties.
Any guidance on this would be very much appreciated.
Hi Charles,
What kind of difficulties you are facing while implementing for request?
Hi @@theBeastMastersDojo ,
When I click on the UI macro icon on the RITM and SCTASK forms, it doesn't launch but it launches fine on the REQ form.
@@TechByteswithCharles I did not face any such issue. Can you please share a few more details like
which field did you try to built this functionality for?
are you using the same macro for all?
Is there an error in the browser console or in logs?
@@theBeastMastersDojo I built the functionality on the "Requested for" field. I am using the same UI Macro for the three forms. I didn't find any errors in browser console or in logs.
Thanks for your feedback.
@@TechByteswithCharles Oh Okhay! Now I know the issue you are facing. It's the field 'Requested For'. For the request form, it is pretty straight forward but for ritm, the dot walking is as "sc_req_item.request.requested_for" and for task, it is "sc_task.sc_req_item.request.requested_for" because requested for is actually a field on the request table and not on request item or task. So you will have to change the line in UI macro from
var fieldName = refVal[1]; //This picks up second value from the array which becomes a problem when it is task or ritm
to
var fieldName = refVal[refVal.length - 1]; //this picks up last value from the array and gets the field name
I haven't tried this but this should work or you might have to playaround with this a little more.
Can we inplement the ms teams meeting invite functionality when a p1 incident is created meeting should initiate and it should trigger notifications.Please suggest me the steps
I think yes. Did you try MS teams spoke?
HI Harshad,
I followed each step as you demonstrated but it does not seem to work at my end. On debugging i found out that control is not going inside the macro onclick function. Please find the code snippet below and let me know if you see any issue with the code-
function userWindow(reference)
{
alert("test");
var refVal= reference.split('.');
var fieldName= refVal[1];
var emailID;
var sysID= g_form.getValue(fieldName);
var user= new GlideRecord('sys_user');
if(user.get(sysID)){
emailID = user.email.toString();
}
if(emailID)
{
open('sip:'+emailID,'_top');
}
else
{
g_form.addErrorMessage("User Does Not have email in Servicenow);
}
Just by looking at the code, it looks ok. Are you getting any error in the console?
Do u have skype/teams installed on your system?
Popups are enabled in your browser?
Hello Harshad...I have added default app under Sip -skype for Business.Also wrote the code as u suggested..but on clicking the icon,the Skype chat window is not opening..Please suggest
looks like some issue with the code. can you try adding an alert or logs inside the function in macro....if that is triggered? Let me know, how it goes...
Thanks for the video, can we integrate Skype with servicenow reports to get alert chats automatically at schedule time
Not sure about skype but looks something similar is possible via integration with ms teams. I haven't tried that yet.
@@theBeastMastersDojo is there any pre built app in MS?
@@manish041117 virtual agent
@@theBeastMastersDojo thanks
Great!
Is it possible to throw some kind of error when the user is not exist in the teams?[Like user is not exist in teams]
OOTB I don't think this feature is available. But, as a custom solution this can be implemented. You need to get in touch with your O365 team and think of a possible solution
Hi harshad, please help me to make this macro visible only for specific domain
Try something similar to this one.
community.servicenow.com/community?id=community_question&sys_id=bf0d4b69db9cdbc01dcaf3231f961968
I have not tried this but do let me know if it helps or not.
Hi Harshad!
Thank you for this amazing content,
Unfortunately mine didn't work, i managed to configure the whatsapp integrations that is one of your videos, but regarding the teams is displaying this error on the console Uncaught Reference Error:
usersTeamsWindow is not defined at HTMLImageElement.onclick
my code is like this:
function usersTeamsWindow(reference){
alert("test");
var refVal = reference.split('.');
var fieldName = refVal[1];
var emailId;
var sysId = g_form.getValue(fieldName);
var user = new GlideRecord('sys_user');
if(user.get(sysId){
emailId = user.email.toString();
}
if(emailId){
open('sip:'+emailId, '_top');
}else{
g_form.addErrorMessage('User does not have email in ServiceNow');
}
Hello,
there are two mistakes in your code:
1. there is no closing } brace for the function. Add } before
2. Missing ) at line if(user.get(sysId){
replace with if(user.get(sysId)){
@@theBeastMastersDojo Thank you for your response, that actually worked!
I want to post an INCIDENT short description as a message in SKYPE, instead of opening empty chat. Can you please help me out on this?
I will get back to you on this as soon as I take a look...
You can parse the string and concatenate them and send it in URL
This is really nice, thanks Harshad!
We use Microsoft Teams, so I just substitute Skype for Teams, but that didn't work for us.
Luiz poocena
Thanks, Luiz. It should work fine. There are a few things that need to be taken care of. If you are using a windows machine then under default app setting > default apps by protocol > Sip protocol > Select default app as Microsoft teams. Microsoft teams is usually used at the organization level. Hence, click on the icon for a user who is having a valid organization id. Do not test it for your own id as teams will not be able to open a chat window for you to chat with yourself. For users belonging to the same organization, it will open the chat window. For users belonging to a different organization, it will open a window with a title as 'Unknown User'.
@@theBeastMastersDojo , yes, was doing that, maybe there is some restriction at company level.
@@lflucena that you can check internally within your organization. If you want me to get into a meeting and check, I am ok to do that.
@@theBeastMastersDojo For Teams it is not "sip" protocol it shows "im" as the protocol. Luiz - try using im instead of sip and you should be able to see it work.
when click on skype image alert the email id but not open skype business window
To make it work, make sure you have no mistakes in your code....check console for any error.
Also, you need to have skype for business installed in your system and selected as a default app for sip protocol in the backend as demonstrated in the video.
Not able to see icon in incident
did you add your macro to the dictionary of the field where you are expecting this icon to appear?
That might be because there is edge_encryption_enabled=true in the dictionary attribute, Try to remove it and update it. You should be able to see the icon