Skip to main content

Hi,

I have a need to set up a condition in a work flow that checks if the requester of a ticket is member of specific Agent group. I haven’t found any standard way of doing this so I have tried with api calls and expression builder but without success.

I’m using a web request to get the group details and a json parser node to structure the output. But how can I use the Expression builder to check if the ticket requester is member of the group or not? Anyone managed to do such a check?

The web request returns an array or numbers for the group members which I assume is part of the problem.

Hello, you could use something like this. I have hade issues when I have a , in the text in the placeholder it’s why I’m replacing it with - 

if(regexMatch(‘{{placeholder from the parser node | replace: ',', '-'}}’,{{requester ID placeholder}},”The requester is in the group”,”Not in the group”) 

 


@daniel.soderlund  Thanks for the response. I think I am one step closer now :)

But I’m not getting it to work still. As a test I tried to just add the result from the expression builder as a ticket note using part of your suggested code and the results are “r]” which is a result of the “array of numbers” I guess. See the pictures below if that helps.

 

 


@daniel.soderlund  Thanks for the response. I think I am one step closer now :)

But I’m not getting it to work still. As a test I tried to just add the result from the expression builder as a ticket note using part of your suggested code and the results are “r]” which is a result of the “array of numbers” I guess. See the pictures below if that helps.

 

 

Can you click on the view array of number and paste it here ? 


Here is how it looks in the array. The content is the same for all 4 arrays.

 

But I’m beginning to think I might be doing something wrong earlier in the flow that might be feeding an empty array to the json parser, will check on that later today or tomorrow when time allows. Would an empty array result in “n]” or would that render some other result?


Here is how it looks in the array. The content is the same for all 4 arrays.

 

But I’m beginning to think I might be doing something wrong earlier in the flow that might be feeding an empty array to the json parser, will check on that later today or tomorrow when time allows. Would an empty array result in “n]” or would that render some other result?

Yes, you can always create private note with the placeholder to see the outcome 


@daniel.soderlund  Thanks for the help!

Your initial response solved my issue.

I had done a mistake earlier in the workflow as I suspected and when I corrected that it worked with your input.


Reply