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
| Type | How it works |
|---|---|
| PERCENT | Reduces the order total by a percentage (1–100%). |
| AMOUNT | Reduces the order total by a fixed amount in cents. |
Creating a Discount
- Click Create New in the Discounts section.
- Fill in the required fields:
| Field | Description |
|---|---|
| Code | The code customers enter at checkout (e.g., SAVE10). |
| Type | PERCENT or AMOUNT. |
| Percent | The percentage off (required when type is PERCENT). |
| Amount (cents) | The fixed discount in cents (required when type is AMOUNT). |
- Optionally configure scope and lifecycle settings (see below).
- Click Save.
Scope — Who and What the Discount Applies To
| Setting | Description |
|---|---|
| Applies to All | When enabled, the discount works for all products (default). |
| Product IDs | Restrict the discount to specific products. |
| Role IDs | Restrict the discount to customers holding specific Discord roles. |
| Customer IDs | Restrict the discount to specific customer records. |
Lifecycle — When and How Often
| Setting | Description |
|---|---|
| Is Active | Toggle the discount on or off. |
| Starts At | The date the discount becomes valid. |
| Ends At | The date the discount expires (must be after Starts At). |
| Usage Limit | Maximum number of times the discount can be used. |
Editing a Discount
- Click on the discount in the list.
- Update any fields.
- 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)
- Open Discount Assignments in the admin sidebar.
- Click Assign to customer.
- Fill in the fields:
| Field | Description |
|---|---|
| Discount ID | ID of the discount to assign. |
| Customer ID | ID of the customer to assign it to. |
| Rule | one_time, next_n, or forever. |
| Total Allowed | Required for one_time and next_n — number of uses allowed. |
| Expires At | Optional expiration date. |
- 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.