Skip to content

Commit

Permalink
Merge branch 'release/v1.28.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Oct 12, 2024
2 parents 876d50e + de48611 commit ac81fe4
Show file tree
Hide file tree
Showing 18 changed files with 454 additions and 0 deletions.
3 changes: 3 additions & 0 deletions marketing-api/LOCAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
- 上传视频 [ VideoUpload(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoUploadRequest) (*file.Video, error) ]
- 获取素材库视频 [ VideoGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoGetRequest) (*file.VideoGetResult, error) ]
- 获取抖音主页视频 [ VideoAwemeGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *file.VideoAwemeGetRequest) (*file.VideoAwemeGetResult, error) ]
- 本地推线索管理 (local/clue)
- 获取本地推线索列表 [ LifeGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *clue.LifeGetRequest) (*clue.LifeGetResult, error) ]
- 本地推线索回传 [ LifeCallback(ctx context.Context, clt *core.SDKClient, accessToken string, req *clue.LifeCallbackRequest) error ]
2 changes: 2 additions & 0 deletions marketing-api/api/local/clue/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package clue 本地推线索管理相关
package clue
13 changes: 13 additions & 0 deletions marketing-api/api/local/clue/life_callback.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package clue

import (
"context"

"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/local/clue"
)

// LifeCallback 本地推线索回传
func LifeCallback(ctx context.Context, clt *core.SDKClient, accessToken string, req *clue.LifeCallbackRequest) error {
return clt.PostAPI(ctx, "2/tools/clue/life/callback/", req, nil, accessToken)
}
24 changes: 24 additions & 0 deletions marketing-api/api/local/clue/life_get.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package clue

import (
"context"

"github.com/bububa/oceanengine/marketing-api/core"
"github.com/bububa/oceanengine/marketing-api/model/local/clue"
)

// LifeGet 获取本地推线索列表
// 该接口用于获取广告主的本地推线索列表。
// 线索列表中,不包含来客账户下自然流量线索。
// 为保证接口使用的安全性避免调取他人的线索信息:
// 该接口仅允许巨量引擎工作台(组织)账户授权后调用,不支持代理商账户授权。
// 该接口只可用于查询自己本地推账户下的线索信息,即需查询的本地推账号的主体需与APPID对应开发者的主体保持一致,才可获取到线索的信息,否则会报错!本地推主体与开发者主体不一致,又要使用该接口时,请在授权时勾选「敏感物料授权」
// 您要获取的线索信息中包含大量用户个人信息。除您另行获得用户的同意外,您仅可将相关的用户个人信息用于用户授权范围内的必要用途;涉嫌向他人非法提供、售卖用户个人信息的,可能构成刑事犯罪,须依法承担相应法律责任。
// 其中应答参数是按creative_time倒序返回的。如果您有数据处理的需求,可以参考此排序逻辑。
func LifeGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *clue.LifeGetRequest) (*clue.LifeGetResult, error) {
var resp clue.LifeGetResponse
if err := clt.GetAPI(ctx, "2/tools/clue/life/get/", req, &resp, accessToken); err != nil {
return nil, err
}
return resp.Data, nil
}
21 changes: 21 additions & 0 deletions marketing-api/enum/local/clue_action_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package local

// ClueActionType 互动场景
type ClueActionType string

const (
// ClueActionType_SHORT_VIDEO 短视频
ClueActionType_SHORT_VIDEO ClueActionType = "SHORT_VIDEO"
// ClueActionType_LIVE_VIDEO 直播
ClueActionType_LIVE_VIDEO ClueActionType = "LIVE_VIDEO"
// ClueActionType_HOME_PAGE 企业主页
ClueActionType_HOME_PAGE ClueActionType = "HOME_PAGE"
// ClueActionType_IM_MESSAGE 消息列表
ClueActionType_IM_MESSAGE ClueActionType = "IM_MESSAGE"
// ClueActionType_GROUPON_ORDER 团购tab
ClueActionType_GROUPON_ORDER ClueActionType = "GROUPON_ORDER"
// ClueActionType_ALIEN_CARD 异形卡
ClueActionType_ALIEN_CARD ClueActionType = "ALIEN_CARD"
// ClueActionType_OTHERS 其他
ClueActionType_OTHERS ClueActionType = "OTHERS"
)
11 changes: 11 additions & 0 deletions marketing-api/enum/local/clue_allocation_status.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package local

