Unable to send sms to group using Incident alert management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 05:45 AM
I am working on ServiceNow integration with Twilio.
I've set up the connection successfully and am able to send by selecting a single user, but the issues come when I select the group to whom I want to send the SMS.
I've added the group to Incident Communication Task -
but it gives me the error "You cannot send sms as there are no users selected"
while the same group works perfectly fine when the channel is set to Email.
Also followed the solution mentioned on this post - https://www.servicenow.com/community/developer-forum/incident-alert-management-sms-not-sending-to-gr...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 11:06 AM
Thanks for providing solution.
While creating new communication task, all the users from the group will be default added to recipients list which was previously added, and it is tedious to clear them. Is there any way to clear them
Is there there any way to set filter on groups list, so only specific groups has to displayed
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 03:00 AM
Hi @Kshira
Unfortunately it's not working yet, when selected recipient and group as it's not supported by ServiceNow.
I will keep checking in upcoming versions and keep you updated.
Note - Recipient is working for internal users but not for contacts.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 06:39 AM
Issue seems to reside in CommunicationManagementUtilSNC on the getOnCallResourcesForGroup function. Specifically, the use of "contact.userId". When you examine the contact object, there are two attributes "userId" (string) and "userIds" (array). The string userId is empty when called for the SMS and the array userIds has the actual value in it.
You can toss in an override of this function in CommunicationManagementUtil and simply cleanup which userId attribute is used in the function with something like:
var overrideUserId = !gs.nil(contact.userId) ? contact.userId : (!gs.nil(contact.userIds[0]) ? contact.userIds[0] : "");
if (this._isUserActive(overrideUserId)) {
onCallResources.push({
id: overrideUserId + '',
level: level,
group: group.name,
groupId: group.sys_id
});
}
Finally, "Group" in this context is really the on-call for the group, not all members of the group.