Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Table API to find out who is currently on call for a particular shift in an assignment group.

P Das
Giga Expert

Hi All,

I have configured roster in service now and I need a table API for getting the shift details.(who is on call now)

2 REPLIES 2

Tanushree Maiti
Tera Sage

Hi @P Das 

Please refer this links, see if it helps you:

https://www.servicenow.com/community/developer-forum/rest-api-find-the-current-primary-on-call-perso...

 

You can create scripted rest API based on writing script. for scripting/code, this link can help you

https://www.servicenow.com/community/itsm-forum/how-can-i-generate-the-on-call-user-information-in-a...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Mohit 101
Tera Contributor

Hi @P Das ,

I was working on this requirement to get who is on-call currently using Table API in ServiceNow, and I’d like to share what worked for me.

In my case, I noticed that the system was not storing the current shift user directly in a single table. So I created a custom table to store shift details like user, start time, and end time.

After that, I used the Table API with the below condition to get the current shift user:

Condition used:
u_start <= current time AND u_end >= current time

This means it will return the user whose shift is active right now.

Now I am able to successfully retrieve the current on-call user using Table API. I have attached screenshots for reference.

If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.

Regards,
MohitScreenshot 2026-02-24 110146.pngScreenshot 2026-02-24 110211.pngScreenshot 2026-02-24 110234.pngScreenshot 2026-02-24 110257.png