The CreatorCon Call for Content is officially open! Get started here.

Configuring System Web Services

Mark94
Kilo Expert

Hi,

Help. I'm stuck!

I'm trying to import device information from Vodaphone's airwatch service into ServiceNow.

I've created an Outbound Rest message as per the info I've found here - https://community.servicenow.com/community?id=community_article&sys_id=cd3ce661dbd0dbc01dcaf3231f96191f

That bit works when I perform a test. It displays the information I want. What I can't figure out is how I move forward from the test to actually getting the data into a table.

I've tried creating an inbound web service, but that doesn't seem to give me the option to make it do anything. The docs say I need to create a transform file, but I've pulled no data into ServiceNow to transform. Now I'm rather lost. Do I need a scripted web service? Any pointers gratefully received.

Thank you!

1 ACCEPTED SOLUTION

Mark94
Kilo Expert

Hi, I'm getting somewhere.

I had set coalesce on the serial number field, so as a temporary measure removed that.

I've found the problem. So simple. A case of it being case sensitive!

I had this in my script...

gr.u_Udid = parsed.Devices[i].Udid;
                   gr.u_SerialNumber = parsed.Devices[i].SerialNumber;
                   gr.u_MacAddress = parsed.Devices[i].MacAddress;
                   gr.u_Imei = parsed.Devices[i].Imei;
                   gr.u_EasId = parsed.Devices[i].EasId;
                   gr.u_AssetNumber = parsed.Devices[i].AssetNumber;
                   gr.u_DeviceFriendlyName = parsed.Devices[i].DeviceFriendlyName;
   gr.insert();

 

..but each of the gr_u_xxx variables should all be lower case! D'oh. Changed that and data is now flowing in.

Phew. Feel like I'm back on track.

View solution in original post

7 REPLIES 7

did you set "coalesce " on any of the field on your transform map.

Mark94
Kilo Expert

Hi, I'm getting somewhere.

I had set coalesce on the serial number field, so as a temporary measure removed that.

I've found the problem. So simple. A case of it being case sensitive!

I had this in my script...

gr.u_Udid = parsed.Devices[i].Udid;
                   gr.u_SerialNumber = parsed.Devices[i].SerialNumber;
                   gr.u_MacAddress = parsed.Devices[i].MacAddress;
                   gr.u_Imei = parsed.Devices[i].Imei;
                   gr.u_EasId = parsed.Devices[i].EasId;
                   gr.u_AssetNumber = parsed.Devices[i].AssetNumber;
                   gr.u_DeviceFriendlyName = parsed.Devices[i].DeviceFriendlyName;
   gr.insert();

 

..but each of the gr_u_xxx variables should all be lower case! D'oh. Changed that and data is now flowing in.

Phew. Feel like I'm back on track.

you can convert the variable value in lower case by using toLowerCase() for gr.u_xxx

let us know if you need any further help.