文档中心 > 开放平台

营销活动进阶指南

更新时间:2016/11/18 访问次数:11951

营销活动信息详细介绍

营销活动创建请求报文主要包含活动基础信息(如活动名称,开始/结束时间等),活动预算,活动约束信息,营销工具集合,投放渠道集合和招商工具这几个部分。如下图:

营销活动信息:

参数名称 类型 必填 描述

out_biz_no

String(32)

外部业务流水号

operator_id

String(32)

操作人ID,服务商代商家创建活动时需传入

operator_type

String(32)

操作人类型,目前支持以下类型:

PROVIDER:服务商

PROVIDER_STAFF:服务商员工

name

String(32)

活动名称

start_time

String(20)

活动开始时间

格式yyyy-MM-dd HH:mm:ss

如,2016-05-01 00:00:00

end_timte

String(20)

活动结束时间

格式yyyy-MM-dd HH:mm:ss

如,2016-05-01 23:59:59

type

String(20)

活动类型,目前支持以下类型:

CONSUME_SEND:消费送活动

DIRECT_SEND:直发奖活动

REAL_TIME_SEND:立减类活动

GUESS_SEND:口令送活动

desc

String(32)

活动详细说明

如,用于挽回流失用户

budget_info

BudgetInfo

活动预算信息,如果不设置则无预算上限

constraint_info

ConstraintInfo

活动的约束信息

promo_tools

PromoTool[]

营销工具集合

最少配置1个营销工具

最多配置5个营销工具

publish_channels

PublishChannel[]

活动投放渠道配置

直发奖类活动必须配置投放渠道

recruit_tool

RecruitTool

招商工具配置

预算信息(budget_info)

参数名称 类型 必填 描述

 budget_type

String(16)

预算类型,目前支持以下类型:

QUANTITY:数量类型

 budget_total

String(64)

预算数量

必须为合法整数类型字符串,如10258;表示活动可发券数量为10258

活动约束信息(constraint_info)

参数名称 类型 必填 描述

user_win_count

String(20)

活动期间用户能够参与的次数限制

如果不设置则不限制参与次数

user_win_frequency

String(32)

活动期间用户能够参与的频率限制

如果不设置则不限制参与频率

每日中奖1次: D||1

每周中奖2次: W||2

每月中奖3次: M||3

crowd_group_id

String(32)

人群规则组ID

仅直发奖类型活动设置有效

suit_shops

String[]

活动适用的门店列表

仅品牌商发起的招商活动可为空

最多支持10w家门店

min_cost

String(32)

最低消费金额,单位元

仅在创建消费送礼包活动时设置

item_ids

String[500]

单品码列表

仅在创建消费单品送活动时设置,最多设置500个单品码

营销工具集合(promo_tools) - 列表型,最多定义5个营销券

参数名称 类型 必填 描述

voucher_no

String(32)

优惠券ID

创建营销活动时无需设置

voucher

Voucher

优惠券

send_rule

SendRule

发奖规则

point_card

PointCard

集点卡工具

优惠券(voucher)

参数名称 类型 必填 描述

type

Sting(10)

券类型,目前支持以下类型:

EXCHANGE:兑换券

MONEY:代金券

REDUCETO:换购券

RATE:折扣券

注:如活动类型为口令送券,优惠券仅支持代金券类型

name

String(40)

券名称/商品名称

注:口碑卡包内展示的券名称将由口碑进行拼接。
对于全场券本字段仅作为商家管理使用;
对于单品券本字段作为单品券对应的商品名称传入;

卡券包内券名称规则为:
全场代金券 —— #券面额#元代金券,如5元代金券
全场折扣券 —— #折扣率#折,如8.8折
单品代金券 —— #本字段##券面额#元代金券,如牛奶5元代金券
单品折扣券 —— #本字段##折扣率#折券,如牛奶8.8折券
单品换购券 —— #换购现价#元#本字段#换购券,如5元牛奶换购券
兑换券 —— #本字段#,如剁椒鱼头兑换券

desc

String(500)

券详细说明

最多包含500个字符

brand_name

String(20)

商家品牌名称

use_instructions

String[6]

券的使用说明