// ClueAllocationStatus 分配状态
type ClueAllocationStatus string

const (
// ClueAllocationStatus_NOT_ASSIGN 待分配
ClueAllocationStatus_NOT_ASSIGN ClueAllocationStatus = "NOT_ASSIGN"
// ClueAllocationStatus_ASSIGNED 已分配
ClueAllocationStatus_ASSIGNED ClueAllocationStatus = "ASSIGNED"
)
17 changes: 17 additions & 0 deletions marketing-api/enum/local/clue_convert_state.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package local

// ClueConvertState 线索事件状态
type ClueConvertState string

const (
// ClueConvertState_ARRIVAL 顾客到店/销售人员成功上门
ClueConvertState_ARRIVAL ClueConvertState = "ARRIVAL"
// ClueConvertState_CLUE_CONFIRM 顾客表达有意向
ClueConvertState_CLUE_CONFIRM ClueConvertState = "CLUE_CONFIRM"
// ClueConvertState_CLUE_HIGH_INTENTION 定金或钩子品支付
ClueConvertState_CLUE_HIGH_INTENTION ClueConvertState = "CLUE_HIGH_INTENTION"
// ClueConvertState_CONVERSION_CLASS 正价支付
ClueConvertState_CONVERSION_CLASS ClueConvertState = "CONVERSION_CLASS"
// ClueConvertState_INVALID_EVENT 无效
ClueConvertState_INVALID_EVENT ClueConvertState = "INVALID_EVENT"
)
11 changes: 11 additions & 0 deletions marketing-api/enum/local/clue_flow_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package local

// ClueFlowType 流量类型
type ClueFlowType string

const (
// ClueFlowType_NATURE 自然流量
ClueFlowType_NATURE ClueFlowType = "NATURE"
// ClueFlowType_AD 广告流量
ClueFlowType_AD ClueFlowType = "AD"
)
55 changes: 55 additions & 0 deletions marketing-api/enum/local/clue_reason_code.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package local

// ClueReasonCode 线索事件状态扩展标签
type ClueReasonCode string

