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

Other Resources

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK