--- title: "Integrate Whatfix with ServiceNow using JavaScript" slug: "integrate-whatfix-with-servicenow-using-javascript" updated: 2026-08-10T06:20:46Z published: 2026-08-10T06:20:46Z canonical: "support.whatfix.com/integrate-whatfix-with-servicenow-using-javascript" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.whatfix.com/llms.txt > Use this file to discover all available pages before exploring further. # Integrate Whatfix with ServiceNow using JavaScript Integrating Whatfix with your ServiceNow account enables you to display Whatfix content and widgets on your application. Use the following steps to integrate Whatfix with your ServiceNow instance; 1. Log in to your ServiceNow instance as an admin and Go to **UI Scripts** under **System UI**. ![ServiceNow_UIScripts.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_UIScripts.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 2. Click **New** to configure a new script, ![ServiceNow_UIScripts_New.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_UIScripts_New.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 3. Ensure the **Global** check box is selected. Copy the script below, update your ENTERPRISE ID, paste it in the Script panel, and then click **Submit**. ```plaintext var head = document.getElementsByTagName('head'); var script = document.createElement("script"); script.setAttribute("src", "//cdn.whatfix.com/prod/<>/embed/embed.nocache.js"); script.setAttribute("type", "text/javascript"); head[0].appendChild(script); if(window.top != window) { var head = window.top.document.getElementsByTagName('head'); var script = window.top.document.createElement("script"); script.setAttribute("src", "//cdn.whatfix.com/prod/<>/embed/embed.nocache.js"); script.setAttribute("type", "text/javascript"); head[0].appendChild(script); } ``` 1. Note Update the correct script src from your Whatfix account in the code block in line 4 and line 13 ![ServiceNow_pasteScript_check.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_pasteScript_check.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) ## Enabling Whatfix Content on Portal pages If you notice that Whatfix content is still not being displayed on portal pages, continue with the following instructions. 1. In the left panel, click **Portals**. ![serviceNow_portals.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/serviceNow_portals.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 2. On the **Service Portals** page, under the **Theme** column, click the corresponding link for the portal that you want to enable. ![ServiceNow_theme_link.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_theme_link.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 3. Click the **JS Includes** tab. ![ServiceNow_JSIncludesTab.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_JSIncludesTab.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 4. Click **New**. ![ServiceNow_JS_New.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_JS_New.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 5. Enter a display name, in the Source drop-down section, select **UI Script**, and then click the Search icon. ![ServiceNow_JS_New_UI_search.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_JS_New_UI_search.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 6. Select the Whatfix JavaScript that was added in the first section. ![ServiceNow_JS_new_wfxEmbed.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_JS_new_wfxEmbed.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 7. Click **Submit**. ![ServiceNow_JS_new_submit.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_JS_new_submit.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) 8. Click **Update**. ![ServiceNow_JS_New_Update.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/ServiceNow_JS_New_Update.png?sv=2026-02-06&spr=https&st=2026-11-10T16%3A41%3A29Z&se=2026-11-10T17%3A41%3A29Z&sr=c&sp=r&sig=p1b6dIVZm%2Bqnag3gMqhosRJ1hl%2FrDMwF%2FKz5udk8jSk%3D) ## Related - [ServiceNow Integration](/servicenow-integration-1.md)