Get logged in user subscribed services based on subscribed service offerings

Petr Pastuszek
Tera Contributor

Hello,

 

I tried to call the server side method to create a filter for the service offering reference variable in the reprod producer and all works fine. Filter from variable reference qualifier below:

- 'javascript:'portfolio_status=catalog^service_status=operational^sys_idIN'+ new ServiceSubscriptionUtils().getMySubscriptions();'

 

I need to implement record producer bit differently then described above:

User has to first select SERVICE in service variable (until its not selected, service offering variable  have to be hidden).

The question is, how can I call OOTB method to get back list of Services where user have subscribed service offering(s)  (subscribed by company, location, department ..... here I wish to use any OOTB method such as getMySubscriptions())

 

PS: We define subscribe by under-service offerings only. We have a requirement that the user has to first select a Service in record producer, then we wish filter service offerings. Not oposite.


/Petr

6 REPLIES 6

VivekSattanatha
Mega Sage
Mega Sage

Hi Petr,

 

Are you looking only OOB solution? I dont see any OOB functions to get Services from subscribed Service offerings. But you can enhance the oob getMySubscriptions() function which provide you the logged in user service offerings and from there you can get the Services using the parent field.

Hello and thank you for your answer.

 

Im looking for OOTB as much as possible with min maintenance.

I tried what you suggested, created copy of SI and modified just one row, example below. This works and returning cmdb_ci_service sys_id(s) as I need for filter in reference variable.

 

I will little wait for OOTB proposals from someone/You. I hope this is solved within CSDM somehow already.

Or  how do you all create Incident Record producer for end users in respect to CSDM? Are end users allowed to select Service or just service offerings in portal ?

Our idea is that they will select the first highest level e.g. Email Service and then they get a filtered list of service offerings.

Below customization will work for me, but is there way to achieve same OOTB?

 

PetrPastuszek_0-1697207232041.png

 

@Petr Pastuszek 

We did it by only Service offering in portal, because our portfolio team would name the service and service_offering some what similar so that the user wont get confused. What you are giving is a convenient way for the user to choose the service offering. I dont see any wrong in it.

Thanks for reply, we have it structured this way:

Email service

--> xyz Domain 3gb service offering

--> abc Domain 5 GB service offering

We try to avoid creating same name for Service/Service Offering --> but maybe this will happen over the time 🙂

 

/Petr