const (
// ClueReasonCode_CALL_THREE_TIMES_NO_RESPONSE 拨打3次以上未接通
ClueReasonCode_CALL_THREE_TIMES_NO_RESPONSE ClueReasonCode = "CALL_THREE_TIMES_NO_RESPONSE"
// ClueReasonCode_INVALID_NUMBER 空号/停机/关机
ClueReasonCode_INVALID_NUMBER ClueReasonCode = "INVALID_NUMBER"
// ClueReasonCode_NO_AD_RESPONSE 反馈未在广告留资
ClueReasonCode_NO_AD_RESPONSE ClueReasonCode = "NO_AD_RESPONSE"
// ClueReasonCode_CONNECTED_NO_INTENTION 接通但无意向
ClueReasonCode_CONNECTED_NO_INTENTION ClueReasonCode = "CONNECTED_NO_INTENTION"
// ClueReasonCode_OFFENSIVE_LANGUAGE 黑脏词
ClueReasonCode_OFFENSIVE_LANGUAGE ClueReasonCode = "OFFENSIVE_LANGUAGE"
// ClueReasonCode_OTHER 其它
ClueReasonCode_OTHER ClueReasonCode = "OTHER"
// ClueReasonCode_HOME_COLLABORATION_WITH_PEERS (家居)同行合作
ClueReasonCode_HOME_COLLABORATION_WITH_PEERS ClueReasonCode = "HOME_COLLABORATION_WITH_PEERS"
// ClueReasonCode_HOME_NO_SHOW_FOR_MEASUREMENT_VISIT (家居)爽约上门量房
ClueReasonCode_HOME_NO_SHOW_FOR_MEASUREMENT_VISIT ClueReasonCode = "HOME_NO_SHOW_FOR_MEASUREMENT_VISIT"
// ClueReasonCode_HOME_RENOVATION_TYPE_NOT_ACCEPTABLE (家居)装修类型不可承接
ClueReasonCode_HOME_RENOVATION_TYPE_NOT_ACCEPTABLE ClueReasonCode = "HOME_RENOVATION_TYPE_NOT_ACCEPTABLE"
// ClueReasonCode_HOME_MISMATCH_DIFFERENT_LOCATIONS (家居)需求不匹配-需求与供给异地,原MISMATCH_DIFFERENT_LOCATIONS枚举逐步下线中
ClueReasonCode_HOME_MISMATCH_DIFFERENT_LOCATIONS ClueReasonCode = "HOME_MISMATCH_DIFFERENT_LOCATIONS"
// ClueReasonCode_HOME_MISMATCH_LOW_BUDGET (家居)需求不匹配-消费力差(指代预算少/面积小),原MISMATCH_LOW_BUDGET枚举逐步下线中
ClueReasonCode_HOME_MISMATCH_LOW_BUDGET ClueReasonCode = "HOME_MISMATCH_LOW_BUDGET"
// ClueReasonCode_EDU_MISMATCH_CLASS_TIME (教育)需求不匹配-上课时间不匹配
ClueReasonCode_EDU_MISMATCH_CLASS_TIME ClueReasonCode = "EDU_MISMATCH_CLASS_TIME"
// ClueReasonCode_EDU_MISMATCH_COURSE (教育)需求不匹配-课程不匹配
ClueReasonCode_EDU_MISMATCH_COURSE ClueReasonCode = "EDU_MISMATCH_COURSE"
// ClueReasonCode_EDU_MISMATCH_DIFFERENT_LOCATIONS (教育)需求不匹配-需求与供给异地
ClueReasonCode_EDU_MISMATCH_DIFFERENT_LOCATIONS ClueReasonCode = "EDU_MISMATCH_DIFFERENT_LOCATIONS"
// ClueReasonCode_EDU_UNABLE_TO_ATTEND_IN_PERSON (教育)无法线下参加
ClueReasonCode_EDU_UNABLE_TO_ATTEND_IN_PERSON ClueReasonCode = "EDU_UNABLE_TO_ATTEND_IN_PERSON"
// ClueReasonCode_HOME_MEASUREMENT_COMPLETED [家居]已量房
ClueReasonCode_HOME_MEASUREMENT_COMPLETED ClueReasonCode = "HOME_MEASUREMENT_COMPLETED"
// ClueReasonCode_HOME_ORDER_DISPATCHED [家居]已派单
ClueReasonCode_HOME_ORDER_DISPATCHED ClueReasonCode = "HOME_ORDER_DISPATCHED"
// ClueReasonCode_HOME_APPOINTMENT_SCHEDULED [家居]已约时间
ClueReasonCode_HOME_APPOINTMENT_SCHEDULED ClueReasonCode = "HOME_APPOINTMENT_SCHEDULED"
// ClueReasonCode_HOME_CAN_ADD_WECHAT [家居]可加微
ClueReasonCode_HOME_CAN_ADD_WECHAT ClueReasonCode = "HOME_CAN_ADD_WECHAT"
// ClueReasonCode_HOME_CONNECTED_WITH_INTERESTED_PARTY [家居]接通有意向
ClueReasonCode_HOME_CONNECTED_WITH_INTERESTED_PARTY ClueReasonCode = "HOME_CONNECTED_WITH_INTERESTED_PARTY"
// ClueReasonCode_EDU_FIRST_CLASS_ATTENDED [教育]首次到课
ClueReasonCode_EDU_FIRST_CLASS_ATTENDED ClueReasonCode = "EDU_FIRST_CLASS_ATTENDED"
// ClueReasonCode_EDU_INTERESTED [教育]有意向
ClueReasonCode_EDU_INTERESTED ClueReasonCode = "EDU_INTERESTED"
// ClueReasonCode_HOME_CONTRACT_SIGNED [家居]已签约
ClueReasonCode_HOME_CONTRACT_SIGNED ClueReasonCode = "HOME_CONTRACT_SIGNED"
// ClueReasonCode_HOME_SERVICE_DELIVERY_COMPLETED [家居]已完成服务交付
ClueReasonCode_HOME_SERVICE_DELIVERY_COMPLETED ClueReasonCode = "HOME_SERVICE_DELIVERY_COMPLETED"
)
15 changes: 15 additions & 0 deletions marketing-api/enum/local/clue_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package local

