Business users uses Marketing manager to perform CRUD operations. The operations can be on advertisements or discounts. When you perform any create operation, the newly added item will not be used unless the business user approves it (we have to refresh cache  too). When the user deletes any item, by default the item is moved to deleted items and if required the user can restore that item.

Marketing Screenshot

What if we need to delete all items from recycle bin? We don’t have option to delete items from recycle bin and I feel intentionally Microsoft didn’t give this feature to the business users.

So, the option is to run command line utility to delete these items (more work to application support engineer). The utility name is “PurgeCommerceData” and by default this executable is located at “C:\Program Files\Microsoft Commerce Server 2007\Tools”.

PurgeCommerceData takes three parameters.

  • First parameter is the site name.
  • Second Parameter is commerce stream. Use –b for basket purge, –p for purchase order purge, –c for categories, products and inventory SKUs purge and –m for marketing data purge.
  • third parameter is optional and it takes following options
    • -d <days>: This option can be used to purge data that have been unchanged in the last specified number of days. It works with basket, purchaser order or marketing data purge and
    • -n <name>: This option can be used to purge baskets with a specific name and it works with –b flag only.
    • -o : This option can be used to purge promotion codes for old discounts and works with –m flag only.
    • -s <status> : this option can be used to purge purchase order with specified status and works with –p flag only.

The below command can be used to purge all marketing data that was unchanged for past 14 days.

PurgeCommerceData StarterSite -m -d 14

If the operation is success then output will be “Success” else “Failure”.

Related Articles


If you like this post, please click on our sponsor advertisement.


Leave a Reply

Follow me on Google+
Add to circles

In 0 people's circles

Sign up for Newsletter