Parse JSON from 3rd party vendor

milesdpratt
Giga Contributor

Hello,

I have been asked to integrate with a 3rd party, by allowing them to insert records in one of our tables.

The support team at this 3rd party is sending me a JSON payload, but I'm at a loss as to how to parse it into one of our tables. I've been pouring over the servicenow documentation, but all I can find is information about how to structure JSON leaving ServiceNow, not how to parse incoming JSON.

Can someone point me in the right direction?

Here is the entirety of the payload I'm getting:

{

  "action": "created",

  "event": "request",

  "request": {

      "brokerage_name": "My Fake Institution",

      "brokerage_url": "www.fakeinstitution.com",

      "requested": "2017-04-03T17:11:23.527",

      "user": 1572940

  },

  "user": {

      "email": "fakemail@example.com",

      "id": 1572940,

      "name": "Fake User",

      "phone": null,

      "username": null,

      "value": null

  }

}

1 ACCEPTED SOLUTION

Hi Miles,



As Shahid, if you can have control on what the third party will send, you should use the Table API, but that means they will have to use the right tables and have the same column names as your column in ServiceNow.



If you want to accept the JSON as is and simply provide the third party with an endpoint, then you would have to build a Scripted REST APIs


View solution in original post

5 REPLIES 5

Hi Laurent,



This is the answer I was looking for. Thanks a lot!