Partilhar via


Campaign Class

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Defines a Campaign object.

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
<ComVisibleAttribute(False)> _
Public NotInheritable Class Campaign _
    Inherits MarketingServices
'Usage
Dim instance As Campaign
[ComVisibleAttribute(false)]
public sealed class Campaign : MarketingServices
[ComVisibleAttribute(false)]
public ref class Campaign sealed : public MarketingServices
public final class Campaign extends MarketingServices

Remarks

Conceptually a Customer is the parent object of Campaign objects. Each Campaign object must be contained within a customer object.

Conceptually a Campaign object is the parent object of Discount objects. Each Discount must be contained within a Campaign.

A Campaign is a marketing program that represents one or more contracts or orders from a Customer. For example, you might have a campaign to introduce new products, retain existing users, or increase market share. You manage your campaigns to maximize the effect of ads, discounts, and direct mail.

You use Commerce Server campaigns to do the following:

  • Target advertisements or discounts to users who have a specific profile. You set up user profiles, and then integrate the profiles into a campaign. For each advertisement page, you can specify whether the profile for the user browsing that page should be considered for targeted content, or ignored.

  • Run campaigns for customers who compete in the same industry. The competing advertisements never appear on the same page.

  • Charge your advertisers based on the number of advertisement requests they want their advertisements to receive.

Examples

//get a sample campaign object

Campaign ca = GetSampleCampaign1(marketingSystem, cu.Id);

ca.Save(true);

marketingSystem.Campaigns.Activate(ca.Id, ca.LastModifiedDate);

public static Campaign GetSampleCampaign1(MarketingContext marketingSystem, int customerId)

{

// create a campaign for the customer

Campaign ca = marketingSystem.Campaigns.NewCampaign(customerId);

Guid name = Guid.NewGuid();

ca.Name = "Camp_" + name.ToString();

ca.StartDate = DateTime.Now;

ca.EndDate = DateTime.Now + TimeSpan.FromDays(14);

ca.Description = "The world will never be the same once this event begins.";

ca.EventTypeName = EventTypeName;

return ca;

}

Inheritance Hierarchy

System..::.Object
  Microsoft.CommerceServer.Marketing..::.MarketingServices
    Microsoft.CommerceServer.Marketing..::.Campaign

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Campaign Members

Microsoft.CommerceServer.Marketing Namespace