Skip to main content

Scripting and REST API improvements

The following improvements to the ConSol CM API and REST API have been made.

Possibility to define the preselected tab (#661011)

It is now possible to define which tab of the Details section of the Web Client should be preselected when a user opens a case based its position in the workflow. This allows a more intuitive navigation experience by automatically opening the relevant tab, enhancing the workflow for users capturing step-by-step information.

The method setGroupProperty of the class WorkflowContextService is now supported when showing the Details section in the tabs mode, aligning it with the existing functionality in pills mode.

Use the following method in a workflow script to define the tab which is opened for cases which have passed this activity:

workflowApi.setGroupProperty("MyGroup", GroupPropertyType.VISIBLE, "open")
Defining multiple open tabs
  • Only one tab can be open at a time in tabs mode. If the open tab should change during the process, the best way is to close the previously open tab by using workflowApi.removeGroupProperty("MyGroup", GroupPropertyType.VISIBLE); first, and then open a new one.
  • Once a tab is set to open, it cannot be set to open again unless the group property is removed first by using workflowApi.removeGroupProperty("MyGroup", GroupPropertyType.VISIBLE);.

Support for colon as a field key separator for adding validation errors (#662701)

The addValidationError() method from the class WorkflowContextService, which is used for displaying validation messages next to data fields in the Web Client, has been enhanced to support group:field as a field key separator in addition to group.field. Therefore, you can now use the following syntax:

workflowApi.addValidationError("group:field", "Validation message")

Targeted news (#662783)

News which are created from case content using the method newsService.getNewsFromTicketEntries can now be filtered by the value of a case field. This allows to deliver targeted news to different groups of users.

For example, it is possible to show only the news which are relevant for their office location to the individual users in the Web Client or CM/Track by matching the value of an enum field from the news case with a value from the data of the logged-in user or contact.

A new signature which accepts an additional field parameter has been added to the method getNewsFromTicketEntries from the class NewsService for this purpose. It can be used as follows:

Set queues = ["Frequently_Asked_Questions"]
Set scopes = ["defaultScope/faq/published", "defaultScope/faq/new"]
Set textClasses =["Solution", "Problem_description"]
enumValue = enumService.getValueByName("countryEnumGroup", "germany")
Set<AbstractField> newsFields = Collections.singleton(new EnumField(new FieldKey("helpdesk_standard", "country"), enumValue))
return newsService.getNewsFromTicketEntries(queues, scopes, textClasses, newsFields)

The template which is inserted automatically when creating a new script of the type News in the Web Admin Suite has been updated with an example for using the additional filter.