// ClueType 留资组件
type ClueType string

const (
// ClueType_FORM 表单提交
ClueType_FORM ClueType = "FORM"
// ClueType_CONSULT 在线咨询
ClueType_CONSULT ClueType = "CONSULT"
// ClueType_SMARTPHONE 智能电话
ClueType_SMARTPHONE ClueType = "SMARTPHONE"
// ClueType_GROUP_BUYING 团购留资
ClueType_GROUP_BUYING ClueType = "GROUP_BUYING"
)
13 changes: 13 additions & 0 deletions marketing-api/enum/local/follow_life_account_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package local

// FollowLifeAccountType 跟进账户类型
type FollowLifeAccountType string

const (
// FollowLifeAccountType_HEAD 总部
FollowLifeAccountType_HEAD FollowLifeAccountType = "HEAD"
// FollowLifeAccountType_REGION 区域
FollowLifeAccountType_REGION FollowLifeAccountType = "REGION"
// FollowLifeAccountType_SINGLE 门店
FollowLifeAccountType_SINGLE FollowLifeAccountType = "SINGLE"
)
17 changes: 17 additions & 0 deletions marketing-api/enum/local/follow_state_name.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package local

// FollowStateName 线索通话状态
type FollowStateName string

const (
// FollowStateName_NOT_CALLED 待联系
FollowStateName_NOT_CALLED FollowStateName = "NOT_CALLED"
// FollowStateName_NOT_ANSWERED 未接通
FollowStateName_NOT_ANSWERED FollowStateName = "NOT_ANSWERED"
// FollowStateName_SHORT_ANSWERED 已接通
FollowStateName_SHORT_ANSWERED FollowStateName = "SHORT_ANSWERED"
// FollowStateName_ANSWERED 有效沟通
FollowStateName_ANSWERED FollowStateName = "ANSWERED"
// FollowStateName_DEEP_ANSWERED 深度沟通
FollowStateName_DEEP_ANSWERED FollowStateName = "DEEP_ANSWERED"
)
2 changes: 2 additions & 0 deletions marketing-api/enum/local/gender.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package local
type Gender string

