| David Messner [MSFT] 2004-03-01, 12:35 pm |
| Hi Jonathan,
I didn't realize how poorly documented this was. We made this a bit more
explicit in the .NET object model where the TargetingContext is a true
Profile object, but it's difficult to discover in COM. Sorry about that.
In fact, the CSO (ContentSelector object) is passed through the pipeline
and to the EvalTargetGroups component as the "ContextProfile" which is the
key name used to pass the profile known as "TargetingContext profile" in
the Business Desk.
CSO accepts arbitrary key/value pairs. You are reponsible for setting at
run-time all of the properties that you set up on the TargetingContext
profile at design time.
So, you should simply need a line like the following added to your sample:
CSO.SubscribesToHSI = True
HTH
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2004 Microsoft Corporation. All rights
reserved.
--------------------
From: jb_in_marietta@yahoo.com (jb_in_marietta@yahoo.com)
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: How do I make the content selection framework aware of a property
that has been added to the targeting context profile?
Date: 28 Jan 2004 15:10:48 -0800
Organization: http://groups.google.com
Lines: 54
Message-ID: <1b62740d.0401281510.65a719cd@posting.google.com>
NNTP-Posting-Host: 206.157.230.254
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1075331449 8470 127.0.0.1 (28 Jan 2004 23:10:49
GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 28 Jan 2004 23:10:49 +0000 (UTC)
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!po
stnews1.google.com!not-for-mail
Xref: cpmsftngxa07.phx.gbl
microsoft.public.commerceserver.campaigns_csf:2485
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
I am using Commerce Server 2002.
I have added a boolean property called "SubscribesToHSI" to the
Targeting Context profile. I have created a targeting
expression referencing this property, and I am using this expression
in an ad campaign.
Let's say that my application has ascertained that the value of
"SubscribesToHSI" is True. How do I make the
"Commerce.ContentSelector" object
aware of this value before I invoke its GetContent method?
Can someone please give me an actual code sample in classic ASP
(VBScript) demonstrating how to do this.
I have been through the newsgroups with a fine tooth comb, and I have
yet to find a concrete example.
Thanks in advance!
--Jonathan
Following is an example of the code I am using to retrieve the
content:
public function CoreGetAdContent()
Dim CSO, Ads
'Create a ContentSelector object.
Set CSO = Server.CreateObject("Commerce.ContentSelector")
CSO.NumRequested = 1
CSO.PageGroup = "Browse"
'---------------------------------------------------------------------
' PRESUMABLY I WILL BE SETTING A PROPERTY OF THE CSO OBJECT AT
THIS
' POINT TO INDICATE THAT "SubscribesToHSI" = True.
' UNFORTUNATELY, I HAVE BEEN UNABLE TO FIND AN EXAMPLE OF HOW
' TO DO THIS 
'---------------------------------------------------------------------
'Use the GetContent method to get some content. Use the dictionary
'previously created in the Global.asa file and referenced through
the
'Application collection.
Set Ads = CSO.GetContent(Application("CSFAdsContext"))
'Ads is a SimpleList containing the selected content.
'Write the content to the page, if any.
Set CoreGetAdContent = Ads
end function
|