使用须知最多6条,且每条最多100字

logo

String(32)

券LOGO文件ID

voucher_img

String(32)

券图片资源ID

rate

String(10)

折扣率

仅当券类型为折扣券时有效

有效折扣率取值范围0.11-0.99

仅允许保留小数点后两位

max_amount

String(10)

最高优惠金额,单位元

必须为合法金额类型字符串

worth_value

String(10)

券面额,单位元

必须为合法金额类型字符串

券类型为代金券、换购券时,券面额必须设置

单品换购券的券面额必须低于单品原价

donate_flag

String(10)

券是否可转赠,默认为可转赠

validate_type

String(10)

券有效期类型,目前支持以下类型:

RELATIVE:相对有效期

FIXED:绝对有效期

start_time

String(32)

券有效期的开始时间

仅在券有效期类型为绝对有效期时生效

end_time

String(32)

券有效期的结束时间

仅在券有效期类型为绝对有效期时生效

relative_time

String(10)

券相对有效期,单位天

仅在券有效期类型为相对有效期时生效

如,设5表示领券领取后5日内有效

ext_info

String(1024)

扩展信息,无需设置

item_info

ItemInfo

单品信息

兑换券不允许设置单品信息

换购券必须设置单品信息

其他类型券可按需设置

use_rule

UseRule

券的使用限制

effective_type

String(10)

券生效的方式,目前支持以下方式

立即生效:IMMEDIATELY

延迟生效:DELAY

仅在券有效期类型为相对有效期时生效

delay_info

DelayInfo

延迟生效配置

仅在券生效的方式为延迟生效时有效

display_config

DisplayConfig

专属优惠券展示配置

clause_terms

ClauseTerm

券的说明条款

集点卡工具(point_card)

参数名称 类型 必填 描述
type String

工具类型,目前支持: 集点卡:POINT_CARD

name String

集点卡

desc

String

集点卡的功能描述

start_time

Date

2016-05-01 00:00:00

end_time

Date

2016-10-01 00:00:00

logo

String

工具的LOGO文件ID

单品信息 (item_info)

参数名称 类型 必填 描述

item_text

String(500)

单品券说明

item_name

String(40)

单品名称

item_imgs

String[3]

单品图片列表

单品图片不能超过3张

item_link

String(1024)

单品券详细介绍跳转链接,必须以http://,https://,alipays://开头

original_price

String(64)

单品的原价,单位元

换购券必须包含单品原价

必须为合法金额类型字符串,如9.99

max_discount_num

String(32)

最高优惠商品件数
必须为合法整数类型字符串

在券类型为折扣券,换购券时设置有效

min_consume_num

String(32)

最低购买商品件数
必须为合法整数类型字符串

在券类型为折扣券,换购券时设置有效

item_ids

String[500]

券适用的单品码列表

最少配置1个单品码

最多配置500个单品码

优惠券使用限制 (use_rule)

参数名称 类型 必填 描述

use_time

Object[]

券可用时间区间

dimension

String(32)

券可用时段时间维度,目前支持周(W)

values

String(64)

券可用时间维度值

周维度的取值范围1-7(周一至周日),多个可用时段用逗号分隔

如"1,3,5",对应周一,周三,周五可用

times

String(1024)

券可用时间段

可用时间段起止时间用逗号分隔,多个时间段之间用^分隔

如, "16:00:00,20:00:00^21:00:00,22:00:00"表示16点至20点,21点至22点可用

时间段不可重叠

forbidden_time

Object

券的不可用时间

days

String(1024)

不可用日期区间,仅支持到天

不可用区间起止日期用逗号分隔,多个区间之间用^分隔

如"2016-05-01,2016-05-03^2016-10-01,2016-10-07"表示2016年5月1日至5月3日,10月1日至10月7日券不可用

suit_shops

String[]

券适用门店列表

仅品牌商发起的招商活动可为空

直发奖类型活动必须与活动适用门店一致

最多支持10w家门店

min_consume

String(20)

否 

券核销的最低消费门槛,单位元

ext_info

String(1024)

扩展属性,无需设置

延迟生效配置(delay_info)

参数名称 类型 必填 描述

