Try our conversational search powered by Generative AI!

Rework order statistics in Marketing UI to improve performance

Found in

EPiServer.Commerce 11.0.0

Fixed in

EPiServer.Commerce 13.16.0

(Or a related package)

Created

Nov 21, 2019

Updated

Dec 19, 2023

Area

Core

State

Closed, Acceptance tests pass


Description

The Marketing screen displays all campaigns. For each campaign, the screen displays

  • its discounts
  • the number of orders that use each discount
  • the total number of orders that include discounts

The collection of these statistics has been reworked to improve performance.

To use this optimization, you must run the new Commerce scheduled job Collect Order Per Promotion Statistics, which migrates your promotions system to the new optimization. If campaigns have too many orders, you may get a timeout exception when running that job. If you do, add an appSettings key named episerver:commerce.OrderPerPromotionReportDataTimeout, and set the timeout in seconds.

By default, this optimization ignores inactive and expired campaigns and promotions (although they are migrated along with active campaigns and promotions). If you want to force the refreshing of their data, add an appSettings key named episerver:commerce.ReportForInactivePromotionItems and set it to true.