const (
// Gender_UNKNOWN 未知
Gender_UNKNOWN Gender = "UNKNOWN"
// Gender_FEMALE 女
Gender_FEMALE Gender = "FEMALE"
// Gender_MALE 男
Expand Down
13 changes: 13 additions & 0 deletions marketing-api/enum/local/leads_page.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package local

// LeadsPage 留资页面
type LeadsPage string

const (
// LeadsPage_POI POI页
LeadsPage_POI LeadsPage = "POI"
// LeadsPage_PRODUCT_DETAIL 商详页
LeadsPage_PRODUCT_DETAIL LeadsPage = "PRODUCT_DETAIL"
// LeadsPage_OTHER 其他
LeadsPage_OTHER LeadsPage = "OTHER"
)
115 changes: 115 additions & 0 deletions marketing-api/model/local/clue/clue.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
package clue

import (
"github.com/bububa/oceanengine/marketing-api/enum/local"
"github.com/bububa/oceanengine/marketing-api/model"
)

// Clue 线索
type Clue struct {
// ClueID 线索ID
ClueID string `json:"clue_id,omitempty"`
// LocalAccountID 广告主ID
LocalAccountID model.Uint64 `json:"local_account_id,omitempty"`
// AdvertiserName 广告主名
AdvertiserName string `json:"advertiser_name,omitempty"`
// PromotionID 广告ID
PromotionID model.Uint64 `json:"promotion_id,omitempty"`
// PromotionName 广告名称
PromotionName string `json:"promotion_name,omitempty"`
// ContentID 内容ID
ContentID string `json:"content_id,omitempty"`
// ToolID 线索工具ID
ToolID string `json:"tool_id,omitempty"`
// CreateTimeDetail 线索创建时间,如:2020-04-29 00:00:00
CreateTimeDetail string `json:"create_time_detail,omitempty"`
// ModifyTime 线索修改时间,如:2020-04-29 00:00:00
ModifyTime string `json:"modify_time,omitempty"`
// Name 姓名
Name string `json:"name,omitempty"`
// Telephone 客户留资手机号。当团购订单退款后,不可获取明文手机号。 默认值: ""
Telephone string `json:"telephone,omitempty"`
// Gender 性别 可选值:
// UNKNOWN 未知
// MALE 男
// FEMALE 女
// 默认值: UNKNOWN
Gender local.Gender `json:"gender,omitempty"`
// Age 年龄
Age int `json:"age,omitempty"`
// ProvinceName 用户填写省份
ProvinceName string `json:"province_name,omitempty"`
// CityName 用户填写城市
CityName string `json:"city_name,omitempty"`
// CountyName 用户填写区县
CountyName string `json:"county_name,omitempty"`
// Address 用户填写详细地址
Address string `json:"address,omitempty"`
// Remark 商家备注
Remark string `json:"remark,omitempty"`
// RemarkDict 商家表单自定义的字段信息,及其他线索相关信息
RemarkDict string `json:"remark_dict,omitempty"`
// FlowType 流量类型 可选值:
// NATURE 自然流量
// AD 广告流量
FlowType local.ClueFlowType `json:"flow_type,omitempty"`
// ActionType 互动场景 可选值:
// SHORT_VIDEO 短视频
// LIVE_VIDEO 直播
// HOME_PAGE 企业主页
// IM_MESSAGE 消息列表
// GROUPON_ORDER 团购tab
// ALIEN_CARD 异形卡
// OTHERS 其他
ActionType local.ClueActionType `json:"action_type,omitempty"`
// LeadsPage 留资页面 可选值:
// POI POI页
// PRODUCT_DETAIL 商详页
// OTHER 其他
LeadsPage local.LeadsPage `json:"leads_page,omitempty"`
// ClueType 留资组件 可选值:
// FORM 表单提交
// CONSULT 在线咨询
// SMARTPHONE 智能电话
// GROUP_BUYING 团购留资
ClueType local.ClueType `json:"clue_type,omitempty"`
// FollowLifeAccountType 跟进账户类型 可选值:
// HEAD 总部
// REGION 区域
// SINGLE 门店
FollowLifeAccountType local.FollowLifeAccountType `json:"follow_life_account_type,omitempty"`
// FollowLifeAccountID 跟进账户ID
FollowLifeAccountID string `json:"follow_life_account_id,omitempty"`
// FollowLifeAccountName 跟进账户名称
FollowLifeAccountName string `json:"follow_life_account_name,omitempty"`
// OrderID 订单ID
OrderID uint64 `json:"order_id,omitempty"`
// EffectiveState 线索阶段 可选值:
// 0 新线索
// 1 有意向
// 2 成交
// 3 无效
// 6 已加微信
// 7 待再次沟通
// 204 到店
EffectiveState int `json:"effective_state,omitempty"`
// ClueOwnerName 所属人姓名
ClueOwnerName string `json:"clue_owner_name,omitempty"`
// FollowStateName 线索通话状态 可选值:
// NOT_CALLED 待联系
// NOT_ANSWERED 未接通
// SHORT_ANSWERED 已接通
// ANSWERED 有效沟通
// DEEP_ANSWERED 深度沟通
FollowStateName local.FollowStateName `json:"follow_state_name,omitempty"`
// SystemTags 线索被打上的系统标签,是一个标签项的数组
SystemTags []string `json:"system_tags,omitempty"`
// Tags 线索被打上的人工标签,是一个标签项的数组,包括自定义标签和行业标签
Tags []string `json:"tags,omitempty"`
// AllocationStatus 分配状态 可选值:
// NOT_ASSIGN 待分配
// ASSIGNED 已分配
AllocationStatus local.ClueAllocationStatus `json:"allocation_status,omitempty"`
// ReqID 当前线索对应广告的请求id
ReqID string `json:"req_id,omitempty"`
}
2 changes: 2 additions & 0 deletions marketing-api/model/local/clue/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package clue 本地推线索管理相关
package clue
Loading

0 comments on commit ac81fe4

Please sign in to comment.