Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Filtering assets based on customer organization

Tomislav Tobijas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2022

Hi,

I've started to test Insight - Asset Management, and I've got a question about filtering assets on the customer portal.

I've got the following scenario.
There are multiple organizations with multiple (different) users inside each organization. Each organization is actually our end customer and each organization has different products/assets at their location.

So, we could say that actually one organization = one location.

What I would like to get is that once a user opens a request in the portal and would like to select an asset/product with which they have a problem, only products linked to the users' organizations are displayed within the Insight custom field type.

Is something like this possible with IQL and/or JQL?

Cheers,
Tomislav

2 answers

2 accepted

4 votes
Answer accepted
Tomislav Tobijas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2022

Hey,

My colleagues and I just found a bit easier solution for this. The basic concept stays the same, but without the need of having to replicate Customer structure in Insight - only Organization structure is enough.

So, I'll take what Mark wrote earlier and just modify the steps a bit:

  • Object Type 1 - Organizations
    • Attribute - "Customer" (attribute type: User)
  • Object Type 2 - Data I want to present to the reporter
    • Attribute - "Assigned organization" (Reference Organizations) - it is important to use the same attribute name (for referencing organization) on each object type

Now, for the attribute "Customer" value in each Organization object, you can select any Atlassian or Customer account that you have on your site.

2022-07-21_09-16-20.png

On the Insight Field setup, you would set it up like this:

  • Filter Scope (IQL): objectType in ("ObjectType1", "ObjectType3") - replace strings with actual object type names (e.g. "Drones")
  • Filter Issue Scope (IQL): "Assigned organization".Customer=${reporter}

Filter issue scope depends on what attribute name(s) you used before (see list items/bullets above).

Hope this might be helpful to someone in the future.

4 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2022

Hi @Tomislav Tobijas - Unfortunately, there is no way to query against organization on the create screen because that isn't officially captured until the request is submitted.  So, you need to be able to filter against the user.  The only way that I've found to make this work is by replicating your org/customer structure in Insight.  From there, you can provide a user-specific experience by leveraging ${reporter} and Filter Issue Scope with appropriate inbound/outbound references from there.

For example...

  • Object Type 1 - Organizations
  • Object Type 2 - Customers
    • Attribute - jiraID to capture the user ID of each customer
    • Attribute - Reference Organizations
  • Object Type 3 - Data I want to present to the reporter
    • Attribute - Reference Organizations

On the Insight Field setup, you would set it up like this:

  • Filter Scope (IQL): objectType = Object Type 3
  • Filter Issue Scope (IQL): object HAVING outboundReferences(object HAVING inboundReferences("jiraID" = ${reporter.id}))

Hope this helps.

Tomislav Tobijas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2022

Hi @Mark Segall

Thanks for the quick reply. I think I get it.
Will try it out in the upcoming days.

If I got everything, this would mean that I would need to replicate all Organizations and Users to Insight, which might be a pain if we would about to do it manually?

Also, if the customer account was to be deactivated or removed from JSM, we would need to do the same in Insight? If that's the case, I think that would be way too much manual work as we're trying to automatize everything, especially user provisioning.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2022

replicate all Organizations and Users to Insight, which might be a pain if we would about to do it manually?

Completely agree about doing so manually.  I'm working on a similar scenario now and my plan is to try and set up a scheduled automation rule leveraging the Send Web Request action to hit the JSM API and pull the orgs/customers on a schedule.  

Also, if the customer account was to be deactivated or removed from JSM, we would need to do the same in Insight?

Yes, but I'm hopeful with the API call, I can get inactive users and either delete from Insight or mark as inactive and adjust my filter queries accordingly.  

This one is still a work in progress, but potential is there.

Like # people like this
Tomislav Tobijas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2022

I just realized that, technically, I wouldn't need to 'copy' organizations from JSM to Insight, but the products/objects would need to be referenced to a specific organization in Insight - so the Insight structure would be necessary, while JSM one is not. At least when looking at customer accounts and organizations they are in.

Anyhow, I've tested what you have suggested @Mark Segall and it works like a charm!

Thanks!

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2022

Happy it worked out for you.  And correct the JSM organization is intended for one purpose... Enabling users with the same affiliation access to each other's requests.  If you want to be able to perform any CRM type activities, that's where Insight comes into play.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events