Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Approve and reject button using actionable notification provider not updating anything

Chenab Khanna
Tera Expert

Hi

I am trying to configure Approve and Reject button on a change request when a user gets notification for the same in their ms teams. I have created the provider notification, created actions. The type of the action is Virtual agent and used the ootb topics - "_view_approval_details_LLM_ " (LLM model type) and "_view_approval_details_ (NLU model type). Also, created link actions to content to map these actions to the notification. 

I am facing 2 issues - one is sometimes the notification doesn't even come. It comes when the conversation is ended. I saw in some community channels is to type "show notification" to get all pending notifications but that doing that is also not showing anything. 

2nd issue is clicking Approve/Reject is not actually updating the record in the system. 

Please suggest any insights or advice on this?

3 REPLIES 3

prerna_sh
Kilo Patron

Hi @Chenab Khanna 

For the first issue "provider notification with actionable does not show when active conversation is going on", checkout this thread 👇
https://www.servicenow.com/community/ms-teams-forum/notification-provider-not-working-when-linking-a...

and for second issue, can you please attach the configuration, if possible?

-------------------------------------------------------------------------------------------------------------------------------------------
If my response solves your query, please mark it as helpful by selecting accept as Solution and Helpful. Let me know if anything else is required.
Thanks,
Prerna

naziyabegum
Tera Expert

Hi @Chenab Khanna 

Regarding the two issues you mentioned, I wanted to share what I found from my implementation. I had a similar requirement for both "Request and Change approvals in Microsoft Teams", although my Change requirement was slightly different from the OOTB behavior.

 

For your first issue, where the notification is not coming consistently or is appearing only after the conversation ends, there is an OOTB property that controls how long the Teams/Virtual Agent conversation remains active. By default, the active conversation is 2 hours.

 

For example, if you receive approval notification A at 4:17 PM and another notification B at 4:20 PM, but you are still actively interacting with conversation A, notification B can be queued. Once your conversation with A is ended, B will not necessarily appear automatically. You need to enter the “Show Notifications” command in Teams to retrieve and display those queued/pending notifications.

 

So, I would first check the property controlling the active conversation duration. You can change it based on how long you want the Teams chatbot conversation to remain active.

Property Name:  com.glide.cs.conversation_idle_timeout. 

Doc: Closing Virtual Agent and Agent Chat conversations • Australia Conversational Interfaces • Docs | Se...

 

For the second issue, where Approve/Reject is not updating the record, I would first verify whether the action is pointing to the correct sysapproval_approver record and whether the correct Virtual Agent topic is being triggered. If the action is executing but the approval record isn't changing, it could be that the action is being triggered against the wrong approval context or record.

You can go to:

 

Conversational Interfaces → Virtual Agent → Designer

If you are using NLU, search for View_Approval_Details. If you're using LLM, search for View_Approval_Detail_LLM.

 

I would compare those OOTB topics and verify that the appropriate approval action is being executed.

 

The OOTB approval topics are designed to perform the approval operation against the corresponding approval record. So, if the OOTB topic is being triggered correctly with the correct approval context, the Approve/Reject action should update the corresponding sysapproval_approver record.

 

For my implementation, there was another important difference. For Request, I used the OOTB Approvals Actionable Notification, but for Change, I created my own actionable notification because our requirement was to have Approve/Reject directly on the initial Teams card, rather than going through View Details first.

 

For the Change notification, I configured:

 

Provider Notifications → New

* Application: Microsoft Integrations Core
* Category: Microsoft Integrations

When to Receive:
* Trigger: Event
* Event: sn_now_teams.actionable.approval
* Table: sysapproval_approver

Who to Receive:
* Recipient: Person whose action triggered the notification / Event Parameter 1
* Recipient table: sys_user
* Advanced condition: Only trigger for Change Request approvals.

 

 

Then under the notification's related lists, I created the Content.

The Content type was Record Card, using the sysapproval_approver table. I added the Change Request fields I wanted displayed on the Teams card, such as Number, Short Description, Requested By, Assignment Group, Risk, etc., and enabled Enable Link toggled on.

 

Then under Actions, I created the required action. If you're following the OOTB View Details approach, you can create the View Details action using the appropriate Virtual Agent topic/model:

You have create Two actions one should be LLM topic and Other should NLU topic

* NLU: View_Approval_Details_
* LLM: View_Approval_Detail_LLM

After that, go to **Link Actions to Contents → New. The Application and Notification should already be populated. Select the Content you created and, under Actions, select the View Details action. Save it.

 

Then create a Change Request that requires approval and test the complete flow:

Change approval → Teams notification → View Details → Approve/Reject

 

If your requirement is to have Approve/Reject directly on the first card, that's a slightly different configuration from the OOTB View Details flow. In my environment, we didn't have the required Now Assist capability for the LLM approach, so I installed the ITSM Virtual Agent Conversation plugin, which gave us the OOTB approval actions that could be presented directly on the actionable card.

 

So, for the Approve/Reject issue, if you can elaborate on exactly what happens after you click Approve or Reject— whether the Teams response appears, whether the conversation continues, and whether the sysapproval_approver record changes at all — I can help you narrow down whether the issue is with the action, the Virtual Agent topic, or the approval record/context being passed to it.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards

I also need Approve/Reject cards directly on teams notification. Can you please your configurations if possible for the actions you did under the notification?

 

Even when i am trying to execute the ootb notification - Task Approval (ITSM Virtual agent conversations), Approvals - Actionable (Microsoft integrations - core), i am getting the notification only after conversation closed message shows up in teams. But on clicking of button, nothing happens. "Show details" button is also not doing anything. 

I am guessing there is some additional setup that i need to update. Not sure why. 

Can we connect on any personal channel? my email id is - chenabkhanna0710@gmail.com, can you please reach out to me there. Also, i have pinged you on linkedin