Using Virtual Agent actions on notifications

NathanJ
Tera Contributor

Hello all,

I'm currently working on a project that involves integrating ServiceNow's Virtual Agent with Microsoft Teams. The goal is to trigger a notification in Teams when a work item is assigned to someone. Ideally, the user should be able to accept or reject the work item directly within Teams.

However, we also have a queue platform where users can accept or reject work items. We want to avoid duplicate notifications, so if a user accepts or rejects a work item on the queue platform, the notification should not appear in Teams.

I've been exploring various options and strategies, but I wanted to reach out to the community to see if anyone has experience with this kind of integration, or if you could provide any suggestions or guidance on how to best achieve this.

Specifically, I'm interested in:

  1. How to trigger a Teams notification from ServiceNow when a work item is assigned?
  2. How can I let users accept or reject a work item directly within Teams?
  3. How can I prevent the Teams notification from being sent if the user has already accepted or rejected the work item on the queue platform?

Any insights or advice would be greatly appreciated.

Thank you in advance for your help!

 

1 REPLY 1

FlorenceG
Tera Contributor

@NathanJ wrote:

Hello all,

I'm currently working on a project that involves integrating ServiceNow's Virtual Agent with Microsoft Teams. The goal is to trigger a notification in Teams when a work item is assigned to someone. Ideally, the user should be able to accept or reject the work item directly within Teams.

However, we also have a queue platform where users can accept or reject work items. We want to avoid duplicate notifications, so if a user accepts or rejects a work item on the queue platform, the notification should not appear in Teams. Spotify Pie

I've been exploring various options and strategies, but I wanted to reach out to the community to see if anyone has experience with this kind of integration, or if you could provide any suggestions or guidance on how to best achieve this.

Specifically, I'm interested in:

  1. How to trigger a Teams notification from ServiceNow when a work item is assigned?
  2. How can I let users accept or reject a work item directly within Teams?
  3. How can I prevent the Teams notification from being sent if the user has already accepted or rejected the work item on the queue platform?

Any insights or advice would be greatly appreciated.

Thank you in advance for your help!

 


Hello,

Integrating ServiceNow’s Virtual Agent with Microsoft Teams is a great initiative. Let’s break down your requirements and explore potential solutions:

Triggering Teams Notifications:
To trigger a notification in Teams when a work item is assigned, you can use the following approaches:
Webhooks: Set up a webhook in ServiceNow that sends a notification to a specific Teams channel when a work item is assigned. Teams supports incoming webhooks, allowing you to post messages programmatically.
ServiceNow Flow Designer: Leverage ServiceNow’s Flow Designer to create a workflow that detects work item assignments and sends notifications to Teams via the Teams connector.
ServiceNow Native Workflows in Teams: ServiceNow now offers native workflows within Teams. Employees can submit requests, receive updates, and take action on notifications—all without leaving Teams.
Accepting or Rejecting Work Items in Teams:
To allow users to accept or reject work items directly within Teams:
Interactive Cards: Create adaptive cards in Teams that display work item details and provide buttons for acceptance or rejection. When a user clicks a button, it triggers an action (e.g., updating the work item status in ServiceNow).
Bot Commands: Implement a Teams bot that understands commands like “accept” or “reject.” Users can interact with the bot in the chat, and it can update the work item status accordingly.
ServiceNow Integration: Use ServiceNow’s APIs to update work item status based on user actions within Teams.
Avoiding Duplicate Notifications:
To prevent duplicate notifications:
Tracking State: Maintain a state (accepted/rejected) for each work item. When a user accepts or rejects a work item in Teams, update the state in ServiceNow. Before sending a notification, check the state to avoid duplicates.
Timestamps: Include timestamps in notifications. If a user has already accepted or rejected a work item, subsequent notifications can be ignored based on the timestamp.
Queue Platform Integration: Integrate the queue platform with ServiceNow. When a user accepts or rejects a work item in the queue platform, update the corresponding record in ServiceNow. Then, Teams notifications won’t be duplicated.
Remember to consider security, authentication, and error handling during the integration. Test thoroughly to ensure seamless communication between ServiceNow and Teams.

 

Hope this will help you.

Best regards,

FlorenceG