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

Use the CSFRecordEvent pipeline component to record event delta counts for the selected content items (the winners) in the Performance dictionary.

Intended use: Content Selection pipeline, Record stage; Order Processing pipeline, Accept stage.

Values Read

The CSFRecordEvent pipeline component reads the following values from the indicated dictionaries.






A string that contains the name of the event to record.



Specifically, the previous event delta count for the various content items.



A SimpleList Object that contains values from the item_id keys of the selected (winning) content items.

If this key is present, the _winnerindexes key should not be present. If both are present, only the_winnerindexeskey is used.



Optional. A SimpleList object that contains the number of events to record for each winning content item. It must contain the same number of elements as the _winners list.

One event is recorded for each winning item if this key is not present.



Optional. A SimpleList object that contains the ContentList Object indexes of the winning content items.

If this key is present, the _winners key should not be present. If both are present, only this key is used.



Optional. The item_id key for the various content items that are contained in the ContentList referenced by _content.

If the _content key is present, the referenced ContentList object must have a column nameditem_id.



A string that is the name of the current content cache.



Optional. The dictionary that contains the items that were retrieved from this cache.

Values Written

The CSFRecordEvent pipeline component writes the following values to the Order dictionary.




The Performance dictionary. This key will contain the new event delta counts for the various content items.


Optional. A Boolean flag for each item in the ContentList object. Set this key to True if the item must have the Need of Delivery (NOD) recalculated.


The following are the names of the predefined events for campaigns:

  • REQUEST. A content request event.

  • CLICK. A click event for an ad or a promotion.

  • DOWNLOAD. A download of a GIF image or other advertising asset from the Web server.

  • SOLD. An item sold event, such as for a promotion or bounty ad.

You can record custom events by creating new CampaignEventType objects by using the NewCampaignEventType method. The following code demonstrates how you can do this:

MarketingContext ctxt = MarketingContext.Create(@"http://localhost/MarketingWebService/MarketingWebService.asmx");
CampaignEventType et = ctxt.Campaigns.NewCampaignEventType();
et.Name = "MyEvent";
et.Description = "My Custom Event";
et.IsSchedulable = true;

This component flags whether the NOD values of the winning content items must be re-calculated. The flag is set to True if the Item dictionary has a NOD key and if the event name matches the type of event the item is scheduled by.

The NOD values can be recomputed if there is no ContentList object (when the _Contentkey is not present) if the _winners key is passed instead of the _winnerindexes key.

The Performance dictionary contains a sub-dictionary for each content item for which an event has occurred, keyed by the item_id key. Each sub-dictionary maps event names to a count of the number of new occurrences of that event. Periodically, the total in the database for each event for each content item will be incremented by this amount. The CSFRecordEvent pipeline component is responsible for creating keys in these dictionaries as needed and incrementing the corresponding values. The WriteEvents cache component is responsible for recording the increments in the running totals in the database.

See Also




Other Resources

Pipeline Component Reference