API Record creation - Custom scope or Global scope

harshi_ramesh
Tera Expert

Hi Everyone

I have an integration where from third party system records will be send to ServiceNow and it will be stored in a Custom table(Custom scope) from which via transform map the record will be inserted to Target Table(Global Scope)

 

My doubt is, when record are inserted from third party to target table via the map, under Application it shows Global. Is this expected or should I make any change in order to keep it as Custom scope name?

There is a dedicated user with roles created via which from third party system they send data.

I had tested via PostMan and could see 'Global' as App scope but when tested via REST API Explorer it is the custom scope.

 

 

Would appreciate if someone could help out!

 

Thanks

1 ACCEPTED SOLUTION

Vaibhav K Yadav
Tera Expert

Hi @harshi_ramesh 
In your Target table, the scope is being set based on the scope that is active during the data transform. When you are testing with API Explorer, the custom scope is being set because you are in that scope during testing. But when data will be transformed from 3rd party, the scope will usually be global. 

If you really want to change the target data scope, you can run an onBefore script on the Transform map to do it

VaibhavKYadav_0-1767597770877.png

Thanks

View solution in original post

7 REPLIES 7

@harshi_ramesh 

since custom table don't hold info about scope -> that screenshot is from where?

is that custom table an import set table?

you didn't share how 3rd party is sending data

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@harshi_ramesh 

I could see you marked response as correct and closed the thread without sharing what was being asked.

this doesn't help future members.

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

Vaibhav K Yadav
Tera Expert

Hi @harshi_ramesh 
In your Target table, the scope is being set based on the scope that is active during the data transform. When you are testing with API Explorer, the custom scope is being set because you are in that scope during testing. But when data will be transformed from 3rd party, the scope will usually be global. 

If you really want to change the target data scope, you can run an onBefore script on the Transform map to do it

VaibhavKYadav_0-1767597770877.png

Thanks