Jump to content

Custom Buttons (capture who clicked?)


Jim

Recommended Posts

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

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.

image.png

Autotask: At the bottom of the form when configuring an Autotask custom button, there is an option to added a timeline entry

image.png

 

 

Here is the result of a custom button with a URL link

image.png

 

Hope that helps.

Link to comment
Share on other sites

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 ? 

image.png.17bee35a611e3bc099141f5906877a7c.png

Link to comment
Share on other sites

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

@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

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

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"]]

 

  • Thanks 1
Link to comment
Share on other sites

On 4/14/2023 at 5:18 PM, James Ainsworth said:

@Berto2002

Can you try including a team in your automation? 

image.png

@James Ainsworth yes that did kind of work. We still get the error on saving the autotask:

image.png.d5e3ade225c7d5d4486a286093000c32.png

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

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.

  • Like 1
Link to comment
Share on other sites

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

image.png.f9ea0f15d834274330089020a1980dd5.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...