---
title: Using Web Services with External Data Sources
slug: neurons-for-itsm/admin-user-help/enu/latest/using-web-services-with-external-data-sources
createdAt: 2026-07-14T19:16:41.487Z
---

This topic describes external data and web service support for new business objects, including associating scripts with the data.

:::hint{type="info"}
This topic does not apply to existing business objects. To use the processes described here, you must create a new business object and apply the processes to that newly-created business object.
:::

- [About Working with External Data](docId\:PXNP3X0zSnymYCwGCpxN9)
- [About Working with DSM as an External Data Source](docId\:PXNP3X0zSnymYCwGCpxN9)
- [Prerequisites](docId\:PXNP3X0zSnymYCwGCpxN9)
- [Creating an External Data Connection](docId\:PXNP3X0zSnymYCwGCpxN9)
- [Troubleshooting](docId\:PXNP3X0zSnymYCwGCpxN9)
- [Example: Creating an External Business Object to Access External Data Using Web Services](docId\:PXNP3X0zSnymYCwGCpxN9)

### About Working with External Data

Many times, customers have data in systems outside of Neurons for ITSM, such as DSM or SalesForce.com, that need to be integrated with Neurons for ITSM. Prior to Neurons for ITSM Release 2015.2, customers had to import that data; however, once the data was imported, it became stale. Also, the imported data could be very large and unnecessarily increase the size of the Neurons for ITSM database.

With this new process, you can have access to data in other systems without having to actually import the data into Neurons for ITSM. This access is accomplished by using web services.

With this process, you can use web services and scripts to create a mapping of the data from the other application to Neurons for ITSM. This allows you to pick and choose which data to integrate and what format to use and to use external data with different properties. From the script, you can make service calls to talk to the external application to get the data and bring it into Neurons for ITSM.

The data in the external application may be in a different format than the data in Neurons for ITSM, and there may be more fields that what Neurons for ITSM needs. The mapping does not have to be one-to-one. You can select the external data to import and configure the mapping. For example, the data in the external application may have 100 fields, but Neurons for ITSM only needs to work with 10 fields. Neurons for ITSM can import only those 10 fields and can map them to the associated fields in the business object in Neurons for ITSM.

### About Working with DSM as an External Data Source

One of the most common external data sources that works with Neurons for ITSM is Desktop and Server Management (DSM). You can improve the integration between Neurons for ITSM and DSM by following the processes in this topic.

To drive a more useful integration with DSM, Neurons for ITSM needs to be able to view the data that is stored in DSM. To be effective, this should be done in such a way that changes made in DSM are automatically reflected in Neurons for ITSM.  The way that Neurons for ITSM accesses DSM is through web services.

For more information about the new DSM integration, refer to [Configuring the New DSM Integration](docId\:x0R5Tiz6qOuJ7r9ii2xyS).

### Prerequisites

We recommend that you have the following knowledge for working with this process:

- Familiarity with Neurons for ITSM and its database.
- Familiarity with the external application and its database.
- Programming skills and knowledge of JavaScript, for writing the scripts and using the web services.

### Creating an External Data Connection

Follow these steps to work with an external data source:

1. Create an external business object.

:::Paragraph{indent="1"}
a. Ensure that you check **External** and enter information in the **External Object Synchronization** section. Refer to [Creating a Business Object](docId\:PrRPNuVje8Dmzc_oaqyMN).
:::

:::Paragraph{indent="1"}
b. If you want the external business object to be a validation business object, when you create it, ensure that you click **Pure Validation Object**.
:::

2. (Optional. Only if you created a validation business object.) Create a pick list that uses the external business object that you just created.

:::Paragraph{indent="1"}
Refer to [Creating a Pick List](docId\:m0dQgjWoHw5tBwRbrjUmJ). However, the constraints for the pick list must be either all AND or all OR. You cannot mix constraint types, nor can you use nested constraints.
:::

:::Paragraph{indent="1"}
Every time you access the pick list, the application checks to see if it is a synchronized external business object.
:::

