Export subsets of promotion codes


We can configure the exporting unique promotion codes functionality of Management Center to export subsets of unused promotion codes.

By default, when using the Management Center Promotions tool to export promotion codes, all of the promotion codes for a promotion are exported. We can configure a store to limit the maximum number of unused promotion codes to export. To configure this limit, we must insert a record in the STORECONF table for the store. This record sets the maximum number of codes to include in a promotion code export for the store. This subset size is associated with a single store and only exports promotion codes that are not already used for the promotion.

When specifying a subset for a store, all subsequent promotion code exports use that subset to determine the number of unused codes to export. To export all promotion codes after you configure a subset, we must delete the subset configuration from the database, or change the subset value to -1. To change the number of promotion codes included in your subset, run a SQL update statement that changes the value field of your subset.


Procedure

  1. Open a connection to the database to run SQL statements into the database.

  2. Run the following SQL query:

      INSERT INTO STORECONF (STOREENT_ID, NAME, VALUE) values (StoreId, 'wc.promotion.NumberOfUnusedPromotionCodesToExport', 'NumberOfCodes');

    Where NumberOfCodes is the number of promotion codes to include in the subset of promotion codes.


Results

A subset configuration of promotion codes to export is created. When we select to export promotion codes with Management Center, the specified number of unused codes in the subset is exported. For more information about exporting promotion codes, see Exporting promotion codes.


Related tasks
Import promotion codes
Export promotion codes


Related reference
Simple system-generated unique promotion codes
Advanced system-generated unique promotion codes