Skip to main content
Version: Latest
Technical ManualLooking for step-by-step instructions? In the User Manual: Commerce at a Glance

Running a Store

This page collects what an operator needs to run the commerce modules in production: which features make up each kind of store, what runs in the background, what to back up, what changes on several nodes, and which permissions to give store staff.

Features for each kind of store​

StoreFeaturesSample recipe
Goods you shipProducts, Product Listing, Carts, Orders, Customers, Inventory, Shipping, Checkout, a payment provider; optionally Taxation, Product Reviews and ReportsProduct listing: online store sample
Files to downloadProducts, Product Listing, Carts, Orders, Customers, Digital Downloads, Checkout, a payment providerDigital downloads sample
BothBoth setsThe online store sample, then the digital downloads sample

Customers matters for a digital store: its contact step asks a guest for the email the download links go to. Without it, a guest's order has no email.

The samples turn on no payment provider. Test payments (CrestApps.OrchardCore.Checkout.TestProvider) confirms every payment without moving money. It registers only in the Development environment unless CrestApps:Checkout:TestProvider:AllowOutsideDevelopment is true, so it can't be left on in production by accident.

Background tasks​

Each runs per tenant, on the schedule shown, while its feature is on.

TaskFeatureScheduleWhat it does
Checkout Payment ReconciliationCheckoutEvery 5 minutesAsks the provider about payment attempts still pending, so a payment whose webhook never arrived is still confirmed or failed.
Expired Carts CleanupCartsHourlyDeletes carts nobody changed within their lifetime.
Abandoned ordersOrdersEvery 15 minutesCancels unpaid orders whose checkout was canceled, failed, expired or never started,
Expired stock holdsInventoryEvery 5 minutesReleases stock held for orders not paid before the hold expired.
Customer data retentionCustomersDaily at 03:30Erases inactive guests' personal data and anonymizes old guest orders, per Settings > Commerce > Customers.
Product Search IndexingProductsEvery minuteRebuilds the product search records when product types or their attributes change.
Pay Later RenewalsPay LaterEvery 30 minutesCreates the next balance for recurring Pay Later commitments.
Transaction Payment RemindersTransactionsEvery 6 hoursSends reminders for outstanding balances.

They can be paused, rescheduled or run under Configuration > Tasks (feature OrchardCore.BackgroundTasks).

What to back up​

  • The tenant's database. Orders, carts, customers, coupons and their uses, stock and its movements, shipments, download rights and reviews are all documents in it.
  • The digital files. Digital Downloads keeps files outside the database and the media library, in App_Data/Sites/{tenant}/DigitalFiles/{fileId}/{fileName}. A restored database without this folder has download rights to files that are gone.
  • The data protection keys. Download links and guest order links are signed with the tenant's data protection keys, not stored. With new keys, every link already emailed stops working. Resending an order's confirmation from its page sends links that work again.

Several nodes​

On a web farm, every node must see the same locks, cache, files and keys:

  • Turn on the Redis features (OrchardCore.Redis, OrchardCore.Redis.Lock, OrchardCore.Redis.Cache, OrchardCore.Redis.Bus). Checkout finalization, webhook handling, coupon uses, order numbers and download counts are all decided under IDistributedLock. Without a shared lock, two nodes can both take a coupon's last use or a file's last download.
  • Share the DigitalFiles folder, for example with a network share mounted at App_Data, or every node only serves the files uploaded through it.
  • Share the data protection keys (for example with OrchardCore.Redis.DataProtection or the Azure data protection feature), or a link signed on one node fails on the others.

Throttling​

WhatLimitWhere it is counted
Cart forms (POST cart/add, cart/update, cart/remove)The Cart group of Orchard Core's Rate Limits featureIts configuration
Starting a payment and checking its status20 attempts per 5 minutes per client address and checkout (PaymentRateLimitOptions)The distributed cache, per tenant
Entering coupon codesThe same limit, per client addressThe distributed cache, per tenant
Looking up a guest orderThe same limit, per client address and per emailThe distributed cache, per tenant

Counts are kept per tenant, so a busy tenant never throttles another, even with a shared cache.

Tenant isolation​

Every commerce record is a document in the tenant's own database, and digital files sit in the tenant's own folder. A coupon used up on one tenant is still available on another, a download link signed by one tenant names nothing on another, and throttling counts never cross tenants.

Permissions for store staff​

PermissionFeatureFor
Manage ordersOrdersSeeing every order, and refunding, canceling, annotating and resending them
View own ordersOrdersCustomers, for My Orders
Ship orders and update their shipmentsShippingWarehouse staff
Manage shipping zones, methods and settingsShippingWhoever sets shipping prices
Manage inventory / View inventoryInventoryReceiving and counting stock / looking it up
Manage customers / View customersCustomersCustomer service
Manage own customer profile and addressesCustomersCustomers
Manage couponsCheckoutMarketing
Manage digital files and downloadsDigital DownloadsUploading files, and taking back or giving back downloads
Moderate product reviewsProduct ReviewsApproving reviews
Review products boughtProduct ReviewsCustomers (signed-in users have it)
Manage taxationTaxationWhoever sets tax rates and the store's origin