Jaa


How to Reclaim Unused Promotion Codes

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

Users can add a promotion code to their basket, but might ultimately decide not to check out. This leaves the promotion code in a reserved state where no one can use it. To reclaim these abandoned codes, the reservations should expire at regular intervals. Commerce Server provides the ExpirePromoCodeReservations.exe command-line tool to reclaim abandoned promotion codes.

You can schedule the promotion code reservation task by using the Windows Task Scheduler service with the ExpirePromoCodeReservations command-line tool. The ExpirePromoCodeReservations tool uses the following syntax:

ExpirePromoCodeReservations.exe sitename

The sitename parameter is the name of your site. The tool reads the configuration settings for the site, including the connection string and the expiration time in minutes, and calls a stored procedure to update the promotion code history and transactions tables to time-out expired reservations.

You should schedule the task to run at an interval slightly less than the promotion code reservation expiration time. For example, if the promotion code reservation expiration time is set to 30 minutes (the default), you should set the recurrence to 20 minutes.

The promotion code reservation task contains the following details:

  • Location: <drive>:\Program Files\Microsoft Commerce Server 2007\Tools\ExpirePromoCodeReservations.exe

  • Usage: ExpirePromoCodeReservations.exe sitename

The promotion code reservation task does the following:

  • Takes the site name as a parameter.

  • Reads the configuration settings for the site, including connection string and expiration time, in minutes.

  • Removes the expired reservations.

Note

The task should be in the context of an account that has the appropriate privileges, for example, the Marketing Approver Authorization Manager role.

The guideline for the expiration interval is 10 minutes. The expiration interval should be less than the Promocode reservation expiration time campaigns site resource property.

You can schedule one task per site.

To schedule a promotion code reservation task

  1. Click Start, point to Settings, and then click ControlPanel.

  2. In the Control Panel, double-click Scheduled Tasks, and then double-click Add Scheduled Task.

  3. The Scheduled Task Wizard appears, which guides you through the steps to schedule the task.

See Also

Other Resources

How to Reclaim Unused Promotion Codes