How to send message with incident update details from ServiceNow toTeams
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 03:43 AM
Hi Team,
We have implemented, ServiceNow for teams integration.
We need to execute following Use case:
-> When ever there is an update in incident, an incident post details has to be sent dynamically to caller/assigned to of that incident. (As message chat to teams.)
Please let us know the best approach and do needful.
Regards,
Haseena
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 12:56 AM
Hi,
Apologies, I do not know much about virtual agent integration with Teams. I did implementation by using those OOTB Teams spokes.
Hopefully someone else might help you.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 10:07 AM
While I cannot comment on using the Teams integration, I do know it is possible to create a Teams conversation with single user from ServiceNow.
I created a UI Macro that is called from a field attribute that, when clicked will open a new Teams message to the "caller_id" user of the Incident. And while you probably don't need the UI Macro script itself, you might find the <script> section useful:
function invokeChat(reference) {
var prefix = 'https://teams.microsoft.com/l/chat/0/0?users=';
var firstname = g_form.getReference('caller_id').first_name;
var user = g_form.getReference('caller_id').email;
var subject = '&amp;message=Hi ' + firstname + ', this is regarding your Incident: ' + g_form.getValue('number') + ', Short Description: ' + g_form.getValue('short_description');
var w = getTopWindow();
var url = prefix + user + subject;
w.popupOpenFocus(url, 950, 1000, '', false, false);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 01:00 AM
Hey,
This looks interesting, I tried your code and it opens new window in Teams.
However, It asks me to select user to send message to. Would you mind providing one example where we can successfully send a message to individual user via any action from ServiceNow?
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2022 08:06 AM
If it is asking you to select a user, then it is not building the "url" variable correctly for your situation.
This Microsoft page might prove useful: Create deep links