create_discount_config
Create a reusable discount rule in Fakturia by defining percentage, applicable item types, and optional validity period for use in coupons or contracts.
Instructions
Create a new discount configuration in Fakturia. A discount configuration defines a reusable discount rule specifying the discount percentage, which item types it applies to (recurring, one-time, or specific items), and an optional validity period. Once created, the discount configuration can be referenced by coupon configurations or applied directly to contracts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"discountPercent": "<discountPercent>"
},
"name": "create_discount_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique name for the discount configuration. Used to reference this discount in coupon configurations and elsewhere. | |
| items | No | List of specific item numbers (SKUs) this discount applies to. Only relevant when useItems is true. | |
| useItems | No | Whether to restrict this discount to only the items specified in the items list. If false, the discount applies based on the applyRecurrItems and applyOneTimeItems flags instead. | |
| description | No | Human-readable description of the discount configuration explaining its purpose or conditions. | |
| projectName | No | Name of the project to associate this discount configuration with. | |
| validityUnit | No | Time unit for the validity period (e.g. "month", "year", "day"). Used together with validityPeriod. | |
| validityPeriod | No | Duration for which the discount remains valid after being applied. Used together with validityUnit to define the full validity window (e.g. 3 months). | |
| discountPercent | Yes | The discount percentage to apply (e.g. 10 for a 10% discount). Must be a positive number. | |
| applyRecurrItems | No | Whether this discount applies to recurring (subscription) items on the contract. | |
| applyOneTimeItems | No | Whether this discount applies to one-time items on the contract. | |
| createInvoicePosition | No | Whether to create a separate invoice line item (position) for the discount. If true, the discount appears as its own line on invoices rather than being applied inline. |