type

String(32)

延迟类型,目前支持以下类型

ABSOLUTELY:按绝对值延迟

BYDAY:按天延迟

value

String(32)

延迟值,单位分钟
按绝对值延迟延迟24*60 (1天)表示,当日08:00:00领到的券要到隔日的08:00:00才能使用
按天延迟延迟24*60(1天)表示,当日08:00:00领到的券,隔日00:00:00点就可以用;

专属优惠券展示配置(display_config)

参数名称 类型 必填 描述

slogan

String(20)

券的宣传语

含圈人的直领活动,且投放渠道选择了支付成功页或店铺的情况下必填

slogan_img

String(32)

券的宣传图片文件ID

含圈人的直领活动,且投放渠道选择了店铺的情况下必填

券的说明条款(clause_terms)

参数名称 类型 必填 描述

title

String(32)

券说明标题

descriptions

String(64)

券说明描述

投放渠道集合(publish_channel)

参数名称 类型 必填 描述

type

String(32)

渠道类型,目前支持以下类型
QR_CODE:二维码投放
SHORT_LINK:短连接投放
SHOP_DETAIL:店铺页投放
PAYMENT_RESULT:支付成功页
MERCHANT_CROWD:口令

口令渠道与其他渠道互斥

name

String(32)

渠道名称

config

String(1024)

若渠道为口令渠道,需要配置口令,背景图两个字段;

口令内容:即用户领券时需要输入的口令内容,最多10个字符;

示例:\"PASSWORD\":\"12345\",

背景图片:即用户输入口令后领券页面的背景图片,建议尺寸1136*640;此处传入的是图片资源ID。

示例:\"BACKGROUND_LOGO\":\"1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC\"

ext_info

Strng(1024)

扩展信息,无需配置

招商工具(recruit_tool)

参数名称 类型 必填 描述

start_time

String(32)

招商开始时间

如,2016-06-06 12:00:00

end_time

String(32)

招商结束时间

如,2016-07-06 12:00:00

pid_shops

PidShop[]

招商邀约信息列表

招商邀约信息列表(pid_shops)

参数名称 类型 必填 描述

pid

String(32)

邀约商家PID

shop_ids

String[]

邀约商家门店列表

通知参数说明

字段 是否可用 描述

event_code

事件类型 EC-CAMPAIGN_PROCESS-CAMPAIGN_SYNCH:活动同步

id

活动ID

type

活动类型 DIRECT_SEND:直领 CONSUME_SEND:消费送

status

活动状态,ENABLED:生效,DISABLED:无效,STARTED:启动,CLOSED:停止,

audit_status

AUDITING=审核中 REJECT=审核驳回 PASS=审核通过 CANCEL=审核撤销

order_id

订单ID

order_status

INIT=初始 DOING=处理中 SUCCESS=成功 FAIL=失败

order_process_time

订单处理时间 yyyy-MM-dd HH:mm:ss

order_audit_status

订单审批状态

order_type

 是

CREATE="创建" ENABLE="生效" START="启动" CLOSE="关闭"

business_order

是 

mnotify业务单号,可以填入任何格式的内容,只要执行回查的业务系统认识即。

trade_no

 是

支付宝交易流水号

out_trade_no

是 

外部交易号

merchant_uid

是 

发生交易商户ID

 buyer_id

是 

买家用户ID 

 alipay_shop_id

是 

交易门店ID 

total_amount

是 

交易总金额 

buyer_pay_amount

是 

买家实付金额

receipt_amount

是 

卖家实收金额

gmt_payment

是 

支付完成时间

goods_info_list

是 

交易的商品信息

isv_out_biz_id

是 

isv用于幂等控制的外部业务号

voucher_id

是 

ID

线上通知实例如下:

http://[ISV_NOTIFY_URL]?name=消费送&id=20161118000000000256856000151249&order_type=CREATE&sign=IuOu2dS5OfHomv1DBY4t1r//8yzGU/nJchdKJXQr8/AzMW6MmMg20jcudW6Q3eo9G/Urt7bii3Dmo4AJvMug0Uvge12WPwE9rWxkN473wn6vCa8bNLXcXJnui46LvwqPKYTghVt+43cL6y5VBWd9r1FjPhh/mcO0vaT7fyGlU6c=&order_process_time=2016-11-18 11:18:43&status=STARTED&event_code=EC-CAMPAIGN_PROCESS-CAMPAIGN_SYNCH&order_status=SUCCESS&order_id=20161118000000000932714000155246

