ServiceNow integration
Heedify supports ServiceNow ITSM integration via Workflows, integrated with Microsoft Teams, Teams Phone and the ServiceNow Table API with Interaction Management. When a customer calls, Heedify finds the caller in ServiceNow from their phone number, and the agent’s Teams call notification shows the caller’s name and a link to their ServiceNow record. When an agent answers, Heedify opens an Interaction record for the call, linked to the caller and assigned to that agent. When the call ends, Heedify writes the AI summary and the full transcript on the Interaction and closes it.
This page is a step-by-step guide. It assumes you know the basics of Workflows and Call Flows. Step 1 is done by your ServiceNow administrator, the other steps by the Heedify administrator.
- How it works
- Before you start
- Step 1: Prepare ServiceNow
- Step 2: Workflow 1: find the caller
- Step 3: Workflows 2 and 3: open the Interaction for the agent
- Step 4: Workflow 4: log the call on the Interaction
- Step 5: Attach the workflows and turn on transcription
- Step 6: Show the caller to the agent
- Step 7: Open the caller’s record automatically (optional)
- Step 8: Test the integration
- Troubleshooting
- FAQ
How it works
The integration uses four workflows and the call flow’s Agent context:
| When | What happens | Configured in |
|---|---|---|
| The call reaches Heedify (call connected) | Workflow 1 searches ServiceNow for a user with the caller’s number. It runs while the greeting plays. | Workflows |
| An agent’s Teams starts ringing | The notification shows the caller’s name; after pickup, the Teams side panel shows a link to the caller’s ServiceNow record. Microsoft Teams client only. | Call flow → Agent context |
| An agent answers (agent connected) | Workflow 2 finds the agent in ServiceNow by email address. Workflow 3 creates an Interaction (type phone, direction inbound) linked to the caller, assigned to the agent, in Work in Progress. | Workflows |
| The call ends (call ended) | Workflow 4 writes the AI summary and the transcript on the Interaction and closes it. | Workflows |
call connected ──► GET /api/now/table/sys_user (caller's number) stores $SN_CALLER_SYS_ID$, $SN_CALLER_NAME$
│
agent rings ─────► Teams shows "$SN_CALLER_NAME$" + link to the caller's ServiceNow record
│
agent connected ─► GET /api/now/table/sys_user (agent's email) stores $SN_AGENT_SYS_ID$
─► POST /api/now/table/interaction (caller + agent) stores $SN_INTERACTION_SYS_ID$, $SN_INTERACTION_NUMBER$
│
call ended ──────► PUT /api/now/table/interaction/$SN_INTERACTION_SYS_ID$ summary + transcript, Closed Complete
The Interaction is created only once an agent has answered. A caller who hangs up in the queue, or a call handled without an agent, leaves no unassigned Interaction behind in ServiceNow.
Heedify reads users and creates or updates Interactions. It never deletes data and has no access to any other ServiceNow table.
Before you start
- ServiceNow version: an instance on Washington DC or later, the first version with API keys for inbound REST calls. On an earlier version, contact Heedify: the integration then uses Basic authentication with the service account.
- ServiceNow product: this guide is written for ServiceNow ITSM, where callers are ServiceNow users (
sys_user). If you use ITSM, follow it as is. If you use CSM (Customer Service Management) and your callers are stored as customer contacts (customer_contact) rather than users, contact Heedify before you start: the caller search, the access policy and the roles are different. - ServiceNow administrator: the
adminrole, plusapi_service_adminandadaptive_auth_policy_adminon recent versions, to create the API key and the access policy. Creating the closing ACL (optional) also needs thesecurity_adminelevation. - Phone numbers: stored in international format (for example
+33612345678) in the Business phone or Mobile phone of ServiceNow users. The search is an exact match: a number stored as06 12 34 56 78is not found. - Agents: every Heedify agent has a ServiceNow user with the same email address as their Microsoft 365 account. This is how Heedify knows whom to assign the Interaction to.
- Heedify: permission to create Workflows and to edit the Call Flow in the Entity that handles the calls.
- Summary and transcript: they are produced from the call recording. The call flow needs Enable recording and Enable Transcription turned on (see Step 5).
Step 1: Prepare ServiceNow
This step is done once, by the ServiceNow administrator.
1.1 Check the plugins
Open System Definition > Plugins and check that each plugin below is Active:
| Plugin | ID | Why |
|---|---|---|
| API Key and HMAC Authentication | com.glide.tokenbased_auth |
Manages API keys. |
| REST API Access Policy | com.glide.rest.policy |
Required by the plugin above. |
| REST API Auth Scope | com.glide.rest.auth.scope |
Required by the plugin above. |
| Interactions Management | Interactions Management | Provides the Interaction table. Active by default with ITSM and CSM. |
1.2 Create the service account
Create a user dedicated to Heedify, never a named person’s account. Every action of Heedify in ServiceNow is recorded under this account.
- Go to User Administration > Users and click New.
-
Fill in the form:
Field Value User ID svc_heedifyFirst name / Last name Heedify/IntegrationIdentity type Machine Web service access only Checked: the account cannot sign in to the ServiceNow interface. Password Leave empty: the account signs in with the API key. -
Save, then add these roles:
Role Why Heedify needs it itilRead users ( sys_user) to find the caller and the agent.interaction_agentCreate and update Interactions, write work notes. interaction_integration_userServiceNow’s role for Interaction integrations. Used by the closing ACL (step 1.4).
itilandinteraction_agentare usually fulfiller (paid) roles. Check with your ServiceNow account manager whether an integration account with these roles uses a license in your contract.
1.3 Create the API key and the access policy
The key opens only the tables Heedify needs. Any request to another table is refused (HTTP 401).
- Authentication profile. Go to System Web Services > API Access Policies > Inbound Authentication Profile, click New, then Create API Key authentication profiles. Name it
Heedify API Keyand set Auth Parameter tox-sn-apikey: Auth Header. Save. - API key. Go to System Web Services > API Access Policies > REST API Key and click New. Name it
Heedify integrationand set User tosvc_heedify. Leave Expiry empty, or set a date if your security policy requires key rotation. Save, then click the lock next to Token to show the key and copy it. - Access policy. Go to System Web Services > REST API Access Policies and click New:
- Name:
Heedify Table API - REST API: Table API. Check all versions, all methods and all resources.
- Clear Apply to all tables and select only
sys_userandinteraction. - In the Inbound authentication profile tab, add
Heedify API Key. - Save.
- Name:
As soon as a policy covers the Table API on a table, ServiceNow accepts only the authentication methods listed in that policy on that table. If other integrations call
sys_userorinteractionwith Basic auth or OAuth, add their profiles (Basic auth, OAuth token) to theHeedify Table APIpolicy, or they will be blocked.
No Auth Scope is needed on the key: the access is already limited by the table list and the account’s roles. Adding a scope to the Table API would cut access for existing OAuth tokens that do not have it.
1.4 Let Heedify close the Interaction (optional)
By default, only the agent assigned to an Interaction can change its state, so Heedify cannot close it. To let Heedify close it at the end of the call:
- Elevate to
security_admin. - Go to System Security > Access Control (ACL) and click New.
- Set Type to
record, Operation towrite, Name tointeraction.state, and add the required roleinteraction_integration_user. Save.
Without this ACL, the agent closes the Interaction in ServiceNow after the call. Everything else works the same.
1.5 Check the key
Before you send the key to the Heedify administrator, run these three requests from a terminal. Replace <instance> with your instance name and $SN_KEY with the key.
# 1. Find a user by number: expected HTTP 200
curl -H "x-sn-apikey: $SN_KEY" -H "Accept: application/json" \
"https://<instance>.service-now.com/api/now/table/sys_user?sysparm_fields=sys_id,name&sysparm_query=mobile_phone%3D%2B33612345678"
# 2. A table outside the policy: expected HTTP 401
curl -H "x-sn-apikey: $SN_KEY" \
"https://<instance>.service-now.com/api/now/table/cmdb_ci?sysparm_limit=1"
# 3. No key: expected HTTP 401
curl "https://<instance>.service-now.com/api/now/table/interaction?sysparm_limit=1"
Then send the Heedify administrator the instance URL (https://<instance>.service-now.com) and whether the closing ACL was created. Send the key itself only through a secure channel (shared password manager, one-time link), never in plain text by email.
Anyone who can open these workflows in Heedify can read the key. Limit the Workflows permission on this Entity to the administrators who need it. To revoke access at any time, clear Active on the
Heedify integrationkey, or deactivatesvc_heedify.
Step 2: Workflow 1: find the caller
This workflow runs as soon as the call reaches Heedify, searches the ServiceNow user by phone number, and stores the result as variables for the rest of the call.
In every workflow of this guide, replace <instance> with your instance name and add these Headers:
| Key | Value |
|---|---|
x-sn-apikey |
Your API key from Step 1 |
Accept |
application/json |
Content-Type |
application/json (only on POST and PUT workflows) |
- In Heedify, open Workflows from the sidebar and click Add New Workflow.
-
Fill in the form:
Field Value Display Name ServiceNow: find callerEntity The Entity of the call flow that receives the calls. Trigger Event call connected Action → method GET Action → URL https://<instance>.service-now.com/api/now/table/sys_user?sysparm_query=phone=%2B$CALLER_ID$^ORmobile_phone=%2B$CALLER_ID$&sysparm_fields=sys_id,name&sysparm_limit=1The query means Business phone or Mobile phone equals the caller’s number.
%2Bis the+sign, written in its encoded form because a plain+in a URL is read as a space.$CALLER_ID$is the caller’s number without the+. - Add the
x-sn-apikeyandAcceptHeaders. -
Turn on Mapping and add:
Key Value SN_CALLER_SYS_IDresult.0.sys_idSN_CALLER_NAMEresult.0.nameresult.0is the first user found. - Click Save.
Use call connected, not agent connected. The name shown to the agent is prepared when their Teams starts ringing: a caller looked up at agent connected arrives too late for the agent who answers.
Step 3: Workflows 2 and 3: open the Interaction for the agent
These two workflows run when an agent answers. Workflow 2 finds the agent’s ServiceNow user from their email address. Workflow 3 creates the Interaction, linked to the caller and assigned to the agent.
Set the Execution order. Both workflows listen to the same event, agent connected. Heedify runs the workflows of one event one after the other, smallest Execution order first, whatever the order in which you pick them in the call flow. Workflow 2 must have the smaller number (
10) and Workflow 3 the larger one (20): Workflow 3 uses$SN_AGENT_SYS_ID$, stored by Workflow 2. If both keep the default value (100), the order is not guaranteed and the Interaction may be created before the agent is known, then refused by ServiceNow.
Workflow 2: find the agent
| Field | Value |
|---|---|
| Display Name | ServiceNow: find agent |
| Entity | The same Entity as Workflow 1. |
| Trigger Event | agent connected |
| Execution order | 10 |
| Action → method | GET |
| Action → URL | https://<instance>.service-now.com/api/now/table/sys_user?sysparm_query=email=$AGENT_EMAIL$&sysparm_fields=sys_id&sysparm_limit=1 |
| Headers | x-sn-apikey, Accept |
| Mapping | SN_AGENT_SYS_ID → result.0.sys_id |
Workflow 3: open the Interaction
-
Click Add New Workflow and fill in:
Field Value Display Name ServiceNow: create interactionEntity The same Entity as Workflow 1. Trigger Event agent connected Execution order 20Action → method POST Action → URL https://<instance>.service-now.com/api/now/table/interaction - Add the three Headers.
-
Turn on Body (JSON) and paste:
{ "type": "phone", "direction": "inbound", "opened_for": "$SN_CALLER_SYS_ID$", "caller_phone_number": "$CALLER_ID_E164$", "short_description": "Inbound call - $QUEUE_NAME$", "assigned_to": "$SN_AGENT_SYS_ID$", "state": "work_in_progress" }ServiceNow lets an Interaction be in Work in Progress only when it has an assigned agent: this is why the agent is looked up first. When Workflow 1 found no caller,
opened_foris sent empty: the Interaction is still created, without a contact. -
Turn on Mapping and add:
Key Value SN_INTERACTION_SYS_IDresult.sys_idSN_INTERACTION_NUMBERresult.number - Click Save.
During the call, the agent finds the Interaction in ServiceNow among the Interactions assigned to them, and on the caller’s record.
Step 4: Workflow 4: log the call on the Interaction
This workflow runs when the call is over. It writes the AI summary and the transcript on the Interaction, then closes it.
-
Click Add New Workflow and fill in:
Field Value Display Name ServiceNow: log callEntity The same Entity as the other workflows. Trigger Event call ended Action → method PUT Action → URL https://<instance>.service-now.com/api/now/table/interaction/$SN_INTERACTION_SYS_ID$ - Add the three Headers.
-
Turn on Body (JSON) and paste:
{ "chat_summary": "$CALL_SUMMARY$", "work_notes": "Call answered by $AGENT_NAME$ - Talk time: $CALL_HANDLE_TIME$ s - Sentiment: $CALL_SENTIMENT$\n\nTranscript:\n$CALL_TRANSCRIPTION$\n\nSummary:\n$CALL_SUMMARY$", "state": "closed_complete" }chat_summaryis the Interaction’s summary field (16,000 characters at most).work_notesadds a work note to the Interaction: here the call details, the full transcript, then the summary.\nstarts a new line. Arrange the note as you need: move theSummarypart above the transcript, or remove theTranscriptpart to keep only the summary.statecloses the Interaction. Without the closing ACL of step 1.4, ServiceNow does not apply this change: the summary and work note are saved, and the agent closes the Interaction. You can then remove thestateline.
- Leave Mapping off and click Save.
ServiceNow keeps the Interaction’s Transcript field read-only for integrations: that is why the full transcript goes in the work notes.
Variables used in this guide
| Variable | Value |
|---|---|
$CALLER_ID$ |
Caller’s number without the +. |
$CALLER_ID_E164$ |
Caller’s number in international format. |
$QUEUE_NAME$ |
The queue that handled the call. |
$AGENT_EMAIL$ |
Email address of the agent who answered (their Microsoft 365 address). |
$AGENT_NAME$ |
Display name of the agent who answered. |
$CALL_HANDLE_TIME$ |
Talk time, in seconds. |
$CALL_SUMMARY$ |
AI summary of the conversation. |
$CALL_SENTIMENT$ |
positive, neutral, negative or mixed. |
$CALL_TRANSCRIPTION$ |
Full transcript, one line per speaker turn. |
$SN_CALLER_SYS_ID$, $SN_CALLER_NAME$ |
Caller’s ServiceNow user, stored by Workflow 1. |
$SN_AGENT_SYS_ID$ |
Agent’s ServiceNow user, stored by Workflow 2. |
$SN_INTERACTION_SYS_ID$, $SN_INTERACTION_NUMBER$ |
The Interaction, stored by Workflow 3. |
A variable that has no value is sent empty. If transcription is off on the call flow, the summary and transcript are empty in ServiceNow, but the Interaction is still updated.
Step 5: Attach the workflows and turn on transcription
- Open Call Flows and edit the call flow that receives the calls.
- In the Recording settings, turn on Enable recording, then Enable Transcription (visible once recording is on). See Call Flows → Recording.
- Open the Workflows tab and, in Select workflows, pick the four ServiceNow workflows. Only workflows of the same Entity as the call flow are listed. The order in which you pick them does not matter: on the same event, they run by Execution order (see Step 3).
- Save the call flow.
Recording, and therefore the summary and transcript, starts when an agent answers. When the caller hangs up in the queue, no Interaction is created: Workflows 2 and 3 run only when an agent answers, and Workflow 4 then has no Interaction to update.
Step 6: Show the caller to the agent
The call flow’s Agent context tab decides what the agent sees in Microsoft Teams: the ringing notification, then the side panel during the call. Every field accepts the variables stored by Workflow 1.
For now, the agent sees this context only when they answer the call in the Microsoft Teams client. It is not shown in the Heedify Agent Console.
- In the same call flow, open the Agent context tab and turn on Call context for the agent.
-
Fill in the fields:
Field Value What the agent sees Caller name $SN_CALLER_NAME$The caller’s name instead of the phone number, in the ringing notification. Call subject $SN_CALLER_NAME$ → $QUEUE_NAME$The notification title. Teams shows 48 characters at most. Customer record link https://<instance>.service-now.com/sys_user.do?sys_id=$SN_CALLER_SYS_ID$A link that opens the caller’s record in ServiceNow, with their Interactions and tickets. Side panel lines ServiceNow contact: $SN_CALLER_NAME$A line in the Teams side panel during the call. - Save the call flow.
The Interaction itself does not exist yet when the agent’s Teams rings: it is created when they answer, so its number cannot appear in the notification. When the caller is not found in ServiceNow, every field that uses a ServiceNow variable is left out: the agent sees the phone number and the default information, as without the integration.
The link opens the caller’s record in the agent’s web browser. The agent must have a ServiceNow account and be signed in to ServiceNow (or use single sign-on); otherwise ServiceNow first shows its sign-in page.
Step 7: Open the caller’s record automatically (optional)
When your agents answer in the Heedify Agent Console, the caller’s ServiceNow record can open by itself in a new browser tab as soon as the call arrives, without a click. This is set on the queue, not with a workflow: ServiceNow searches the caller by number itself.
- Open Queues and edit the queue that receives the calls.
-
Open the Service integration tab and fill in:
Field Value Type Open new browser tab URL https://<instance>.service-now.com/sys_user.do?sysparm_query=mobile_phone=%2B{callerId}^ORphone=%2B{callerId}The Agent Console replaces
{callerId}with the caller’s number. ServiceNow opens the record of the first user whose Mobile phone or Business phone matches. - Save the queue, then repeat for every queue that handles ServiceNow callers.
- Each agent must allow pop-ups for the Agent Console in their browser, otherwise the browser blocks the new tab.
- Use Open new browser tab, not In agent console: ServiceNow does not allow its pages to be displayed inside another application by default.
- This opening works only in the Heedify Agent Console. In the Microsoft Teams client, the agent uses the link of Step 6.
- When no user matches the number, ServiceNow opens an empty user form: the agent closes the tab.
Step 8: Test the integration
- In ServiceNow, put your own mobile number in international format (for example
+33612345678) in the Mobile phone of a test user. - Check that the test agent’s ServiceNow user has the same email address as their Microsoft 365 account.
- Call the number of the call flow from your mobile and stay on the line during the greeting.
- On the agent side, check that the Teams notification shows the user’s name. Answer: in ServiceNow, a new Interaction appears, linked to the test user, assigned to the agent and Work in Progress.
- Talk for a few seconds, then hang up. Wait about a minute (the summary is generated from the recording after the call), then open the Interaction: the summary, the work note with the transcript, and the Closed Complete state (if the closing ACL exists) are there.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| No Interaction is created at all | The key is wrong, inactive or expired, or the policy does not include interaction. |
Run the checks of step 1.5. Check the Heedify Table API policy tables and the key’s Active box. |
| The Interaction has no contact (Opened for empty) | No ServiceNow user has this number in the same format. | Store the number in international format (+33…) in Business phone or Mobile phone. |
| The agent sees the number, not the name, for some calls only | The ServiceNow search had not finished when the agent’s Teams started ringing. | Keep a greeting or a menu at the start of the call flow: the search runs while it plays. |
| No Interaction for an answered call, agent email correct | Workflows 2 and 3 have the same Execution order, or Workflow 3 has the smaller one: the Interaction is created before the agent is known. | Set Execution order 10 on Workflow 2 and 20 on Workflow 3. |
| No Interaction for an answered call | The agent’s ServiceNow email address differs from their Microsoft 365 address: without an assigned agent, ServiceNow refuses an Interaction in Work in Progress. | Align the email address of the agent’s ServiceNow user. |
| The Interaction is not closed after the call | The closing ACL of step 1.4 does not exist, or the Interaction has no assigned agent. | Create the ACL, or let the agent close the Interaction. |
| Summary and transcript are empty | Transcription is off on the call flow, or the call was not answered by an agent. | Turn on Enable recording and Enable Transcription (Step 5). |
| Another integration fails since the policy was created | The Heedify Table API policy now limits authentication on sys_user and interaction. |
Add that integration’s authentication profile (Basic auth, OAuth token) to the policy. |
| The caller’s record does not open in the Agent Console | The browser blocks pop-ups, or the queue’s Service integration is not set to Open new browser tab. | Allow pop-ups for the Agent Console, then check the queue’s Service integration tab (Step 7). |
| The agent sees no ServiceNow information at all | The agent answers in the Heedify Agent Console, or the workflows are not attached to the call flow. | The context is shown only in the Microsoft Teams client. Check the call flow’s Workflows tab. |
A workflow failure never affects the call: the call is routed and handled normally, only the ServiceNow part is skipped.
FAQ
Does Heedify create a ServiceNow Interaction for every call?
For every call answered by an agent: each one gets its own Interaction (IMS… number), created when the agent picks up and already assigned to them. A caller who hangs up in the queue leaves no unassigned Interaction behind. When the caller is not found in ServiceNow, the Interaction is still created, without an Opened for contact.
Where do the call summary and transcript go in ServiceNow?
The AI summary goes in the Interaction’s summary field (chat_summary). The full transcript goes in the work notes, followed by the summary. ServiceNow keeps the Interaction’s Transcript field read-only, so the work notes are the place for the full text.
Why is the Interaction not closed after the call? By default, only the assigned agent can change the state of an Interaction. Create the closing ACL of step 1.4 to let Heedify close it. Without it, the agent closes the Interaction in ServiceNow.
Which ServiceNow tables can Heedify access?
Only the tables of the Heedify Table API policy: sys_user (read) and interaction (create and update). Any request to another table is refused with HTTP 401. Heedify never deletes data.
Can ServiceNow open the caller’s record automatically when a call arrives? Yes, when the agent answers in the Heedify Agent Console: set the queue’s Service integration to Open new browser tab with a ServiceNow URL that searches the caller by number (Step 7). In the Microsoft Teams client, the record opens from the link in the call notification and side panel.
How do I revoke Heedify’s access to ServiceNow?
Clear Active on the Heedify integration key, or deactivate the svc_heedify account. The workflows then fail without affecting the calls.
Works with: Microsoft Teams, Teams Phone, Heedify Agent Console, Queues → Service integration, ServiceNow Table API, ServiceNow Interaction Management, ServiceNow API keys, Workflows, Call Flows, call recording and transcription.