mapping JSON feilds to importset table feilds

Its_Azar
Tera Guru

Hi team

 

im trying to map the feilds in the json req to my importset table feilds.

 

example json

{

test1 ="abc",

test2="cdf"

}

 

my import set fields that i want to map to above

 

u_test1

u_test2, how do i map these? i know its possible using scripted REST API but i want to use import set api for this, any insights are appreciated

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India
7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@Its_Azar 

if you are planning to use the JSON request and post to Import set table API then the json key should match the staging table names.

So if staging field names are u_test1, u_test2 and so on then the JSON will look like this

{

"u_test1":"test1",

"u_test2":"test2",

"u_test3":"test3"

}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hey ankur, im asking like how to map the json feilds to my import set table feilds manually?

 

 

importset - u_test and json test?

 

how can i map this manually ?

 

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India

@Its_Azar 

that cannot happen.

If 3rd party wants to use Import Set API then they need to send JSON with that syntax only.

The json key means the staging field name

It's clearly mentioned in documentation.

if they want to send custom JSON request then you need to use Scripted REST API and then handle it

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Its_Azar 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader