Issue creating virtual queue using SDK

Hi,
I am trying to create virtual queue using Genesys SDK.
The code I’m trying something like below; I don’t have the exact code.
(Please ignore syntax errors as this is written in notepad)

public void createVQ(string number)
{
//server parameters
confService.open();

CfgSwitchQuery cfgSwitch = new CfgSwitchQuery();
cfgSwitch.Name=“my_vq_switch”;
CfgSwitch switchName = confService.RetrieveObject(cfgSwitch);

                CfgDN vq=new CfgDN(Number=number, Switch=switchName);
				vq.Type=CfgDNType.CFGVirtACDQueue;
                vq.Save();
				}

I am getting parameter missing error from line vq.Save();

Could anyone tell me what are the issue with the above code and what all are the mandatory parameters I need to pass while creating create a virtual queue.

Thanks,
Sudipta

What is the new Vq name?

Enviado de meu E6633 usando Tapatalk

The vq name I am passing as ‘number’ variable.
I want to create a new vq with name say ‘test_vq_dev’;

Thanks for your reply,

Try to do a try{catch()}
You will see which mandatory parameters you are missing.

I think VQ must have an Alias (the property name in SDK is Name if I remember thar well)

Let him learn it by himself so next time he has the idea on how to fix it on his own :wink:

Enviado de meu E6633 usando Tapatalk

When I tested your code I got the error message “Mandatory property ‘routeType’ not set.”.

I tested with this code and it worked for me:

                CfgDN vq = new CfgDN(confService);
                vq.Number = "MyQueue";
                vq.Switch = switchName;
                vq.Type = CfgDNType.CFGVirtACDQueue;
                vq.RouteType = CfgRouteType.CFGDefault;
                vq.Save();