Skip to content

About Discount

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

Genstore's discount system helps merchants create and manage promotional offers. It lets you define triggers, set discount rules, and control how customers save on purchases. This module handles everything from simple dollar-off deals to complex multi-product promotions.

Core Concepts

  • Discount: Price reduction configuration that can be set as a percentage or fixed amount
  • Trigger: Set of conditions that activate a discount, including:
    • Order Amount: Discount activates when order reaches specified amount.
    • Product Scope: Specific products or collections eligible for discount.
    • Usage Rules: Restrictions like user tier or usage limits.
  • Discount Types: Supported discount formats, such as order discounts or shipping fee reductions.

Core Features

  • Create Discount: Set up new discount rules and promotion configurations.
  • Update Discount: Modify existing discount rules and settings.
  • Delete Discount: Remove specified discount promotion.
  • Query Discount Details: Retrieve specific discount rules and settings.

WARNING

Review the impact on current orders before modifying active discounts, as changes affect pricing immediately.

Use Cases

  • Promotion Management: Operations teams can set up purchase discounts and free shipping rules, such as "$10 off orders over $100" or "Free shipping on orders over $100".
  • Discount Adjustment: Merchants can dynamically adjust discount strategies based on promotion performance.
  • Performance Analysis: Operations teams can review discount configurations and usage to evaluate promotion effectiveness.

Endpoints

EVENT discounts/update: Update discount

EVENT discounts/delete: Delete discount

EVENT discounts/create: Discount created

Discount Object

The discount includes a set of applicable conditions, specifying the circumstances under which the discount is triggered or activated, referred to as the discount trigger. Once the applicable conditions are met, the discount can be applied to product prices, shipping fees, or other charges. Additionally, you can configure details such as the discount name, start time, and end time.

Properties

discountobject
discount.
- Hide child properties
triggerobject
Trigger or conditions for the promotion activity.
+ Show child properties
discountsobject
The outcome of the discount.
+ Show child properties
namestring
Discount name.
startTimestring
Discount start time.
promotionTypeobject
Categories of the discount activity.
+ Show child properties
endTimestring
Discount end time.
discountIdnumber
Unique identification of discount.
bash
{
  "discount": {
    "promotionType": {
      "categoryType": "PRODUCT_DISCOUNT",
      "generateType": {
        "discountCode": "71NLIYCH",
        "generateDiscountType": "CODE_DISCOUNT"
      },
      "discountType": "PRICE_REDUCTION"
    },
    "discounts": {
      "discountValueType": "FIXED_AMOUNT_OFF",
      "value": "10"
    },
    "name": "My Discount Simple",
    "startTime": "2024-11-11T10:05:19.421Z",
    "trigger": {
      "buyConditionValue": "10",
      "scopeType": "SPECIFIC_PRODUCTS",
      "usageSetting": {
        "combinations": [
          "PRODUCT",
          "ORDER"
        ],
        "customerOneUse": "false",
        "customerScopeType": "ALL",
        "discountCodeUseCount": "11"
      },
      "collectionList": {
        "name": "Spring Collection",
        "id": "1027"
      },
      "buyConditionType": "MINIMUM_NO",
      "productList": [
        {
          "discountProductSkuLists": [
            {
              "id": "107362071756584"
            }
          ],
          "name": "shoes",
          "id": "102744478756584"
        }
      ]
    },
    "endTime": "2024-11-11T10:05:19.421Z",
    "discountId": "1234123"
  }
}

EVENT Update discount

updated discount message.

Access scope

Requires ANY of the following access scopes: write_discounts read_discounts

Topic

EVENT discounts/update 

Event Data

discountobject
discount.
- Hide child properties
triggerobject
Trigger or conditions for the promotion activity.
+ Show child properties
discountsobject
The outcome of the discount.
+ Show child properties
namestring
Discount name.
startTimestring
Discount start time.
promotionTypeobject
Categories of the discount activity.
+ Show child properties
endTimestring
Discount end time.
usageSettingobject
Advanced settings such as discount usage limits.
+ Show child properties
discountIdnumber
Unique identification of discount.
statusstring
Discount status. Enum: NOT_RUN - discount have not running; RUN - discount is running; TIME_OVER - discount is timeout.
json
{
  "discount": {
    "promotionType": {
      "categoryType": "PRODUCT_DISCOUNT",
      "generateType": {
        "discountCode": "71NLIYCH",
        "generateDiscountType": "CODE_DISCOUNT"
      },
      "discountType": "PRICE_REDUCTION"
    },
    "discounts": {
      "discountValueType": "FIXED_AMOUNT_OFF",
      "value": "10"
    },
    "name": "My Discount Simple",
    "usageSetting": {
      "combinations": [
        "PRODUCT",
        "ORDER"
      ],
      "customerOneUse": "false",
      "customerScopeType": "ALL",
      "discountCodeUseCount": "11"
    },
    "startTime": "2024-11-11T10:05:19.421Z",
    "trigger": {
      "buyConditionValue": "10",
      "scopeType": "SPECIFIC_PRODUCTS",
      "collectionList": {
        "name": "Spring Collection",
        "id": "1027"
      },
      "buyConditionType": "MINIMUM_NO",
      "productList": [
        {
          "discountProductSkuLists": [
            {
              "id": "107362071756584"
            }
          ],
          "name": "shoes",
          "id": "102744478756584"
        }
      ]
    },
    "endTime": "2024-11-11T10:05:19.421Z",
    "discountId": "11213267",
    "status": "NOT_RUN"
  }
}

EVENT Delete discount

deleted discount message.

Access scope

Requires ANY of the following access scopes: write_discounts read_discounts

Topic

EVENT discounts/delete 

Event Data

discountobject
discount.
- Hide child properties
triggerobject
Trigger or conditions for the promotion activity.
+ Show child properties
discountsobject
The outcome of the discount.
+ Show child properties
namestring
Discount name.
startTimestring
Discount start time.
promotionTypeobject
Categories of the discount activity.
+ Show child properties
endTimestring
Discount end time.
usageSettingobject
Advanced settings such as discount usage limits.
+ Show child properties
discountIdnumber
Unique identification of discount.
json
{
  "discount": {
    "promotionType": {
      "categoryType": "PRODUCT_DISCOUNT",
      "generateType": {
        "discountCode": "71NLIYCH",
        "generateDiscountType": "CODE_DISCOUNT"
      },
      "discountType": "PRICE_REDUCTION"
    },
    "discounts": {
      "discountValueType": "FIXED_AMOUNT_OFF",
      "value": "10"
    },
    "name": "My Discount Simple",
    "usageSetting": {
      "combinations": "[\"PRODUCT\", \"ORDER\"]",
      "customerOneUse": "false",
      "customerScopeType": "ALL",
      "discountCodeUseCount": "11"
    },
    "startTime": "2024-11-11T10:05:19.421Z",
    "trigger": {
      "buyConditionValue": "10",
      "scopeType": "SPECIFIC_PRODUCTS",
      "collectionList": {
        "name": "Spring Collection",
        "id": "1027"
      },
      "buyConditionType": "MINIMUM_NO",
      "productList": [
        {
          "discountProductSkuLists": [
            {
              "id": "107362071756584"
            }
          ],
          "name": "shoes",
          "id": "102744478756584"
        }
      ]
    },
    "endTime": "2024-11-11T10:05:19.421Z",
    "discountId": "4635231231"
  }
}

EVENT Discount created

create discount message

Access scope

Requires ANY of the following access scopes: write_discounts read_discounts

Topic

EVENT discounts/create 

Event Data

discountobject
discount.
- Hide child properties
triggerobject
Trigger or conditions for the promotion activity.
+ Show child properties
discountsobject
The outcome of the discount.
+ Show child properties
namestring
Discount name.
startTimestring
Discount start time.
promotionTypeobject
Categories of the discount activity.
+ Show child properties
endTimestring
Discount end time.
usageSettingobject
Advanced settings such as discount usage limits.
+ Show child properties
discountIdnumber
Unique identification of discount.
json
{
  "discount": {
    "promotionType": {
      "categoryType": "PRODUCT_DISCOUNT",
      "generateType": {
        "discountCode": "71NLIYCH",
        "generateDiscountType": "CODE_DISCOUNT"
      },
      "discountType": "PRICE_REDUCTION"
    },
    "discounts": {
      "discountValueType": "FIXED_AMOUNT_OFF",
      "value": "10"
    },
    "name": "My Discount Simple",
    "usageSetting": {
      "combinations": "[\"PRODUCT\", \"ORDER\"]",
      "customerOneUse": "false",
      "customerScopeType": "ALL",
      "discountCodeUseCount": "11"
    },
    "startTime": "2024-11-11T10:05:19.421Z",
    "trigger": {
      "buyConditionValue": "10",
      "scopeType": "SPECIFIC_PRODUCTS",
      "collectionList": {
        "name": "Spring Collection",
        "id": "1027"
      },
      "buyConditionType": "MINIMUM_NO",
      "productList": [
        {
          "discountProductSkuLists": [
            {
              "id": "107362071756584"
            }
          ],
          "name": "shoes",
          "id": "102744478756584"
        }
      ]
    },
    "endTime": "2024-11-11T10:05:19.421Z",
    "discountId": "134132412"
  }
}