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

Ankur Bawiskar
Tera Patron
Tera Patron

@harshi_ramesh 

screenshot please -> where Application is shown as Global?

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

@Ankur Bawiskar 

In the Target table list view, the inserted record has Global under Application.

 

I wanted to know if the custom scope can be populated even if it is coming from third party system or is this the expected behaviour?

harshi_ramesh_0-1767595766797.png


Thanks

@harshi_ramesh 

what target table is that? share some info

custom tables don't hold info about whether it's a Global scope record or custom scope record

how is your transformation running?

how is 3rd party sending data? are they consuming OOTB Table API or Import set API or Scripted REST API?

💡 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

@Ankur Bawiskar 

Target Table is a Generic table.

Transform Map is setup between the created Custom Table for the integration and the Generic Table(Target Table).
Fields are mapped and data is transferred properly. 

Yes, custom tables do not hold info about scopes.

From third party via REST method using OOTB API.