Redirecting to record producer based on company

HarryLogiq
Tera Contributor

Hello,

 

We have a bit of an odd setup in that we are an MSP with 4 different levels of service we offer.

We have setup 4 different catalogs to hold the various different items, and have 1 record producer to allow them to log an incident in each catalog.

Currently on our service portal page, it points them to the sc_category page, but we would like it to directly take them to the correct incident form depending on which company they are a part of.

 

We use the Parent field in the company form to set the different service levels, i.e Platinum has 6 companies underneath, gold has 2 companies etc.

 

I think I understand the theory in that the best way would Be to change the icon link widget for a custom one, however, I don't understand enough scripting to be able to get it to function.

My hope would be that it would check the users parent company, and then if it equals one of the 4 values, display the relevant record producer form for that one.

 

Really appreciate any help anyone can give.

 

Thank you

7 REPLIES 7

swathisarang98
Giga Sage
Giga Sage

Hi @HarryLogiq ,

 

If you have only one Record producer and you want to show that in 4 different catalog item you can create a Variable set and in that create a variable with Custom and in that you will have option to add widget,

swathisarang98_0-1715890721212.png

and create a widget,

Service Portal -> widgets 

swathisarang98_1-1715890820183.png

Result:

swathisarang98_2-1715890863121.png

 

and add this variable set to all the catalog item where you want it and create a UI policy in each item and based on the condition hide or show the variable,

 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

 

 

 

 

 

 

James Chun
Kilo Patron

Hi @HarryLogiq,

 

I am assuming that you are talking about setting a dynamic link for the following widget

JamesChun_0-1715892302964.png

 

What I don't understand is that since you only have one Record Producer for logging Incidents, why do you need to use a dynamic link? If it's the same Record Producer across all the domains, the URL should be consistent across.

e.g. {Instance URL}/sp?id=sc_cat_item&sys_id=3f1dd0320a0a0b99000a53f7604a2ef9

 

Cheers

HarryLogiq
Tera Contributor

Hi Both,

Not sure I explained it very well.

With our 4 different offerings, we have created a dedicated catalog
Catalog A
Catalog B
Catalog C
Catalog D

 

Catalog A has all of the items, Catalog B has slightly less, Catalog C less again, and Catalog D has the least.

 

In these catalogs I have created one record producer in each catalog, so a total of 4 record producers for creating an incident, depending on which catalog they have assigned to them.

 

We have the 'Get Help' icon link widget setup, but I would like it so that the widget will direct them to the record producer for each of the catalog's depending on their company.

 

For example:

User A clicks get help on the service portal and is taken to Catalog A incident form

User B clicks get help on the service portal and is taken to Catalog B incident form

But User A cannot see Catalog B incident form

 

 

I think it would need a bit of code in the icon widget script which will check the users company, and then put a URL in when clicked for that specific company

Please let me know if this still doesn't make sense

Why do you have 4 record producers? Why not one for all catalogs? Are you requesting different information? If at any point you need something extra, you need to update 4 record producers. I would just use one and any logic that is different between the four can be added to this one producer.
That also takes away the issue of having to do all kinds of things with the OOB widget that may break on any future upgrade.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark