ApiServer: Configure service categories and products to display

I need a way to configure the displaying of service categories and products based on a customized query.
In the old WebDesigner you had these great configurable options for this:

VI_ITShop_Filter_AccProductGroup (Products to display for a given recipient)
VI_ITShop_Filter_AccProductGroupMultiUser (Products to display for a given list of recipients)
VI_ITShop_Filter_AccProduct (Displayed service categories)
VI_ITShop_Filter_AccProductMultiUser (Displayed service categories for a group of users)

In the new ApiServer I cannot find these configuration options externally (via the admin portal)
The queries for displaying service items and categories seem to be hard coded in the standard API plugins.

Why are these configuration options missing on the API server?
Are they planned for a future release, if so 9.3?
What would be a work-around strategy to accomplish this given the current 9.2 version?

Regards,
Niels

Parents
  • I guess we'll need to code it, although it does not seem to be hardcoded. Let's take the case of the service categories. This is implemented as a GET portal/shop/categories (see new-request-product.component.ts) that returns a list of service categories for a given, comma separated, uid_Person list. It would also take a filter .

    Now, and in that I agree, the filter configuration is far from being a normal string with an sql expression such as those we used in the configurable options for the old web designer, like VI_ITShop_Filter_AccProduct . I would appreciate if one of the experts could give us a hint on how we could set up a filter and how the Expression and FilterType.Expression elements work , so we can create our own config keys in the admin portal and use them in our code.

  • Hello Juan Carlos,

    I'm back on this one ;-)
    After contacting support I was informed that there is a configurable option in the Administration Portal: API method configuration
    So happy days.. I thought until I tried it out...

    In the Administration Portal create a configuration key of type 'API method configuration'
    for example 'shop_serviceitems' with whereclause: Ident_AccProduct <> 'FilterThisServiceItem'

    Administration Portal > Configuration: Web Portal (click on: three dots icon)
    Create configuration key
    Select where to add the configuration key: API method configuration
    Enter the API method name, replacing slashes with underscores, for example "itshop_cart".
    Name of the new configuration key: shop_serviceitems
    [Create]

    Property configuration
    API method configuration / shop_serviceitems / Filter condition
    Specify a filter condition (WHERE clause). To refer to the identifier of the current user, use the %useruid% variable.
    Value: Ident_AccProduct <> 'FilterThisServiceItem'
    PropertyConfig/MethodConfiguration/shop_serviceitems/WhereClause
    [Apply] (*) Apply globally [Apply]

    In my environment this custom configuration does nothing it looks like it's not getting picked-up after configuring.
    For more details see: github.com/.../113
    The strange thing is that Cody Griffith from OneIM (Mathnstein on github) could reproduce my issue only once
    and then it didn't happen again. He did create a ticket for this.
    P.s. the reported issues on github repro are getting picked-up really fast, great job Cody!!!

    Maybe if you have some "spare" time and could try this config out, that would be great.

    Regards,
    Niels

  • Hi! Yes, I read your conversation with Cody on Github.  When I first read it I thought of a bug I hit on v91 where the json config was not written , but in that case the Apiserver was throwing an error. 

    Sure thing I'm going to give it a try. Thanks for sharing!

  • Checked and doublechecked. Commented on the github.

  • Update on this issue...

    I just received the fix for this issue from support.
    So from a reported issue to a hotfix within a week, one word: Amazing!

    Contact support and ask for hotfix #446293

    Thank you support team and Juan Carlos (for double-checking this issue ;-)
    Niels

Reply Children
No Data