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.

  1. How it works
  2. Before you start
  3. Step 1: Prepare ServiceNow
    1. 1.1 Check the plugins
    2. 1.2 Create the service account
    3. 1.3 Create the API key and the access policy
    4. 1.4 Let Heedify close the Interaction (optional)
    5. 1.5 Check the key
  4. Step 2: Workflow 1: find the caller
  5. Step 3: Workflows 2 and 3: open the Interaction for the agent
    1. Workflow 2: find the agent
    2. Workflow 3: open the Interaction
  6. Step 4: Workflow 4: log the call on the Interaction
    1. Variables used in this guide
  7. Step 5: Attach the workflows and turn on transcription
  8. Step 6: Show the caller to the agent
  9. Step 7: Open the caller’s record automatically (optional)
  10. Step 8: Test the integration
  11. Troubleshooting
  12. 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 admin role, plus api_service_admin and adaptive_auth_policy_admin on recent versions, to create the API key and the access policy. Creating the closing ACL (optional) also needs the security_admin elevation.
  • 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 as 06 12 34 56 78 is 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.

  1. Go to User Administration > Users and click New.
  2. Fill in the form:

    Field Value
    User ID svc_heedify
    First name / Last name Heedify / Integration
    Identity 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.
  3. Save, then add these roles:

    Role Why Heedify needs it
    itil Read users (sys_user) to find the caller and the agent.
    interaction_agent Create and update Interactions, write work notes.
    interaction_integration_user ServiceNow’s role for Interaction integrations. Used by the closing ACL (step 1.4).

itil and interaction_agent are 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).

  1. 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 Key and set Auth Parameter to x-sn-apikey: Auth Header. Save.
  2. API key. Go to System Web Services > API Access Policies > REST API Key and click New. Name it Heedify integration and set User to svc_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.
  3. 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_user and interaction.
    • In the Inbound authentication profile tab, add Heedify API Key.
    • Save.

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_user or interaction with Basic auth or OAuth, add their profiles (Basic auth, OAuth token) to the Heedify Table API policy, 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:

  1. Elevate to security_admin.
  2. Go to System Security > Access Control (ACL) and click New.
  3. Set Type to record, Operation to write, Name to interaction.state, and add the required role interaction_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 integration key, or deactivate svc_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)
  1. In Heedify, open Workflows from the sidebar and click Add New Workflow.
  2. Fill in the form:

    Field Value
    Display Name ServiceNow: find caller
    Entity 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=1

    The query means Business phone or Mobile phone equals the caller’s number. %2B is 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 +.

  3. Add the x-sn-apikey and Accept Headers.
  4. Turn on Mapping and add:

    Key Value
    SN_CALLER_SYS_ID result.0.sys_id
    SN_CALLER_NAME result.0.name

    result.0 is the first user found.

  5. 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

  1. Click Add New Workflow and fill in:

    Field Value
    Display Name ServiceNow: create interaction
    Entity The same Entity as Workflow 1.
    Trigger Event agent connected
    Execution order 20
    Action → method POST
    Action → URL https://<instance>.service-now.com/api/now/table/interaction
  2. Add the three Headers.
  3. 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_for is sent empty: the Interaction is still created, without a contact.

  4. Turn on Mapping and add:

    Key Value
    SN_INTERACTION_SYS_ID result.sys_id
    SN_INTERACTION_NUMBER result.number
  5. 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.

  1. Click Add New Workflow and fill in:

    Field Value
    Display Name ServiceNow: log call
    Entity 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$
  2. Add the three Headers.
  3. 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_summary is the Interaction’s summary field (16,000 characters at most).
    • work_notes adds a work note to the Interaction: here the call details, the full transcript, then the summary. \n starts a new line. Arrange the note as you need: move the Summary part above the transcript, or remove the Transcript part to keep only the summary.
    • state closes 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 the state line.
  4. 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

  1. Open Call Flows and edit the call flow that receives the calls.
  2. In the Recording settings, turn on Enable recording, then Enable Transcription (visible once recording is on). See Call Flows → Recording.
  3. 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).
  4. 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.

  1. In the same call flow, open the Agent context tab and turn on Call context for the agent.
  2. 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.
  3. 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.

  1. Open Queues and edit the queue that receives the calls.
  2. 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.

  3. 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

  1. In ServiceNow, put your own mobile number in international format (for example +33612345678) in the Mobile phone of a test user.
  2. Check that the test agent’s ServiceNow user has the same email address as their Microsoft 365 account.
  3. Call the number of the call flow from your mobile and stay on the line during the greeting.
  4. 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.
  5. 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.