优惠券和营销场景示例

券有效期与生效方式:

券有效期为相对有效期且领取后立即生效:

{
    "start_time":"2016-04-25",
    "end_time":"2016-05-03",
    "voucher":{
        "validate_type":"RELATIVE",
        "relative_time":"7",
        "effect_type":" IMMEDIATELY ",
        ...
    }
}

说明:2016-04-25至2016-05-03活动期间获得的券,获取后即刻可用,自获取之刻起7日内有效

券有效期为相对有效期且领取后延迟生效:

{
    "start_time":"2016-04-25",
    "end_time":"2016-05-03",
    "voucher":{
        "validate_type":"RELATIVE",
        "relative_time":"7",
        "effect_type":" DELAY",
        "delay_info":{
            "type":$type,
            "value":"1440"
        },
        ...
    }
}

说明:
2016-04-25至2016-05-03活动期间获得的券:
$type=ABSOLUTELY时,
表示2016-05-02 08:00:00 获得到的券,在2016-05-03 08:00:00-2016-05-09 23:59:59 期间可用
$type=BYDAY时,
表示2016-05-02 08:00:00 获得到的券,在2016-05-03 00:00:00-2016-05-09 23:59:59 期间可用

返回目录

各类型的券示例:

  • 兑换券
{
    "voucher": {
        "type": "EXCHANGE",
        "name": "摩卡咖啡兑换券",
        "brand_name": "口碑",
        "logo": "fVMQYs-pSAqgu5b3VveEHQAAACMAAQED",
        "voucher_img": "qRsTxYZARh-8gJdwCJzHBwAAACMAAQED",
        "donate_flag": "true",
        "validate_type": "RELATIVE",
        "relative_time": "5",
        "use_rule": {
            "use_time": [
                {
                    "dimension": "W",
                    "values": "1,2,3,4,5",
                    "times": "00:00:00,20:00:00"
                },
                {
                    "dimension": "W",
                    "values": "6,7",
                    "times": "16:00:00,21:59:59"
                }
            ],
            "forbidden_time": {
                "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
            },
            "suit_shops": [
                "2016052300077000000015602594"
            ],
            "ext_info": ""
        },
        "effect_type": "IMMEDIATELY",
        "desc": "券的详细说明",
        "use_instructions": [
            "使用须知1",
            "使用须知2"
        ],
        "display_config": {
            "slogan": "摩卡咖啡1",
            "slogan_img": "OlGZU2H-QIyEop4xLFYCOwAAACMAAQED"
        },
        "ext_info": ""
    }
}

字段示意:


返回目录

  • 全场代金券
{
    "voucher": {
        "type": "MONEY",
        "name": "5元代金券",
        "brand_name": "口碑",
        "logo": "fVMQYs-pSAqgu5b3VveEHQAAACMAAQED",
        "voucher_img": "qRsTxYZARh-8gJdwCJzHBwAAACMAAQED",
        "worth_value": "5",
        "donate_flag": "true",
        "validate_type": "RELATIVE",
        "relative_time": "30",
        "use_rule": {
            "use_time": [
                {
                    "dimension": "W",
                    "values": "1,2,3,4,5",
                    "times": "10:00:00,14:00:00"
                }
            ],
            "min_consume": "20",
            "forbidden_time": {
                "days": "2016-06-28,2016-06-30"
            },
            "suit_shops": [
                "2016052300077000000015602594"
            ],
            "ext_info": ""
        },
        "effect_type": "IMMEDIATELY",
        "desc": "券的详细说明",
        "use_instructions": [
            "使用须知1",
            "使用须知2"
        ],
        "ext_info": ""
    }
}

字段示意:


