cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
30
Views
0
Helpful
0
Replies
Highlighted
Community Manager

How to create campaign in CCX through rest API's

I want to create a campaign through java language with the help of CCX rest API's. I have all the configuration right but somehow i am receiving 400 bad request error. Though i have send same request with same parameter through poster and it work perfectly fine.

Campaign campaign = new Campaign();

campaign.setCampaignName("Agentbasefromcode");

campaign.setDescription("Sample Campaign");

campaign.setEnabled(true);

campaign.setStartTime("00:00");

campaign.setEndTime("23-59");

campaign.setTimeZone("India Standard Time");

campaign.setCampaignType("AGENT");

campaign.setDialerType("DIRECT_PREVIEW");

campaign.setPendingContacts(0);

ObPreviewInfo obPreviewInfo=new ObPreviewInfo();

obPreviewInfo.setMaxDialAttempts(3);

obPreviewInfo.setCacheSize(20);

obPreviewInfo.setAnsMachineRetry(false);

obPreviewInfo.setCallbackTimeLimit(15);

obPreviewInfo.setMissedCallbackAction("NEXT_DAY");

NameUriPair applicationTrigger = new NameUriPair();

applicationTrigger.setName("5");

applicationTrigger.setRefURL("https://192.168.200.200:8443/adminapi/csq/5");

CsqList csqList=new CsqList();

csqList.getCsq().add(applicationTrigger);

obPreviewInfo.setAssignedCSQs(csqList);

CampaignTypeSpecificInfo specificInfo = new CampaignTypeSpecificInfo();

specificInfo.setObPreview(obPreviewInfo);

campaign.setTypeSpecificInfo(specificInfo);

wr.accept("Text/xml").entity(campaign, "Text/xml").post();

I am getting this error .

Capture.PNG

a quick help is much appreciated.

CreatePlease to create content
Ask the Expert- MPLS troubleshooting