:::Paragraph{listStyleType="disc" indent="2"}
If it is a synchronized external business object, the application checks to see if the external data is available locally.
If there is no external data or if any of the external data is stale, the application triggers the script to get refreshed data to populate the pick list with. If the data exists and is not stale, the application does not trigger the script.
:::

:::Paragraph{listStyleType="disc" indent="2"}
If it is not a synchronized external business object, the application triggers the script to get the data to populate the pick list with.
:::

3. Associate a script with the external business object. There can only be one script per business object use case. (A use case can be a form, list, report, workspace, etc.) This process is based on the information in [Working with Web Service Script Integration](docId:_lWxVA3flkQbDhYfjbuD_).

:::Paragraph{indent="1"}
a. Add a new external business object integration. Refer to [Adding an Outgoing External Business Object Integration](docId\:j7tnSJafp3ohqrnOKEpMV) for complete information.
:::

:::Paragraph{indent="1"}
b. As part of adding a new external business object integration, create a service reference. Refer to [Adding an Incoming Service Reference](docId\:j7tnSJafp3ohqrnOKEpMV).
:::

4. Create a top-level tab for this new external business object.
5. You can optionally create a quick action to trigger the script. Use the **Run Web Service** quick action template to create the quick action. Refer to [Run Web Service Quick Action](docId\:FEOCoB4ATbVX_y-sOwf0-).

### Troubleshooting

- [Viewing the Logs](docId\:PXNP3X0zSnymYCwGCpxN9)
- [Refreshing the Cache](docId\:PXNP3X0zSnymYCwGCpxN9)

### Viewing the Logs

There is a new log type starting in Neurons for ITSM Release 2015.2 called **Script**. Refer to [Working with Logs](docId\:C5RLJJj4XtAVEneBq4h65) for more information.

To view the information from the log on your monitor, add the following snippet to the bottom of your code:

console.log();

console.debug();

console.error();

You can also check the log at C:\Logs\AppServer.log.

### Refreshing the Cache

You can also go to the **Cache Management** workspace, and in the **Business objects that marked as external synchronized** field, select the external business object. Click **Invalidate synchronized data** to mark all of the existing records as stale. This forces the application to go to the external application for the data the next time that you access the data.

### Example: Creating an External Business Object to Access External Data Using Web Services

- [Creating the Web Service Integration](docId\:PXNP3X0zSnymYCwGCpxN9)
- [Creating a Service Request to Demo the Integration](docId\:PXNP3X0zSnymYCwGCpxN9)

### Creating the Web Service Integration

The following is an example of using web services to allow a user to enter a country name and have the application return the country code.

1. Go to the **Business Object** workspace and create a new standalone business object. (Refer to [Creating a Stand-Alone Business Object](docId\:PrRPNuVje8Dmzc_oaqyMN) for more information.)

:::Paragraph{indent="1"}
a. For the business object name and display name, enter **WS\_Country**.
:::

:::Paragraph{indent="1"}
b. Check **External**.  
:::

:::Paragraph{indent="1"}
c. Check **Synchronized**, set the **Refresh Interval** parameter to **10**, and set the **Time To Live** parameter to **60**.
:::

:::Paragraph{indent="1"}
d. Check **Pure validation object**.
:::

2. Go to the **Fields** tab. (Refer to[Creating a Field](docId\:hAdinCBAIzdA7R5LYCeuU) for more information.)

:::Paragraph{indent="1"}
a. Add a new text field called **ISOCode** that is Unicode Text, variable, max 128, check **Unique**, and uncheck **Nullable**.
:::

:::Paragraph{indent="1"}
b. Add another text field called **Name** that is Unicode Text, variable, max 64, check **Unique**, and uncheck **Nullable**.
:::

3. Go back to the **Details** tab.

:::Paragraph{indent="1"}
a. In the **External Primary Key** field, select **ISOCode\_Unique**.
:::

:::Paragraph{indent="1"}
b. Click **Auto Generate UI** to automatically create a new form associated with the **WS\_Country** external business object.
:::