返回目录

  • 全场折扣券:
{
    "voucher": {
        "type": "RATE",
        "name": "全场折扣展示",
        "brand_name": "口碑",
        "logo": "fVMQYs-pSAqgu5b3VveEHQAAACMAAQED",
        "voucher_img": "qRsTxYZARh-8gJdwCJzHBwAAACMAAQED",
        "rate": "0.78",
        "donate_flag": "true",
        "validate_type": "RELATIVE",
        "relative_time": "7",
        "max_amount": "10",
        "use_rule": {
            "use_time": [
                {
                    "dimension": "W",
                    "values": "1,2,3,4,5",
                    "times": "00:00:00,23:59:59"
                }
            ],
            "forbidden_time": {
                "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
            },
            "suit_shops": [
                "2016052300077000000015602594"
            ],
            "min_consume": "20",
            "ext_info": ""
        },
        "effect_type": "IMMEDIATELY",
        "desc": "券的详细说明",
        "use_instructions": [
            "使用须知1",
            "使用须知2"
        ],
        "display_config": {
            "slogan": "摩卡咖啡券1",
            "slogan_img": "OlGZU2H-QIyEop4xLFYCOwAAACMAAQED"
        },
        "ext_info": ""
    }
}

字段示意:


返回目录

  • 单品折扣券
{
    "voucher": {
        "type": "RATE",
        "name": "摩卡咖啡",
        "brand_name": "口碑",
        "logo": "fVMQYs-pSAqgu5b3VveEHQAAACMAAQED",
        "voucher_img": "qRsTxYZARh-8gJdwCJzHBwAAACMAAQED",
        "rate": "0.7",
        "donate_flag": "true",
        "validate_type": "FIXED",
        "start_time": "2016-05-01 00:00:00",
        "end_time": "2016-10-01 00:00:00",
        "relative_time": "",
        "use_rule": {
            "use_time": [
                {
                    "dimension": "W",
                    "values": "1,2,3,4,5",
                    "times": "00:00:00,22:00:00"
                },
                {
                    "dimension": "W",
                    "values": "6,7",
                    "times": "20:00:00,22:00:00"
                }
            ],
            "forbidden_time": {
                "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
            },
            "suit_shops": [
                "2016052300077000000015602594"
            ],
            "ext_info": ""
        },
        "effect_type": "IMMEDIATELY",
        "delay_info": {
            "type": "ABSOLUTELY",
            "value": "10000"
        },
        "desc": "商品描述,商品描述",
        "use_instructions": [
            "使用须知1",
            "使用须知2"
        ],
        "display_config": {
            "slogan": "摩卡咖啡1",
            "slogan_img": "OlGZU2H-QIyEop4xLFYCOwAAACMAAQED"
        },
        "ext_info": "",
        "item_info": {
            "item_text": "券使用商品描述",
            "item_name": "",
            "max_discount_num": "1",
            "min_consume_num": "2",
            "item_ids": [
                "123",
                "342"
            ]
        }
    }
}

字段示意:


返回目录

  • 单品代金券
{
    "voucher": {
        "type": "MONEY",
        "name": "摩卡咖啡",
        "brand_name": "口碑",
        "logo": "fVMQYs-pSAqgu5b3VveEHQAAACMAAQED",
        "voucher_img": "qRsTxYZARh-8gJdwCJzHBwAAACMAAQED",
        "worth_value": "3",
        "min_consume": "10",
        "donate_flag": "true",
        "validate_type": "FIXED",
        "start_time": "2016-05-01 00:00:00",
        "end_time": "2016-10-01 00:00:00",
        "relative_time": "",
        "use_rule": {
            "use_time": [
                {
                    "dimension": "W",
                    "values": "1,2,3,4,5",
                    "times": "00:00:00,22:00:00"
                }
            ],
            "forbidden_time": {
                "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-07"
            },
            "suit_shops": [
                "2016052300077000000015602594"
            ],
            "min_consume": "10",
            "ext_info": ""
        },
        "effect_type": "IMMEDIATELY",
        "delay_info": {
            "type": "ABSOLUTELY",
            "value": "10000"
        },
        "desc": "适用商品描述",
        "use_instructions": [
            "使用须知1",
            "使用须知2"
        ],
        "ext_info": "",
        "item_info": {
            "item_text": "适用商品描述",
            "item_name": "",
            "item_ids": [
                "123",
                "342"
            ]
        }
    }
}

