Auto link servicenow profile to messaging apps

Soumya Thareja
Tera Contributor

Hi experts, 

I'm trying to achieve auto linking users' servicenow accounts to the 3rd party messaging app. I'm using the virtual agent api, and getting a popup saying "Link to servicenow" or "continue as guest". 

I want this to be automated instead. Users' accounts should be linked without any such popups. Is there a way to achieve the same?

6 REPLIES 6

_ChrisHelming
Tera Guru

That's a standard Oauth 2.0 flow where you link an account to another service; you have to accept the linking request.

Most likely there's a table in your instance that links their 3rd party messaging app's account to their ServiceNow account. If their account is the same in both places it won't be an awful to create that mapping ahead of time.

In the instance of Slack, the table is `sn_slack_ah_v2_slack_user_details` but it's not as simple as putting in their username. You need their Slack member ID and team ID in order to "pre-populate" that link so, even in a case where their Slack username is the same as their ServiceNow username you'd need to use the Slack users API to get the member ID and team ID to populate that table.

Yes, there's a table that stores the mapping of the linked accounts. But can we not automate that for every incoming chat request instead of users having to link that?

https://docs.servicenow.com/bundle/rome-now-intelligence/page/administer/virtual-agent/reference/ccci-account-auto-link.html

The above doc talks about it, but I have been unable to achieve the same, because the "Link Account Action" field is read only.

Victor Chen
ServiceNow Employee
ServiceNow Employee

Please also ensure that auto-linking is enabled (checkbox) for Teams in the Messaging Apps Integration page.

Hi,
It's checked