The client would like flexibility in generating Mailing Lists and so we would like to leverage Visitor Groups for this purpose.
The idea being that the client could create a visitor group with custom criteria such as "subscribed to newsletter" and then could retrieve the list of contacts that this visitor group applies to and then use that as the mailing list.
I have been able to create a IRecipientStore that lists all visitor groups as the RecipientContainer dropdown, however I cannot find a method in the API that allows me to retrieve the list of contacts that match the criterion of a Visitor Group.
I have found VisitorGroupHelper.IsPrincipalInGroup() but no corresponding VisitorGroupHelper.PrincipalsInGroup() method.
Is our approach feasible?
The number of commerce contacts is expected to be in the range 10s of thousands [i.e. 20,000]
Unfortunately Visitor Groups do not provide the type of funcationality that you require, so you'll want to take a different approach.
Visitor Groups work in such a way that when you check if the current visitor is in a particular VG the criteria defined in the VG get to decide if the visitor matches based on the current Principal and HttpContext objects.
Ie, they check whether a request matches certain criteria, there is no list of all visitors and their properties.
I was suspecting as much.