字段示意:


返回目录

  • 单品换购券
{
    "voucher": {
        "type": "REDUCETO",
        "name": "摩卡咖啡",
        "brand_name": "口碑",
        "logo": "fVMQYs-pSAqgu5b3VveEHQAAACMAAQED",
        "voucher_img": "qRsTxYZARh-8gJdwCJzHBwAAACMAAQED",
        "worth_value": "3",
        "donate_flag": "true",
        "validate_type": "FIXED",
        "start_time": "2016-05-01 00:00:00",
        "end_time": "2016-10-01 00:00:00",
        "relative_time": "",
        "use_rule": {
            "use_time": [
                {
                    "dimension": "W",
                    "values": "1,2,3,4,5",
                    "times": "00:00:00,22:00:00"
                }
            ],
            "forbidden_time": {
                "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-07"
            },
            "suit_shops": [
                "2016052300077000000015602594"
            ],
            "ext_info": ""
        },
        "effect_type": "IMMEDIATELY",
        "delay_info": {
            "type": "ABSOLUTELY",
            "value": "10000"
        },
        "desc": "适用商品描述",
        "use_instructions": [
            "使用须知1",
            "使用须知2"
        ],
        "ext_info": "",
        "item_info": {
            "item_text": "适用商品描述",
            "item_name": "",
            "original_price": "5",
            "max_discount_num": "1",
            "min_consume_num": "2",
            "item_ids": [
                "123",
                "342"
            ]
        }
    }
}

字段示意:


返回目录

消费送券活动设置示例:

  • 消费阶梯送活动
{
    "biz_content": {
        "out_biz_no": " jieti-0000000000001",
        "name": "代金券",
        "start_time": "2016-05-01 00:00:00",
        "end_time": "2016-08-12 00:00:00",
        "type": "CONSUME_SEND",
        "desc": "该活动是消费阶梯送活动",
        "budget_info": {
            "budget_type": "QUANTITY",
            "budget_total": "10258"
        },
        "constraint_info": {
            "user_win_count": "100",
            "user_win_frequency": "D||3",
            "crowd_group_id": "",
            "suit_shops": [
                "2015122900077000000002409504"
            ]
        },
        "promo_tools": [
            {
                "voucher": {
                    "type": "MONEY",
                    "name": "10元代金券",
                    "brand_name": "口碑",
                    "logo": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "voucher_img": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "worth_value": "10.0",
                    "donate_flag": "true",
                    "validate_type": "FIXED",
                    "start_time": "2016-05-01 00:00:00",
                    "end_time": "2016-09-11 00:00:00",
                    "relative_time": "",
                    "use_rule": {
                        "use_time": [
                            {
                                "dimension": "W",
                                "values": "1,3,5",
                                "times": "16:00:00,18:00:00^19:00:00,22:00:00"
                            }
                        ],
                        "forbidden_time": {
                            "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
                        },
                        "suit_shops": [
                            "2015122900077000000002409504"
                        ],
                        "min_consume": "100",
                        "ext_info": ""
                    },
                    "effect_type": "IMMEDIATELY",
                    "desc": "券的详细说明",
                    "ext_info": ""
                },
                "send_rule": {
                    "min_cost": "100",
                    "send_num": "2"
                }
            },
            {
                "voucher": {
                    "type": "MONEY",
                    "name": "20元代金券",
                    "brand_name": "口碑",
                    "logo": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "voucher_img": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "worth_value": "20.0",
                    "donate_flag": "true",
                    "validate_type": "FIXED",
                    "start_time": "2016-05-01 00:00:00",
                    "end_time": "2016-09-11 00:00:00",
                    "relative_time": "",
                    "use_rule": {
                        "use_time": [
                            {
                                "dimension": "W",
                                "values": "1,3,5",
                                "times": "16:00:00,18:00:00^19:00:00,22:00:00"
                            }
                        ],
                        "forbidden_time": {
                            "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
                        },
                        "suit_shops": [
                            "2015122900077000000002409504"
                        ],
                        "min_consume": "100",
                        "ext_info": ""
                    },
                    "effect_type": "IMMEDIATELY",
                    "desc": "券的详细说明",
                    "ext_info": ""
                },
                "send_rule": {
                    "min_cost": "200",
                    "send_num": "4"
                }
            }
        ],
        "ext_info": ""
    }
}

