Modifying AB campaigns
To modify a specific AB campaign, you use the NewslettersManager class. The following code modifies an AB campaign with the specified new WinningCondition through the Native API.
public void ModifyABCampaign(Guid id, CampaignWinningCondition newWinningCondition)
{
NewslettersManager manager = NewslettersManager.GetManager();
ABCampaign abCampaign = manager.GetABCampaigns().Where(c => c.Id == id).SingleOrDefault();
if (abCampaign != null)
{
abCampaign.WinningCondition = newWinningCondition;
manager.SaveChanges();
}
}
First, you initialize the NewslettersManager. Then, you must get the specified AB campaign. Finally, you modify the winning condition and save the changes.
See Also