4. Go to the **Pick Lists** tab.

:::Paragraph{indent="1"}
a. Click **Add new\...**.
:::

:::Paragraph{indent="1"}
b. For the list name and display name, enter **WS\_Country**.
:::

:::Paragraph{indent="1"}
c. Select **WS\_Country** from the **Get list data from** field and select **Name** for the **Display field**, **Value field**, and **Sort by field** fields.
:::

5. Go to the **Roles and Permissions** workspace.

:::Paragraph{indent="1"}
a. Click **Admin** and then click the **Top Level Tabs** tab. Click **Add New Tab** and click **Object Workspace**. 
:::

:::Paragraph{indent="1"}
b. Enter **WS\_Country** in the **Name** field, select **WS\_Country** in the **Object** field, and select **WS\_Country.Autogenerated** in the **Layout** field.
:::

6. Go to the **Scheduled Jobs** workspace.

:::Paragraph{indent="1"}
a. Add a new hourly schedule.
:::

:::Paragraph{indent="1"}
a. Name it **WS\_Country** and set a start time, end time, start date, end date, and set the **Recur Every** field to 1.
:::

7. Go to the **Web Service Connection (BETA)** workspace.

:::Paragraph{indent="1"}
a. Click **New External BO Integration**.
:::

:::Paragraph{indent="1"}
b. On the next page, select **WS\_Country** for the **External BO Name** field.
:::

:::Paragraph{indent="1"}
c. On the next page, for the **Service Reference** field, select **Add new\...**. For the **Service Reference** field, enter **Country Info Service**.
:::

:::Paragraph{indent="1"}
d. In the **Service Address** field, enter **http\://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL**.
:::

:::Paragraph{indent="1"}
e. Select the **ListOfCountryNamesByCode** method.
:::

:::Paragraph{indent="1"}
f. Paste the following into the **Scripts** field:
:::

// web service call

console.info("Script starts: WS\_Country - CountryInfoService - ListOfCountryNamesByCode");

var serviceCall = "CountryInfoService";

var serviceRef = "Country Info Service";

var serviceInstance = GetWebService(serviceRef, serviceCall);

var methodCall = "ListOfCountryNamesByCode";

var paramValues = \[ null ];

var result = serviceInstance.InvokeMethod(methodCall, paramValues);

function GetCountries(isocode, name)

\{

this.ISOCode = isocode;

this.Name = name;

}

var json = \[];

for(i=0; i\<result.length; i++)

\{

json.push(new GetCountries(result\[i].sISOCode,result\[i].sName));

}

SynchronizeAllHeatData('WS\_Country',\['ISOCode'],json);

console.info("Script ends: WS\_Country - CountryInfoService - ListOfCountryNamesByCode");

8. Click **Next** and for the **Schedule List**, select **WS\_Country**.
9. Click **Next** and then click **Publish & Run Now**.

### Creating a Service Request to Demo the Integration

1. Go to the **Request Offering** workspace and create a new request offering:

:::Paragraph{indent="1"}
a. Select **Demo Service** for the service and enter **WS\_Country** for the name. Choose any category.
:::

:::Paragraph{indent="1"}
b. Add a drop-down field called **Country** and a text field called **ISOCode**.
:::

:::Paragraph{indent="1"}
c. Edit the **Country** field and under **Pick List: None**, select the **WS\_Country** pick list (validation list). Under **Properties**, set the **Unique ID** field to **WS\_CountryCombo**.
:::

:::Paragraph{indent="1"}
d. Edit the **ISOCode** field and under **Default Value**, select **Expression** and for the **Triggered by** field, select **WS\_Country**.
:::

:::Paragraph{indent="1"}
e. Click **Next** twice.
:::

:::Paragraph{indent="1"}
f. Click **Add** to add a new organizational unit. Select an org unit. Change the **Status** to **Published**.
:::

2. Log in as a Self Service user. Go to the **Service Catalog** workspace.
3. Click the **WS\_Country** request offering and make sure it opens.
