Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Example SQL to Retrieve "Customer" Specific Service Items

How do I retrieve the list of service items that are assigned to the customer on the service form...

This item is contributed through one of our newScale Technical consultants.

The following SQL Query pulled from the REQUESTCENTERDS datasource can be edited to fit your use case in pulling back the list of service items assigned to the "Customer" defined on the service form:

select vmi.name from SiServiceItemSubscription sis join siVirtualMachineInstance vmi on vmi.name = sis.DisplayName where vmi.assetstate = 'Active' and sis.CustomerID = #Customer_Information.Person_ID# union select vmi.name from SiServiceItemSubscription sis join siVirtualMachineInstance vmi on vmi.name = sis.DisplayName where vmi.assetstate = 'Active' and exists (select 1 from dirorganizationalunitpeople dup join dirOrganizationalUnit ou on ou.OrganizationalUnitID = dup.OrganizationalUnitID where ou.name = 'Cloud Administration and Operations' and dup.PersonID = #Customer_Information.Person_ID# ) order by name

Everyone's tags (1)
454
Views
0
Helpful
0
Replies
CreatePlease to create content