Create promocode product
shop_create_promocode_productCreate a promocode based on dedicated product to be applied before order payment. Guidance: Create a promocode based on dedicated product to be applied before order payment. | context: name, discount_type, value
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Code to use during checkout to apply discount If not, provided, it will be generated automatically with following formatXXXX-XXXX-XXXX | |
| name | Yes | Name of code to use during checkout to apply discount | |
| value | Yes | Value of the discount to applied during the checkout | |
| end_at | No | Datetime **until which** the code should be applied | |
| end_date | No | Alias for end_at. Set to 'none' for no expiration. | |
| max_uses | No | Number of max uses of the code | |
| start_at | Yes | Datetime **from which** the code should be applied | |
| max_price | No | If 'conditions' set to 'PRICE_RANGE', code can be applied order price is lower than this value | |
| min_price | No | If 'conditions' set to 'PRICE_RANGE', code can be applied order price is greater than this value | |
| conditions | No | Condition based on order details: - **NONE**: Code can be applied for any order conditions. - **PRICE_RANGE**: Code can be applied for order price conditions (check 'min_price' and 'max_price' fields). - **NUMBER_OF_PRODUCTS**: Code can be applied for order quantity conditions (check 'min_quantity' fields). | |
| product_id | Yes | Id of product from which the discount can be applied | |
| min_quantity | No | If 'conditions' set to 'NUMBER_OF_PRODUCTS', code can be applied order quantity is greater than this value | |
| discount_type | Yes | Type of discount you want to apply - **AMOUNT**: discount will be applied in the absolute value of the order. - **PERCENT**: discount will be applied in the relative value of the order | |
| one_use_by_user | No | If set to true, code can be applied once by customer or prospect. | |
| registered_only | No | If set to true, code can be applied only for registered user with your ecommerce. | |
| specific_registered_ids | No | List of ids of customers and leads who can applied code in case of specific_registered_only is set to True | |
| specific_registered_only | No | If set to true, code can be applied only for customers and prospect who have an account with your ecommerce. |