CampaignEventType Class

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

Describes an Event Type in the Marketing System.

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

Syntax

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

Remarks

This class cannot be publicly created. It is only accessible from the CampaignManager class. Events are recorded by the Record Event Pipeline component (Commerce.CSFRecordEvents) when it executes.

The Marketing System has some event types built in by default:

  • 'SOLD' events are recorded during the Accept Stage of the Checkout pipeline. (require the redirect page to be set up.)

  • 'CLICK' events are recorded when a user clicks on a displayed campaign item. (require the redirect page to be set up.)

  • 'DOWNLOAD' events are recorded when a user downloads an image or other content from the server.

  • 'REQUEST' events are recorded when a campaign item is requested by a site user.

The Record Event component only records Event Types that are defined in the system. If you have a custom event type that you want to be recorded, you should create and save a CampaignEventType for it.

The CampaignManager has methods for working with the CampaignEventType.

Examples

public static string InsertEventType(MarketingContext marketingSystem)
{
  CampaignManager cm = marketingSystem.Campaigns;
  CampaignEventType[] arr = cm.GetAllCampaignEventTypes();
  if (arr.Length > 0)
  {
    EventTypeName = arr[0].Name;
  }
  else
  {
    CampaignEventType eventType = cm.NewCampaignEventType();
    eventType.Name = "Schedulable";
    eventType.IsSchedulable = true;
    eventType.Save();
    EventTypeName = eventType.Name;
  }

  return EventTypeName;
}

Inheritance Hierarchy

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

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

CampaignEventType Members

Microsoft.CommerceServer.Marketing Namespace