Try our conversational search powered by Generative AI!

How to create a MultiSelect option in a CMS-12 Visitor-Group Criterion?

Vote:
 

In CMS-11 we were able to create multi-select options in visitor group criteria in this way:

[DojoWidget(WidgetType = "dijit.form.FilteringSelect", SelectionFactoryType = typeof(VisitorGroupEnumSelectionFactory<UserProfileSelectionType>))]
public UserProfileSelectionType SelectionType { get; set; }

[DojoWidget(WidgetType = "dijit.form.MultiSelect", SelectionFactoryType = typeof(DomicileSelectionFactory))]
public object[] Domiciles { get; set; }

[DojoWidget(WidgetType = "dijit.form.MultiSelect", SelectionFactoryType = typeof(VisitorGroupEnumSelectionFactory<VisitorGroup>))]
public object[] UserTypes { get; set; }

It looked so:

But in Optimizely(CMS 12) DojoWidget is deprecated and must be replaced with CriterionPropertyEditor. But how i can enable this multi-select option then?

Edit: If i use the deprecated way, i get an error in the UI:

No editor mapping for type: Corporate.Core.Content.Enums.CompanyBranch.Country[]
No editor mapping for type: Corporate.Salesforce.FinancialServiceCloud.Enums.VisitorGroup[]
the same if i simply use object[] which was working in CMS 11 by providing the WidgetType 
#313520
Edited, Dec 01, 2023 15:49
Vote:
 

It sounds like this may need rewriting into a custom visitor group criteria

Below is the link to the guide on how to do this

https://docs.developers.optimizely.com/content-management-system/docs/developing-custom-visitor-group-criteria

In the screenshot below, I drew a red line which is where a Javascript file can be attached in which would replicate the Dojo widget you have previously built 

Hope this helps or puts you in the right direction

#313567
Dec 02, 2023 16:37
Tim Schmelter - Dec 04, 2023 13:45
Thanks. We didn't implement a custom dojo widget, it was already builtin, so you just had to use the code that i have posted. It would be good if this could be added to the cms again after dojo is deprecated now. For now we will use different approaches, like adding multiple visitor-groups, one for each selection and use the visitor-group-membership criterion, to try to replicate the old behavior in this way. So that means we have to use dropdowns(single selection) instead of listboxes.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.