|
Home > Archive > Content Selection Framework > March 2005 > Promotion coupon status
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Promotion coupon status
|
|
| Michael Hampel 2005-02-24, 5:52 pm |
| Hi
I have been trying to implement coupon functionality using Commerce
Server FP1 and I am having a problem with the status values for the
promotion codes that are returned after the basket pipeline has run. I
have followed the example in the Commerce server help files by adding
the 2 additional components to the basket pipeline and using the code
as my template.
I have created a discount using discount manager and assigned a public
coupon to the discount and I have then set the expiry date for the
promotion to sometime in the past so that when the pipeline has
executed I would expect a status code of 3 to be returned.
If I look at a dump of the basket or look at the pipeline log the
promo_code_status only ever returns a value of 0 or 1 and this is what
is reflected in the application.
Are you aware of anything else I should be doing so that the correct
status value is returned?
Thanks
Michael
| |
| David Messner [MSFT] 2005-02-25, 2:50 am |
|
[Michael] I have then set the expiry date for the promotion to sometime in
the past
The query that CSFLoadDiscounts uses to load the discounts into the
discounts cache won't load discounts that have expired. So it's likely
that the discount isn't even loaded and considered. You can tell by
setting pipeContext.[_trace_discounts] = true before the discount and
promocode pipeline components execute and capturing the pipeline log.
Is there some scenario in which you really need to know that there is an
expired discount that was previously active and associated with the
promotion code?
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2005 Microsoft Corporation. All rights
reserved.
--------------------
From: michael@hampel.fsnet.co.uk (Michael Hampel)
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Promotion coupon status
Date: 24 Feb 2005 09:01:24 -0800
Organization: http://groups.google.com
Lines: 25
Message-ID: <a03d5ce8.0502240901.2c2f1b3a@posting.google.com>
NNTP-Posting-Host: 195.40.123.5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1109264484 30708 127.0.0.1 (24 Feb 2005
17:01:24 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 24 Feb 2005 17:01:24 +0000 (UTC)
Path:
TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fas
twebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.c
om!not-for-mail
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.commerceserver.campaigns_csf:3070
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
Hi
I have been trying to implement coupon functionality using Commerce
Server FP1 and I am having a problem with the status values for the
promotion codes that are returned after the basket pipeline has run. I
have followed the example in the Commerce server help files by adding
the 2 additional components to the basket pipeline and using the code
as my template.
I have created a discount using discount manager and assigned a public
coupon to the discount and I have then set the expiry date for the
promotion to sometime in the past so that when the pipeline has
executed I would expect a status code of 3 to be returned.
If I look at a dump of the basket or look at the pipeline log the
promo_code_status only ever returns a value of 0 or 1 and this is what
is reflected in the application.
Are you aware of anything else I should be doing so that the correct
status value is returned?
Thanks
Michael
| |
| Michael Hampel 2005-02-25, 2:50 am |
| A scenario is that there is a coupon associated with a discount and
this code has been distributed to users as part of a marketing
campaign. The discount has then expired but the user still enters the
coupon code not knowing the discount has expired.
What your saying is that the discount would never be loaded as it has
expired so does this mean that the promo_code_status would never be
set to expired? And if that is the case I cant check for the expired
status of a coupon. And this means that I can't distinguish between a
coupon associated with an expired discount and a coupon that has been
input but no products that apply to the discount have been added to
the basket.
Michael
davidme@online.microsoft.com (David Messner [MSFT]) wrote in message news:<Hp4pfluGFHA.2412@TK2MSFTNGXA02.phx.gbl>...
> ------=_NextPart_0001_5199C734
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
>
>
> [Michael] I have then set the expiry date for the promotion to sometime in
> the past
>
> The query that CSFLoadDiscounts uses to load the discounts into the
> discounts cache won't load discounts that have expired. So it's likely
> that the discount isn't even loaded and considered. You can tell by
> setting pipeContext.[_trace_discounts] = true before the discount and
> promocode pipeline components execute and capturing the pipeline log.
>
> Is there some scenario in which you really need to know that there is an
> expired discount that was previously active and associated with the
> promotion code?
>
> -djm
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2005 Microsoft Corporation. All rights
> reserved.
>
> --------------------
> From: michael@hampel.fsnet.co.uk (Michael Hampel)
> Newsgroups: microsoft.public.commerceserver.campaigns_csf
> Subject: Promotion coupon status
> Date: 24 Feb 2005 09:01:24 -0800
> Organization: http://groups.google.com
> Lines: 25
> Message-ID: <a03d5ce8.0502240901.2c2f1b3a@posting.google.com>
> NNTP-Posting-Host: 195.40.123.5
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 8bit
> X-Trace: posting.google.com 1109264484 30708 127.0.0.1 (24 Feb 2005
> 17:01:24 GMT)
> X-Complaints-To: groups-abuse@google.com
> NNTP-Posting-Date: Thu, 24 Feb 2005 17:01:24 +0000 (UTC)
> Path:
> TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fas
> twebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.c
> om!not-for-mail
> Xref: TK2MSFTNGXA02.phx.gbl
> microsoft.public.commerceserver.campaigns_csf:3070
> X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
>
> Hi
>
> I have been trying to implement coupon functionality using Commerce
> Server FP1 and I am having a problem with the status values for the
> promotion codes that are returned after the basket pipeline has run. I
> have followed the example in the Commerce server help files by adding
> the 2 additional components to the basket pipeline and using the code
> as my template.
>
> I have created a discount using discount manager and assigned a public
> coupon to the discount and I have then set the expiry date for the
> promotion to sometime in the past so that when the pipeline has
> executed I would expect a status code of 3 to be returned.
>
> If I look at a dump of the basket or look at the pipeline log the
> promo_code_status only ever returns a value of 0 or 1 and this is what
> is reflected in the application.
>
> Are you aware of anything else I should be doing so that the correct
> status value is returned?
>
>
> Thanks
>
> Michael
>
> ------=_NextPart_0001_5199C734
> Content-Type: text/x-rtf
> Content-Transfer-Encoding: 7bit
>
> & #123;\rtf1\ansi\ansicpg1252\deff0\deflan
g1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
> \viewkind4\uc1\pard\f0\fs20
> \par [Michael] I have then set the expiry date for the promotion to sometime in the past
> \par
> \par The query that CSFLoadDiscounts uses to load the discounts into the discounts cache won't load discounts that have expired. So it's likely that the discount isn't even loaded and considered. You can tell by setting pipeContext.[_trace_discounts]
= true before the discount and promocode pipeline components execute and capturing the pipeline log.
> \par
> \par Is there some scenario in which you really need to know that there is an expired discount that was previously active and associated with the promotion code?
> \par
> \par -djm
> \par --
> \par This posting is provided "AS IS" with no warranties, and confers no rights.
> \par You assume all risk for your use. 'a9 2005 Microsoft Corporation. All rights
> \par reserved.
> \par
> \par \pard\li720 --------------------
> \par From: michael@hampel.fsnet.co.uk (Michael Hampel)
> \par Newsgroups: microsoft.public.commerceserver.campaigns_csf
> \par Subject: Promotion coupon status
> \par Date: 24 Feb 2005 09:01:24 -0800
> \par Organization: http://groups.google.com
> \par Lines: 25
> \par Message-ID: <a03d5ce8.0502240901.2c2f1b3a@posting.google.com>
> \par NNTP-Posting-Host: 195.40.123.5
> \par Content-Type: text/plain; charset=ISO-8859-1
> \par Content-Transfer-Encoding: 8bit
> \par X-Trace: posting.google.com 1109264484 30708 127.0.0.1 (24 Feb 2005 17:01:24 GMT)
> \par X-Complaints-To: groups-abuse@google.com
> \par NNTP-Posting-Date: Thu, 24 Feb 2005 17:01:24 +0000 (UTC)
> \par Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!not-for-mail
> \par Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.campaigns_csf:3070
> \par X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
> \par
> \par Hi
> \par
> \par I have been trying to implement coupon functionality using Commerce
> \par Server FP1 and I am having a problem with the status values for the
> \par promotion codes that are returned after the basket pipeline has run. I
> \par have followed the example in the Commerce server help files by adding
> \par the 2 additional components to the basket pipeline and using the code
> \par as my template.
> \par
> \par I have created a discount using discount manager and assigned a public
> \par coupon to the discount and I have then set the expiry date for the
> \par promotion to sometime in the past so that when the pipeline has
> \par executed I would expect a status code of 3 to be returned.
> \par
> \par If I look at a dump of the basket or look at the pipeline log the
> \par promo_code_status only ever returns a value of 0 or 1 and this is what
> \par is reflected in the application.
> \par
> \par Are you aware of anything else I should be doing so that the correct
> \par status value is returned?
> \par
> \par
> \par Thanks
> \par
> \par Michael
> \par \pard
> \par
> \par }
> ------=_NextPart_0001_5199C734--
| |
| Ravi Shankar 2005-03-03, 2:51 am |
| If you go through the COmmerce Server FP1 Documentation and search for
"Implementing Promotion Codes" then that page describes the values returned
post running the basket pipeline. There is a field such as "Status" which has
more detailed values to resolve your problem.
"Michael Hampel" wrote:
> A scenario is that there is a coupon associated with a discount and
> this code has been distributed to users as part of a marketing
> campaign. The discount has then expired but the user still enters the
> coupon code not knowing the discount has expired.
> What your saying is that the discount would never be loaded as it has
> expired so does this mean that the promo_code_status would never be
> set to expired? And if that is the case I cant check for the expired
> status of a coupon. And this means that I can't distinguish between a
> coupon associated with an expired discount and a coupon that has been
> input but no products that apply to the discount have been added to
> the basket.
>
> Michael
>
> davidme@online.microsoft.com (David Messner [MSFT]) wrote in message news:<Hp4pfluGFHA.2412@TK2MSFTNGXA02.phx.gbl>...
] = true before the discount and promocode pipeline components execute and capturing the pipeline log.[vbcol=seagreen]
>
| |
| David Messner [MSFT] 2005-03-21, 5:59 pm |
|
You could change this behavior by modifying the
[dbo].[mktg_spRuntimeLoadDiscounts] stored procedure.
Notice in the current WHERE clause, it has the following:
DATEADD(Week, -1, ci.dt_campitem_start) <= GETDATE() AND
ci.dt_campitem_end >= GETDATE()
You can use a similar DATEADD clause to go ahead and continue to load
discounts that have expired.
Question for you - how far into the future do you think the component
should continue to load expired discounts? Is a month sufficient?
Thanks and regards
-djm
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2005 Microsoft Corporation. All rights
reserved.
--------------------
From: michael@hampel.fsnet.co.uk (Michael Hampel)
Newsgroups: microsoft.public.commerceserver.campaigns_csf
Subject: Re: Promotion coupon status
Date: 25 Feb 2005 00:58:23 -0800
Organization: http://groups.google.com
Lines: 153
Message-ID: <a03d5ce8.0502250058.24419be9@posting.google.com>
References: <a03d5ce8.0502240901.2c2f1b3a@posting.google.com>
<Hp4pfluGFHA.2412@TK2MSFTNGXA02.phx.gbl>
NNTP-Posting-Host: 195.40.123.5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1109321903 25518 127.0.0.1 (25 Feb 2005
08:58:23 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 25 Feb 2005 08:58:23 +0000 (UTC)
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
sul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!not-for-mail
Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.commerceserver.campaigns_csf:3075
X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
A scenario is that there is a coupon associated with a discount and
this code has been distributed to users as part of a marketing
campaign. The discount has then expired but the user still enters the
coupon code not knowing the discount has expired.
What your saying is that the discount would never be loaded as it has
expired so does this mean that the promo_code_status would never be
set to expired? And if that is the case I cant check for the expired
status of a coupon. And this means that I can't distinguish between a
coupon associated with an expired discount and a coupon that has been
input but no products that apply to the discount have been added to
the basket.
Michael
davidme@online.microsoft.com (David Messner [MSFT]) wrote in message
news:<Hp4pfluGFHA.2412@TK2MSFTNGXA02.phx.gbl>...
> ------=_NextPart_0001_5199C734
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
>
>
> [Michael] I have then set the expiry date for the promotion to sometime
in
> the past
>
> The query that CSFLoadDiscounts uses to load the discounts into the
> discounts cache won't load discounts that have expired. So it's likely
> that the discount isn't even loaded and considered. You can tell by
> setting pipeContext.[_trace_discounts] = true before the discount and
> promocode pipeline components execute and capturing the pipeline log.
>
> Is there some scenario in which you really need to know that there is an
> expired discount that was previously active and associated with the
> promotion code?
>
> -djm
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. © 2005 Microsoft Corporation. All
rights
> reserved.
>
> --------------------
> From: michael@hampel.fsnet.co.uk (Michael Hampel)
> Newsgroups: microsoft.public.commerceserver.campaigns_csf
> Subject: Promotion coupon status
> Date: 24 Feb 2005 09:01:24 -0800
> Organization: http://groups.google.com
> Lines: 25
> Message-ID: <a03d5ce8.0502240901.2c2f1b3a@posting.google.com>
> NNTP-Posting-Host: 195.40.123.5
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 8bit
> X-Trace: posting.google.com 1109264484 30708 127.0.0.1 (24 Feb 2005
> 17:01:24 GMT)
> X-Complaints-To: groups-abuse@google.com
> NNTP-Posting-Date: Thu, 24 Feb 2005 17:01:24 +0000 (UTC)
> Path:
>
TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fas
>
twebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.c
> om!not-for-mail
> Xref: TK2MSFTNGXA02.phx.gbl
> microsoft.public.commerceserver.campaigns_csf:3070
> X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
>
> Hi
>
> I have been trying to implement coupon functionality using Commerce
> Server FP1 and I am having a problem with the status values for the
> promotion codes that are returned after the basket pipeline has run. I
> have followed the example in the Commerce server help files by adding
> the 2 additional components to the basket pipeline and using the code
> as my template.
>
> I have created a discount using discount manager and assigned a public
> coupon to the discount and I have then set the expiry date for the
> promotion to sometime in the past so that when the pipeline has
> executed I would expect a status code of 3 to be returned.
>
> If I look at a dump of the basket or look at the pipeline log the
> promo_code_status only ever returns a value of 0 or 1 and this is what
> is reflected in the application.
>
> Are you aware of anything else I should be doing so that the correct
> status value is returned?
>
>
> Thanks
>
> Michael
>
> ------=_NextPart_0001_5199C734
> Content-Type: text/x-rtf
> Content-Transfer-Encoding: 7bit
>
>
& #123;\rtf1\ansi\ansicpg1252\deff0\deflan
g1033{\fonttbl{\f0\fnil\fprq2\fcharset0
MS Sans Serif;}}
> \viewkind4\uc1\pard\f0\fs20
> \par [Michael] I have then set the expiry date for the promotion to
sometime in the past
> \par
> \par The query that CSFLoadDiscounts uses to load the discounts into the
discounts cache won't load discounts that have expired. So it's likely
that the discount isn't even loaded and considered. You can tell by
setting pipeContext.[_trace_discounts] = true before the discount and
promocode pipeline components execute and capturing the pipeline log.
> \par
> \par Is there some scenario in which you really need to know that there
is an expired discount that was previously active and associated with the
promotion code?
> \par
> \par -djm
> \par --
> \par This posting is provided "AS IS" with no warranties, and confers no
rights.
> \par You assume all risk for your use. 'a9 2005 Microsoft Corporation.
All rights
> \par reserved.
> \par
> \par \pard\li720 --------------------
> \par From: michael@hampel.fsnet.co.uk (Michael Hampel)
> \par Newsgroups: microsoft.public.commerceserver.campaigns_csf
> \par Subject: Promotion coupon status
> \par Date: 24 Feb 2005 09:01:24 -0800
> \par Organization: http://groups.google.com
> \par Lines: 25
> \par Message-ID: <a03d5ce8.0502240901.2c2f1b3a@posting.google.com>
> \par NNTP-Posting-Host: 195.40.123.5
> \par Content-Type: text/plain; charset=ISO-8859-1
> \par Content-Transfer-Encoding: 8bit
> \par X-Trace: posting.google.com 1109264484 30708 127.0.0.1 (24 Feb 2005
17:01:24 GMT)
> \par X-Complaints-To: groups-abuse@google.com
> \par NNTP-Posting-Date: Thu, 24 Feb 2005 17:01:24 +0000 (UTC)
> \par Path:
TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fas
twebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!postnews.google.c
om!not-for-mail
> \par Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.commerceserver.campaigns_csf:3070
> \par X-Tomcat-NG: microsoft.public.commerceserver.campaigns_csf
> \par
> \par Hi
> \par
> \par I have been trying to implement coupon functionality using Commerce
> \par Server FP1 and I am having a problem with the status values for the
> \par promotion codes that are returned after the basket pipeline has run.
I
> \par have followed the example in the Commerce server help files by adding
> \par the 2 additional components to the basket pipeline and using the code
> \par as my template.
> \par
> \par I have created a discount using discount manager and assigned a
public
> \par coupon to the discount and I have then set the expiry date for the
> \par promotion to sometime in the past so that when the pipeline has
> \par executed I would expect a status code of 3 to be returned.
> \par
> \par If I look at a dump of the basket or look at the pipeline log the
> \par promo_code_status only ever returns a value of 0 or 1 and this is
what
> \par is reflected in the application.
> \par
> \par Are you aware of anything else I should be doing so that the correct
> \par status value is returned?
> \par
> \par
> \par Thanks
> \par
> \par Michael
> \par \pard
> \par
> \par }
> ------=_NextPart_0001_5199C734--
|
|
|
|
|