How to Create and Use Campaigns in Your Code
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
This topic discusses how to save and retrieve marketing customer, campaign, discount, promotion code, and direct mail information.
To create and access Customer information
You can create a new customer by using the NewCustomer method.
Access customer information by calling the GetCustomer method.
See a complete example that creates a customer (as part of creating a campaign) in topics in Campaign Concepts and Tasks.
To create and access Campaign information
You can create a new campaign by using the NewCampaign method.
Access campaign information by calling theGetCampaign method.
See a complete example that creates a campaign in topics in Campaign Concepts and Tasks.
To create and access Discount information
You can create a new discount by using theNewDiscount method.
Access discount information by calling the GetCampaignItem method.
For an example, see How to Create a Discount.
To use runtime Promotion Code information
- You can attach promotion codes to a Basket object during checkout. For an example, see How to Accept Promotion Codes for a Discount.
To create and access management Advertising information
You can create a new advertisement by using theNewAdvertisement method.
Access advertisement information by calling theGetCampaignItem method.
To use runtime Advertising information
You display advertisements by using the Content Selection Framework (CSF) pipeline classes.
When an advertisement is displayed to a customer and the customer clicks the advertisement, Commerce Server records the click-through in a database through event processing code in the Redir.aspx Web page. For more information, see What Is the Event Processing Pipeline?.
Advertisement goaling influences how often and how many ads are displayed. For more information, see What Is the Difference Between House and Paid Ads?.
For an example, see How to Display Targeted Advertisements.
To create and access Direct Mail information
You can create a new direct mail by using theNewDirectMail method.
Access direct mail information by calling theGetCampaignItem method.
See a complete example that creates a Direct Mail in How to Create a Direct Mail Item.