返回目录

  • 消费送礼包活动
{
    "biz_content": {
        "out_biz_no": "gift-package-00001",
        "name": "代金券",
        "start_time": "2016-05-01 00:00:00",
        "end_time": "2016-08-12 00:00:00",
        "type": "CONSUME_SEND",
        "desc": "该活动是消费送券礼包",
        "budget_info": {
            "budget_type": "QUANTITY",
            "budget_total": "10258"
        },
        "constraint_info": {
            "min_cost": "100",
            "user_win_count": "100",
            "user_win_frequency": "D||3",
            "crowd_group_id": "",
            "suit_shops": [
                "2015122900077000000002409504"
            ]
        },
        "promo_tools": [
            {
                "voucher": {
                    "type": "MONEY",
                    "name": "20元代金券",
                    "brand_name": "口碑",
                    "logo": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "voucher_img": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "worth_value": "20.0",
                    "donate_flag": "true",
                    "validate_type": "FIXED",
                    "start_time": "2016-05-01 00:00:00",
                    "end_time": "2016-09-11 00:00:00",
                    "relative_time": "",
                    "use_rule": {
                        "use_time": [
                            {
                                "dimension": "W",
                                "values": "1,3,5",
                                "times": "16:00:00,18:00:00^19:00:00,22:00:00"
                            }
                        ],
                        "forbidden_time": {
                            "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
                        },
                        "suit_shops": [
                            "2015122900077000000002409504"
                        ],
                        "min_consume": "100",
                        "ext_info": ""
                    },
                    "effect_type": "IMMEDIATELY",
                    "desc": "券的详细说明",
                    "ext_info": ""
                },
                "send_rule": {
                    "send_num": "4"
                }
            },
            {
                "voucher": {
                    "type": "EXCHANGE",
                    "name": "全场兑换元券-hhe001",
                    "brand_name": "口碑",
                    "max_amount": "1",
                    "logo": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "voucher_img": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "donate_flag": "true",
                    "validate_type": "FIXED",
                    "start_time": "2016-05-01 00:00:00",
                    "end_time": "2016-10-01 00:00:00",
                    "relative_time": "",
                    "use_rule": {
                        "use_time": [
                            {
                                "dimension": "W",
                                "values": "1,3,5",
                                "times": "16:00:00,17:00:00^19:00:00,22:00:00"
                            }
                        ],
                        "forbidden_time": {
                            "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"
                        },
                        "suit_shops": [
                            "2015122900077000000002409504"
                        ],
                        "min_consume": "100",
                        "ext_info": ""
                    },
                    "effect_type": "IMMEDIATELY",
                    "desc": "券的详细说明",
                    "ext_info": ""
                },
                "send_rule": {
                    "send_num": "2"
                }
            }
        ]
    }
}

