Retrieving User Location from API


I am currently working on a workflow where I am hoping to send a notification to a specific group based of a users location. The issue I am having is that the it is not the requestors location that I am needing, but a users that the requestor inputs through a Person field in the form.

What I would like to know is if there is a way a simpler way to get the Location attribute from a User when they are input on a form?

If there is not, can the User field be used as the  UID parameter for the method that Gets a single person from the system, or would I need to use the Person Lookup method with the User as parameter, then get the UID from that since the lookup does include the Location of the user?

Finally, is there a way to change the routing of a workflow based on the values that are returned from a Web Service?

Thank you,

Tuscun McFarlen

Tags API workflow user location
Asked by Tuscun McFarlen on Tue 11/21/23 6:51 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Wed 11/22/23 9:29 AM

Hi Tuscan,

If that person is being chosen on a custom person type attribute, all you should have to do it use a web service method step to GET the ticket, in that GET response you should have access to the UID of the chosen person which you can use to GET that person's TDX record which should get you their Location info.

Sadly you can't directly use that custom person attribute's current value as a parameter in the web method to GET their record as its main value is the *name* of the chosen person, not their UID.

Mark Sayers
Sr Support Consultant, CS

1 of 1 users found this helpful.
Hi Mark,

Thank you for the information this will help a lot.

When I have successfully used the GET method for an individual User, what would be the best way to use the response Data in the workflow? Basically I just need to change which Group is notified based on the Location of a User that I retrieve.

Thank you,
Tuscun McFarlen
- Tuscun McFarlen Wed 11/22/23 11:32 AM
I don't think you will be able to do that specifically via workflow. You can certainly obtain the location of the user, but you'd have to *set* something on the ticket (like its own location value) based on the user's Location so you can check that with a Condition step to determine how to route the next step in the workflow. - Mark Sayers Wed 11/22/23 1:05 PM