折扣
折扣 让您可以通过促销代码、自动优惠、免费送货或“买 X 送 Y”优惠来奖励购物者。
使用 DataEase,您可以:
- 一次上传创建数百个新代码。
- 批量更新规则、日期或组合设置。
- 快速删除过期优惠。
Shopify 折扣指南。
- 选择 CSV(适用于非常长的文本)或 Excel。
- 选择 Discount 作为实体。
- 选择字段,如 type、startsAt、codesCount 等。
- 运行任务并下载您的文件。
需要截图?请参阅导出指南。
command 列中支持的命令:CREATE、UPDATE、REPLACE、DELETE、IGNORE
支持的代码行 itemCommand:CREATE、UPDATE、MERGE、DELETE、IGNORE
- 获取示例表:Discount-import-sample.xlsx
- 填写行:
- type(DiscountCodeBasic、DiscountAutomaticBasic 等)是 CREATE 所需的。
- 每个代码在其自己的行中使用 itemCommand。
- 当 id 为空时,使用 handle 或 title 进行匹配。
- 在 DataEase 中映射列,上传并开始导入。
完整步骤:导入指南
注意
- 仅当包含列时,
startsAt/endsAt才会更改。recurringCycleLimit = 0表示订阅无限制。combinesWithShipping对于运费折扣是禁止的,并会引发错误。- Shopify 限制:5,000 个智能折扣和每个折扣 60 条规则。
4. 字段参考
Section titled “4. 字段参考”-
id— 折扣 ID(UPDATE、REPLACE、DELETE 所需)。 -
title— 商家和购物者看到的名称。 -
summary— 交易的详细描述(仅限管理员)。 -
shortSummary— summary 的简短版本。仅导出。 -
startsAt— 折扣开始生效的时间(ISO 8601)。 -
endsAt— 折扣到期的时间。使用null表示没有结束日期。 -
status— 当前状态:ACTIVE、SCHEDULED、EXPIRED。仅导出。 -
type— CREATE 时必需。之一:DiscountCodeBasic、DiscountAutomaticBasic、DiscountCodeBxgy、DiscountAutomaticBxgy、DiscountCodeFreeShipping、DiscountAutomaticFreeShipping。 -
code— 促销代码文本(仅适用于基于代码的折扣)。 -
itemCommand— 每个代码行的命令:CREATE、UPDATE、MERGE、DELETE、IGNORE。 -
discountClass— 控制折扣如何组合(订单、产品、运费)。自 Admin API 2026-07 起,一个折扣可以有多个类别;此列保留第一个。仅导出。 -
discountClasses— 折扣的所有类别,以逗号分隔(例如PRODUCT, ORDER)。仅导出。 -
codesCount— 与折扣关联的代码数量。仅导出。 -
command— 折扣的主要命令:CREATE、UPDATE、REPLACE、DELETE、IGNORE。
客户获取(奖励)
Section titled “客户获取(奖励)”-
customerGetsAllItems— 如果所有项目都获得奖励,则为true。 -
customerGetsCollectionHandle— 要奖励的集合的 handle。 -
customerGetsVariantsSku— 要奖励的变体 SKU。 -
customerGetsProductsHandle— 要奖励的产品 handle。 -
customerGetsPercentage— 折扣百分比(0 – 1)。例如:0.2= 20% 折扣。 -
customerGetsOnQuantity— 获得奖励的商品数量(BxGy)。 -
customerGetsAmountValue— 固定金额折扣(商店货币)。 -
customerGetsAmountAppliesOnEachItem—true表示将固定金额应用于每个项目;否则在项目间分摊。
客户购买(前提条件)
Section titled “客户购买(前提条件)”-
customerBuysAllItems— 如果任何项目都可以触发交易,则为true。 -
customerBuysCollectionHandle— 触发交易的集合。 -
customerBuysVariantsSku— 触发交易的变体 SKU。 -
customerBuysProductsHandle— 触发交易的产品 handle。 -
customerBuysAmount— 所需的最低消费。 -
customerBuysQuantity— 所需的最低数量。
-
combinesWithOrder— 如果此折扣与订单折扣结合,则为true。 -
combinesWithProduct— 如果此折扣与产品折扣结合,则为true。 -
combinesWithShipping— 如果此折扣与运费折扣结合,则为true。 -
appliesOncePerCustomer— 如果每位客户只能使用一次折扣,则为true。 -
usageLimit— 最大总使用次数(null= 无限制)。 -
customerSelectionAllCustomers— 如果所有购物者都可以使用折扣,则为true。 -
customerSelectionSegments— 允许或阻止的客户段 ID。 -
customerSelectionCustomers— 允许或阻止的特定客户 ID。 -
recurringCycleLimit— 对于订阅:交易适用的计费周期数(0 = 无限制)。 -
minimumQuantity— 应用折扣所需的购物车中最低商品数量。 -
minimumSubtotal— 应用折扣所需的购物车最低小计。 -
appliesOnOneTimePurchase— 如果适用于一次性商品,则为true。 -
appliesOnSubscription— 如果适用于订阅商品,则为true。 -
usesPerOrderLimit— 折扣在单个订单中可以应用的最大次数。 -
maximumShippingPrice— 仍然符合免费送货折扣的最高运费。 -
destinationSelectionAllCountries— 如果免费送货折扣覆盖所有国家,则为true。 -
destinationSelectionCountries— 符合条件的两字母国家代码。 -
destinationSelectionIncludeRestOfWorld— 如果未列出的国家也符合条件,则为true。
Metafields
Section titled “Metafields”metafields— 应用程序添加的额外字段。请参阅 Metafields 指南。
5. 过滤器
Section titled “5. 过滤器”-
Code— 查找包含特定代码的折扣。 -
CombinesWith— 按组合标志过滤(order_discounts、product_discounts、shipping_discounts)。 -
DiscountClass— 按类别过滤(订单、产品、运费)。 -
DiscountType— 按类型过滤(percentage、fixed_amount、bogo、free_shipping)。 -
Id— 按 id 导出单个折扣。 -
Method—code或automatic。 -
StartsAt— 活动开始日期范围。 -
EndsAt— 活动结束日期范围。 -
CreatedAt— 创建日期范围。 -
UpdatedAt— 最后更新日期范围。 -
Status— ACTIVE、EXPIRED、SCHEDULED。 -
TimesUsed— 最小或最大总使用次数。 -
Title— title 的部分匹配。
需要帮助吗?我们的支持团队会在 24 小时内回复。
DataEase 支持此实体的更多列:
hasTimelineComment— 指示折扣是否有时间线评论(布尔值)。totalSales— 折扣产生的总销售额(数值)。customerGetsAmountCurrencyCode— 客户收到的折扣金额的货币代码(ISO 4217)。