Skip to content

CustomSlabsBasedOnQuantity ​

Type: schema

TypeScript Definition ​

typescript
CustomSlabsBasedOnQuantity: {{
            /** @constant */
            spending_criteria_type: "minimum-quantity";
            products: {
                product_id: string | null;
                variant_id: string | null;
                /** @description The one slab that repeats when `auto_scale` is `true`. */
                slab?: {
                    buy_quantity: number;
                    get_quantity: number;
                    /** @enum {unknown} */
                    condition: "greater-or-equal";
                };
                /** @description The tiers, when `auto_scale` is `false`. */
                slabs?: {
                    buy_quantity: number;
                    get_quantity: number;
                    /** @enum {unknown} */
                    condition: "greater-or-equal";
                }[];
                /** @description `true` when the reward repeats for every multiple of `slab` the cart reaches; `false` when `slabs` sets each tier. */
                auto_scale?: boolean;
            }[];
        };
        /**
         * DateAttribute
         * @description Attribute for date values
         */
}

OpenAPI Schema ​

json
{
  "type": "object",
  "properties": {
    "spending_criteria_type": {
      "type": "string",
      "const": "minimum-quantity"
    },
    "products": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "product_id",
          "variant_id"
        ],
        "properties": {
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "variant_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "slab": {
            "description": "The one slab that repeats when `auto_scale` is `true`.",
            "type": "object",
            "properties": {
              "buy_quantity": {
                "type": "integer"
              },
              "get_quantity": {
                "type": "integer"
              },
              "condition": {
                "enum": [
                  "greater-or-equal"
                ]
              }
            },
            "required": [
              "buy_quantity",
              "get_quantity",
              "condition"
            ]
          },
          "slabs": {
            "description": "The tiers, when `auto_scale` is `false`.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "buy_quantity",
                "get_quantity",
                "condition"
              ],
              "properties": {
                "buy_quantity": {
                  "type": "integer"
                },
                "get_quantity": {
                  "type": "integer"
                },
                "condition": {
                  "enum": [
                    "greater-or-equal"
                  ]
                }
              }
            }
          },
          "auto_scale": {
            "description": "`true` when the reward repeats for every multiple of `slab` the cart reaches; `false` when `slabs` sets each tier.",
            "type": "boolean"
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/schemas/CustomSlabsBasedOnQuantity"
  },
  "required": [
    "spending_criteria_type",
    "products"
  ],
  "title": "CustomSlabsBasedOnQuantity"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: