Skip to main content

Discount Management

The Discounts section lets you create and manage discount codes that customers can apply to their orders.

Prerequisites

  • Admin access to the Ledgerline Admin Panel.

Types of Discounts

TypeHow it works
PERCENTReduces the order total by a percentage (1–100%).
AMOUNTReduces the order total by a fixed amount in cents.

Creating a Discount

  1. Click Create New in the Discounts section.
  2. Fill in the required fields:
FieldDescription
CodeThe code customers enter at checkout (e.g., SAVE10).
TypePERCENT or AMOUNT.
PercentThe percentage off (required when type is PERCENT).
Amount (cents)The fixed discount in cents (required when type is AMOUNT).
  1. Optionally configure scope and lifecycle settings (see below).
  2. Click Save.

Scope — Who and What the Discount Applies To

SettingDescription
Applies to AllWhen enabled, the discount works for all products (default).
Product IDsRestrict the discount to specific products.
Role IDsRestrict the discount to customers holding specific Discord roles.
Customer IDsRestrict the discount to specific customer records.

Lifecycle — When and How Often

SettingDescription
Is ActiveToggle the discount on or off.
Starts AtThe date the discount becomes valid.
Ends AtThe date the discount expires (must be after Starts At).
Usage LimitMaximum number of times the discount can be used.

Editing a Discount

  1. Click on the discount in the list.
  2. Update any fields.
  3. Click Save.

Deactivating a Discount

Set Is Active to false to immediately stop the discount from being applied to new orders. Existing orders that already used the discount are not affected.

Deleting a Discount

To permanently remove a discount, open its detail view and click Delete. Discounts referenced by existing orders should be deactivated rather than deleted to preserve order history.

Discount Assignments

You can assign a discount directly to a specific customer so it is applied automatically without them needing to enter a code.

Assigning a Discount (Admin Panel)

  1. Open Discount Assignments in the admin sidebar.
  2. Click Assign to customer.
  3. Fill in the fields:
FieldDescription
Discount IDID of the discount to assign.
Customer IDID of the customer to assign it to.
Ruleone_time, next_n, or forever.
Total AllowedRequired for one_time and next_n — number of uses allowed.
Expires AtOptional expiration date.
  1. Click Save.

If an assignment already exists for the same customer and discount, it will be updated in place.

Assigning a Discount (Discord)

Use the /discount-assign command:

/discount-assign discountId:<id> customerId:<id> rule:one_time totalAllowed:1

Revoking an Assignment

To revoke an assignment via the Admin Panel, open it and click Revoke.

To revoke via Discord:

/discount-revoke assignmentId:<id>

Revoking is a soft-delete — it sets the expiration to the past. The assignment record is preserved for audit purposes.