Re: How to use Service Catalog User selection as condition for Quote Line Opening (548 Views)
Reply
Frequent Advisor
MarjanP
Posts: 42
Registered: ‎02-29-2008
Message 1 of 5 (590 Views)
Accepted Solution

How to use Service Catalog User selection as condition for Quote Line Opening

Hi.

 

I want to use Service Catalog User selection (options) to influence Request Management Line Item opening – use User selection as condition for Line Item opening.

 

For example:

 

RM bundle for Standard PC has beside PC and installation also 3 monitors (1 default monitor and 2 optional). When user selects this Item in Service Catalog he also has to make monitor selection (and according to this selection only one monitor is actually opened as a Quote Line Item.

 

Can these be done and how?

 

Regards, Marjan

Frequent Advisor
MarjanP
Posts: 42
Registered: ‎02-29-2008
Message 2 of 5 (553 Views)

Re: How to use Service Catalog User selection as condition for Quote Line Opening

Does anybody know which Process/RAD is opening Line Items when request has been opened via Service Catalog and when this Line Items are defined?

 

Regards,

Marjan

Advisor
ZiggyPopp
Posts: 19
Registered: ‎04-08-2010
Message 3 of 5 (548 Views)

Re: How to use Service Catalog User selection as condition for Quote Line Opening

We have implemented a trigger on the svcCartItem table that calls a Script Library function where we parse the XML and then based on the values in the user selection, we change the catalog id to an inactive catalog item that calls a separate bundle for each possible option.  It is not very pretty but it has reduced our catalog size dramatically and sounds like it might be helpful in your situation.

We create one main catalog item and then a separate item and bundle for each option.  Those that are not to be displayed are marked inactive so they don't appear in the catalog.

If this interests you, I can send you some example code to help you get started.

Frequent Advisor
MarjanP
Posts: 42
Registered: ‎02-29-2008
Message 4 of 5 (539 Views)

Re: How to use Service Catalog User selection as condition for Quote Line Opening

Hi Ziggy.

 

This has crossed my mind and it brings me half-way (simplifies Service Catalog). There are still many bundles remaining in RM distinguished by one or two options ... a lot to be maintained... The option would be to intercept actual LineItem creation (trigger before ocml Add)  and check it against User Selection. But there is a risk of inconsistency.

 

In between ... I prepared a JavaScript which is called in "rml.open.from.components" Process. There is a variable called $work representing all Line Items that will be opened. I take this variable, push it through JS where I check “svc.options” (User selection XML string), remove unnecessary LI's (all possible options are included in RM bundle) and return variable to process before RAD is called. User Selection and optional Line Items are mapped via dependency group (User selection "monitor" [17,19,21] ... Line Item dependency group [monitor(17), monitor(19), monitor(21).

 

The script is rather simple and I tested it with "Open New Quote" and "svc.selection" (XML) field simulation. This works perfectly ... BUT (there is always a but ...) ... The process is not called when LineItems are opened as consequence of Service Catalog request ... I do not know where to intercept $work variable.  There is “svcCat.build.work.file” RAD that could be involved …….. there is where I stand wright now …………

Frequent Advisor
MarjanP
Posts: 42
Registered: ‎02-29-2008
Message 5 of 5 (533 Views)

Re: How to use Service Catalog User selection as condition for Quote Line Opening

[ Edited ]

Actually ... It works. All Line items Option Type in RM Bundle has to be set to "required" or "default". Other wise they are not added to $work variable ... and can not be compared against svc.selection

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.