返回目录

  • 口令送券活动
{
    "biz_content": {
        "out_biz_no": "jinfan_sit_create_33321054000022",
        "name": "口令送券活动",
        "start_time": "2016-09-01 00:00:00",
        "end_time": "2016-09-21 00:00:00",
        "type": "GUESS_SEND",
        "desc": " 这是口令送券活动示意 ",
        "budget_info": {
            "budget_type": "QUANTITY",
            "budget_total": "10258"
        },
        "constraint_info": {
            "user_win_count": "999999",
            "user_win_frequency": "D||100",
            "suit_shops": [
                "2015122900077000000002409504"
            ]
        },
        "promo_tools": [
            {
                "voucher": {
                    "type": "MONEY",
                    "name": "专属5元代金券",
                    "brand_name": "这是品牌名称",
                    "logo": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "voucher_img": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC",
                    "max_amount": "200",
                    "worth_value": "20",
                    "donate_flag": "true",
                    "validate_type": "FIXED",
                    "start_time": "2016-09-01 00:00:00",
                    "end_time": "2016-11-02 00:00:00",
                    "display_config": {
                        "slogan": "券标语slogan",
                        "slogan_img": "1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC"
                    },
                    "use_rule": {
                        "use_time": [{
                            "dimension": "W",
                            "values": "1,3,5",
                            "times": "16:00:00,20:00:00^21:00:00,22:00:00"
                        }],
                        "forbidden_time": {
                            "days": "2016-03-03,2016-03-08^2016-10-01,2016-10-01"                 
                        },
                        "suit_shops": [
                            "2015122900077000000002409504"
                        ],
                        "min_consume": "10",
                        "ext_info": ""
                    },
                    "effect_type": "IMMEDIATELY",
                    
                    "desc": " 券的详细说明 ",
                    "clause_terms": [
                        {
                            "descriptions": [
                                "xx1",
                                "xx2"
                            ],
                            "title": "XXX1"
                        },
                        {
                            "descriptions": [
                                "xx3",
                                "xx4"
                            ],
                            "title": "XXX2"
                        }
                    ],
                    "ext_info": "",
                    "item_info": {
                        "item_text": "item_yuchi",
                        "item_name": "item_name_yuchi",
                        "original_price": "20",
                        "max_discount_num": "2",
                        "min_consume_num": "1",
                        "item_ids": [
                            "2015101000076000000002236213",
                            "2015101000076000000002252927"
                        ]
                    }
                },
               
            }
        ],
        "publish_channels": [
            {
                "name": "channel1",
                "type": "MERCHANT_CROWD",
                "config":"{\"PASSWORD\":\"rrrr121010\",\"BACKGROUND_LOGO\":\"1T8Pp00AT7eo9NoAJkMR3AAAACMAAQEC\"}"
            }
        ],
        "ext_info": "",
    }
}

返回目录

优惠券核销规则说明

通过营销活动发放的优惠券,如何跟当面付接口结合将优惠券核销掉可以参考下面的说明:

      1. 当券指定门店时,当面付接口中STORE_ID传入字段,必须和券适用门店的门店ID匹配。注:当面付中传入的是外部门店号,券接口中传入的是内部门店号,两者需要匹配。
      2. 若创建的是单品券,则券接口item_id中传入的商品ID列表的值,要跟当面付接口中商品明细列表(goods_detail)中的商品标号(goods_id)的值对应,都填写商家内部商品唯一id号
      3. 优惠券通用核销流程:一笔交易通过当面付传递给支付宝时,蚂蚁金服会先查询请求参数中的门店(store_id)下是否有匹配的全场优惠券,然后查询goods_id是否有对应的单品优惠券,根据核销规则进行核销。

核销规则:

      1. 单品优惠—— 单品代金券,单品折扣券,单品换购券;

对同一个SKU取优惠力度最大的核销,对不同的SKU可以取不同的券核销。

当多张券优惠力度相同时,优先核销有效期短的券。

      1. 全场优惠 —— 全场折扣,全场代金券

取优惠力度最大的全场优惠核销;

当多张券优惠力度相同时,优先核销有效期短的券。

      1. 订单核销规则:对比一笔订单中单品优惠和全场优惠的优惠金额,取优惠金额大的优惠类型核销。

举例:

A商品单价100,B商品单价200,C商品单价300;

用户拥有以下五张券:

券1:适用商品为A的20元单品代金券;

券2:适用商品为A、B的9折单品折扣券

券3:适用商品为C的280元单品换购券

券4:全场9.5折券

券5:全场50元代金券

 

该用户购买了1个A商品,1个B商品,1个C商品共计600元。

先计算单品优惠:

对A商品: 用券1优惠20元,用券2优惠10元,因此用券1核销;

对B商品: 用券2优惠20元

对C商品: 用券3优惠20元

因此单品优惠最高优惠金额为60元

再计算全场优惠:

使用券4,全场优惠600 * (1-0.95) = 30元

使用券5,优惠50元

因此全场优惠最高优惠50元;

单品优惠总计优惠力度更大,因此核销券1,券2,券3,用户最终支付540元。

FAQ

关于此文档暂时还没有FAQ
返回
顶部
onlineServer