Jim Posted April 13 Share Posted April 13 Hi, I would like to capture the user id of the person who clicks a custom button, I have looked at the input parameters but nothing stands out to me, I would use the 'Owner' of a request but there may not be an owner in my case, is this possible? Link to comment Share on other sites More sharing options...
James Ainsworth Posted April 13 Share Posted April 13 Hi @Jim Provided that you have selected the option to add to the timeline, the user that clicked on the custom button will be displayed. There are two types of custom button. One that opens a URL and another that runs an autotask. URL: At the bottom of the form when configuring a URL custom button there is an option to add a timeline entry. Autotask: At the bottom of the form when configuring an Autotask custom button, there is an option to added a timeline entry Here is the result of a custom button with a URL link Hope that helps. Link to comment Share on other sites More sharing options...
James Ainsworth Posted April 13 Share Posted April 13 If you are wanting to use the ID of the user that clicked on the custom button as part of your Autotask you can use the following session variable within your Autotask. &[global["session"]["userId"]] 1 Link to comment Share on other sites More sharing options...
Jim Posted April 14 Author Share Posted April 14 10 hours ago, James Ainsworth said: If you are wanting to use the ID of the user that clicked on the custom button as part of your Autotask you can use the following session variable within your Autotask. &[global["session"]["userId"]] Hi @James Ainsworth I was very happy to read this and get it implemented however I don't have this option in my auto tasks ? Link to comment Share on other sites More sharing options...
Jim Posted April 14 Author Share Posted April 14 Jus to follow up, I printed the variable anwyay and it does in fact work! how many of these 'hidden variables' exists? Would be nice to see a complete list of global variables as it might spark some more ideas Link to comment Share on other sites More sharing options...
Berto2002 Posted April 14 Share Posted April 14 @Jim can you please show me exactly what worked? This is not working for me: I also do not see the Get Owner option (that would not matter because I want to assign the owner). Link to comment Share on other sites More sharing options...
Jim Posted April 14 Author Share Posted April 14 @Berto2002 I am setting my user as the customer as it is to report errors with requests to sytem admins, for yours to be the owner I would do a get user info using the parameter mentioned and then use the ID for tasks, Hope this helps Link to comment Share on other sites More sharing options...
James Ainsworth Posted April 14 Share Posted April 14 @Berto2002 Can you try including a team in your automation? Link to comment Share on other sites More sharing options...
James Ainsworth Posted April 14 Share Posted April 14 10 hours ago, Jim said: how many of these 'hidden variables' exists? Hi Jim, Yes, there are a few of these session variables. You are right that they are not accessible through the variable picker. They were not exposed originally, as session variables could be problematic within a BPM workflow as workflows may progress without the context of a user and therefore, there would be no session information. This is however different with the AutoTasks, as these need a custom button to be clicked on by a user, so the session information will be available. I'll see if I can find a few more that might be useful. Link to comment Share on other sites More sharing options...
James Ainsworth Posted April 14 Share Posted April 14 Here are a few more variables that allow you to get information about the person that clicked on the button. &[global["session"]["userId"]] &[global["session"]["loginId"]] &[global["session"]["firstName"]] &[global["session"]["lastName"]] &[global["session"]["userName"]] 1 Link to comment Share on other sites More sharing options...
Berto2002 Posted April 17 Share Posted April 17 On 4/14/2023 at 5:18 PM, James Ainsworth said: @Berto2002 Can you try including a team in your automation? @James Ainsworth yes that did kind of work. We still get the error on saving the autotask: But the big issue here is that, by having to specify the team, I would have to now create one autotask for every team we have and then configure a corresponding IN custom button to only show that autotask; and then duplicate all those custom buttons for SR's also. For me that would be 23 Autotasks and 46 Custom Buttons: 69 assets to create and maintain just to achieve "assign to me". I would appeal for this to be enhanced so the logic does not need a team... I can hear someone asking, "but which team should be selected when an agent could be in several"? My first answer is to auggest it is set to "the existing team" because the most common use of this would be within a team to assign to self for action after triage (no change of team). The second answer is to have everyone able to set a default team and it would go to that. Link to comment Share on other sites More sharing options...
Steve Giller Posted April 17 Share Posted April 17 6 minutes ago, Berto2002 said: The second answer is to have everyone able to set a default team and it would go to that. Unfortunately, everyone being able to set a default Team doesn't cater for the fact that not everyone will - rather like when there are issues sending emails as the Customer concerned doesn't have one assigned. 9 minutes ago, Berto2002 said: My first answer is to auggest it is set to "the existing team" Depends what you mean by "the existing team" here. If you're referring to the Team that currently owns the Request, there is again no guarantee that the Request will be assigned to a Team when the Auto Task is run. However this could be populated within the Auto Task by retrieving the Request Details, checking the Owning Team value, and populating the parameter with that. If there is no Team you can branch off and take another action, possibly posting to the Timeline that a Team must be assigned before clicking the button - but automatically populating the Team with a "best guess" can only ever cause problems. 1 Link to comment Share on other sites More sharing options...
Berto2002 Posted April 17 Share Posted April 17 For the notes, the Assign to node requires the Team ID (not Team or Team for Tasks) Link to comment Share on other sites More sharing options...
James Ainsworth Posted April 17 Share Posted April 17 @Berto2002 The "Team for Tasks" returns the Team ID. Link to comment Share on other sites More sharing options...
Berto2002 Posted April 18 Share Posted April 18 This was the only variable of the 3 related to the existing assigned team that worked for me. I get confused with the names unless in front of me &[global["flowcoderefs"]["getReqInformation"]["assignedTeamRawId"]] - the green one below Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now